The moment it happens
Welcome hot leads on WhatsApp the moment they sign up
New leads from your form are scored and saved in HubSpot, and the hot ones get a WhatsApp welcome straight away with a heads-up in #sales.
- Runs
- The moment it happens
- Apps
- HubSpot, WhatsApp Business
- AI
- Yes, uses the built-in AI allowance
- Access
- crm.objects.contacts.write; whatsapp_business_messaging
Send this to your assistant
Create a ClickRuntime automation: when my lead form sends a new lead, score it from 1 to 10, create the contact in HubSpot with the score, and if it's 8 or more send our WhatsApp welcome template and post it to #sales.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A language school runs ads for its intensive courses, and the form asks for a phone number. Leads who are asked about start dates within minutes book far more often than those who get a call the next day, but the admissions team can't watch the form all day.
This automation scores each new lead from what they wrote, saves it in HubSpot, and sends the promising ones a friendly WhatsApp welcome right away. Sales sees the lead in Slack and can pick up the conversation where WhatsApp left off.
What you get out of it
Speed where it counts
Hot leads hear from you within seconds, while they're still looking at your site.
Cold leads aren't spammed
Only leads scoring 8 or more get a WhatsApp message; the rest go into HubSpot for your normal nurture.
The score is on the contact
Each new HubSpot contact carries its AI score, so you can build lists and reports from it.
Sales knows who was contacted
The #sales post shows the score and a one-line reason, so whoever follows up has context.
How it works
What happens, step by step
Your lead form sends each new sign-up to the automation's link.
AI scores the lead from 1 to 10 from their company and message.
A contact is created in HubSpot with the score.
If the score is 8 or more, they get your WhatsApp welcome template and the lead is posted to #sales.
Before it runs live
- Connect HubSpot
- Connect WhatsApp Business
- 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 HubSpot and WhatsApp Business steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_event, credentials, http, ai, notify
API = "https://api.hubapi.com/crm/v3/objects"
PHONE_NUMBER_ID = "123456789012345"
WA = f"https://graph.facebook.com/v21.0/{PHONE_NUMBER_ID}/messages"
SCHEMA = {"type": "object", "properties": {"score": {"type": "integer"}, "reason": {"type": "string"}},
"required": ["score", "reason"]}
@on_event
def handle(event):
lead = event.json or {}
result = ai.generate(f"Score this lead 1-10 for buying intent and fit.\nCompany: {lead.get('company')}\n"
f"Message: {str(lead.get('message', ''))[:1500]}", json_schema=SCHEMA, max_output_tokens=100).json
hot = result["score"] >= 8
headers = {"Authorization": f"Bearer {credentials.connection('hubspot', 'work')}"}
contact = http.post(f"{API}/contacts", headers=headers, json={"properties": {
"email": lead["email"], "firstname": lead.get("first_name", ""), "lastname": lead.get("last_name", ""),
"company": lead.get("company", ""), "phone": lead.get("phone", ""),
"ai_lead_score": result["score"], "hs_lead_status": "OPEN" if hot else "NEW"}}).json()
if hot and lead.get("phone"):
http.post(WA, headers={"Authorization": f"Bearer {credentials.secret('WHATSAPP_TOKEN')}"}, json={
"messaging_product": "whatsapp", "to": lead["phone"].lstrip("+"), "type": "template", "template": {
"name": "welcome_hot_lead", "language": {"code": "en"}, "components": [{"type": "body",
"parameters": [{"type": "text", "text": lead.get("first_name") or "there"}]}]}}).raise_for_status()
notify.slack(f"Hot lead ({result['score']}/10) sent a WhatsApp welcome: {lead.get('first_name')} {lead.get('last_name')}"
f" at {lead.get('company')}\n{result['reason']}", channel="#sales")
return {"contact": contact.get("id"), "score": result["score"], "hot": hot}FAQ
Common questions
What do I need in HubSpot?
What does the welcome message say?
Does it need the phone number in a set format?
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 call summaries in HubSpot and on WhatsApp
After every sales call, a short summary with next steps is saved on the HubSpot contact and sent to the rep on WhatsApp.
See how it worksQualify WhatsApp enquiries into HubSpot
People who message your WhatsApp number are asked the right questions, saved in HubSpot with a score, and hot leads are posted to #sales.
See how it worksLog invoice photos from WhatsApp on HubSpot deals
When a customer sends a photo of an invoice or receipt on WhatsApp, its number, amount and date are recorded on their HubSpot deal and they get a confirmation.
See how it worksKeep exploring
Set up “Welcome hot leads on WhatsApp the moment they sign up” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.