The moment it happens
Add form leads to HubSpot and email the good ones
Every form lead lands in HubSpot, the promising ones get a personal email from your Gmail within minutes, and you hear about it.
- Runs
- The moment it happens
- Apps
- Gmail, HubSpot
- AI
- Optional
- Access
- HubSpot contacts write; Gmail gmail.send
Send this to your assistant
Create a ClickRuntime automation: give me a link my website form can send to. Create or update each lead in HubSpot, and if they look like a good fit, email them from my Gmail and let me know.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A small agency or software team gets a handful of enquiries a day through its website form. Each one should be in HubSpot and each good one deserves a quick, personal reply, but the founder is in meetings and the form notifications pile up. By the time someone answers, the prospect has already booked a call with someone else.
This puts every lead into HubSpot the moment it arrives and sends the promising ones a short note from your own address, so the first reply happens in minutes, not hours, and nobody has to retype details into the CRM.
What you get out of it
Leads hear back while they are still interested
A good-fit lead gets an email from you a minute after submitting the form, while they are still at their desk thinking about the problem.
HubSpot is always complete
Every submission becomes or updates a contact, so nothing lives only in an inbox and reports on lead volume are accurate.
Poor fits don't get a sales email
Students, vendors and spam still go into HubSpot, but only qualified leads get the follow-up, so your outreach stays relevant.
You stay in the loop
You get a short email for each qualified lead with who they are, so you can pick up the conversation yourself.
How it works
What happens, step by step
When someone submits your website form, ClickRuntime receives their details straight away.
It creates the person in HubSpot, or updates them if a contact with that email already exists.
It checks whether they are a good fit using your rules, or with AI reading their message if you prefer.
Good-fit leads get a short email from your Gmail address, and you get an email saying who they are.
Before it runs live
- Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
- Connect HubSpot
- Paste your automation's link into the other app's webhook settings
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Act only on the items that match your own rules, and skip the rest
- Change what the AI looks for, or how it writes the result
- Add another app, for example also send it to Slack
- Combine it with other Gmail and HubSpot steps into one automation
Under the hood
The code that runs this automation
import base64
from email.message import EmailMessage
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_event, credentials, http, notify
def gmail():
return build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
def send(g, to, subject, body):
msg = EmailMessage(); msg["To"] = to; msg["Subject"] = subject; msg.set_content(body)
g.users().messages().send(userId="me", body={"raw": base64.urlsafe_b64encode(msg.as_bytes()).decode()}).execute()
@on_event
def handle(event):
lead = event.json or {}
email = (lead.get("email") or "").strip().lower()
if not email:
return {"skipped": "no email"}
props = {"email": email, "firstname": lead.get("name", ""), "company": lead.get("company", "")}
r = http.post("https://api.hubapi.com/crm/v3/objects/contacts/batch/upsert",
headers={"Authorization": f"Bearer {credentials.connection('hubspot', 'work')}"},
json={"inputs": [{"idProperty": "email", "id": email, "properties": props}]})
r.raise_for_status()
qualified = "@gmail." not in email and int(lead.get("team_size") or 0) >= 10
if qualified:
send(gmail(), email, "Thanks for getting in touch",
f"Hi {props['firstname'] or 'there'},\n\nThanks for your enquiry. When suits you for a quick call this week?")
notify.email_me(f"Qualified lead: {props['company']}", f"{props['firstname']} <{email}> was emailed.")
return {"qualified": qualified}FAQ
Common questions
How does it decide who is a good fit?
What does the follow-up email say?
What happens if the same person fills in the form twice?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Get a weekly revenue forecast from HubSpot by email
Every Monday you get an email with your weighted pipeline forecast and the deals most at risk.
See how it worksWelcome new customers when a HubSpot deal is won
As soon as a deal closes, the customer gets a personal welcome email from your Gmail and an account manager is assigned in HubSpot.
See how it worksDraft personal outreach emails for a HubSpot list
Each contact in your HubSpot outreach list gets a tailored email waiting in your Gmail drafts, ready for you to check and send.
See how it worksKeep exploring
Set up “Add form leads to HubSpot and email the good ones” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.