On a schedule
Score new HubSpot leads and flag the best ones
New contacts get a fit score saved on their record, and the strongest ones are sent to you in Slack.
- Runs
- On a schedule
- Apps
- HubSpot
- AI
- Yes, uses the built-in AI allowance
- Access
- crm.objects.contacts.read, crm.objects.contacts.write
Send this to your assistant
Create a ClickRuntime automation: every 15 minutes, score new HubSpot contacts from 1 to 10 on fit using job title, company and form answers. Save the score to the lead_score property and message me in Slack about anyone scoring 8 or more.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Marketing hands over forty new contacts a day, and sales treats them all the same: a student downloading a guide, a founder from a 200-person company asking for pricing, a competitor researching your site. Reps cherry-pick by gut feeling, so the best lead might wait until Thursday while someone chases a poor fit on Monday. In HubSpot the default lead score depends on rules somebody wrote two years ago and nobody has revisited.
On a schedule, newly created contacts are fetched, the built-in AI reads the details (job title, company, source, message) and produces a score. That score is written to a contact property, and contacts with high scores are announced in Slack so the right rep sees them immediately.
It suits B2B teams with a steady stream of form fills, where speed to the best leads makes the difference.
What you get out of it
The best leads are contacted first
A high score puts a founder asking about pricing at the top of the list in minutes. Speed to lead is one of the strongest predictors of winning the deal, and this protects it.
Rep time goes where it pays
Chasing poor fits is expensive. A visible score lets reps spend their first hour on the leads most likely to convert, not on whichever arrived last. Over a quarter, that discipline shows up as higher conversion from the same lead volume.
Scoring reflects the actual message
A rules-based score ignores what someone wrote in the form. Reading the text means a contact who describes a clear need and a budget is scored above one who left it blank.
Scores are stored where you work
Because the score is written to a contact property, you can build HubSpot lists, views and workflows on it, without a separate tool or export. That makes it easy to route high scorers to a specific rep or enroll low scorers in nurturing.
Marketing gets feedback on lead quality
Seeing the proportion of high scores by source tells marketing which campaigns bring buyers and which bring noise, which guides budget decisions. Better budget decisions follow, since spend moves toward channels that deliver buyers and away from the rest.
How it works
What happens, step by step
Every 15 minutes, the automation picks up new contacts in HubSpot.
AI reads each contact's details, like job title and company, and gives them a fit score from 1 to 10.
The score is saved on the contact's record in HubSpot.
Contacts with a high score are posted to your Slack channel with a one-line reason, so you can reach out first.
Before it runs live
- Connect HubSpot
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 steps into one automation
Under the hood
The code that runs this automation
import time
from clickruntime import on_trigger, credentials, http, ai, state, notify, report_fetched
API = "https://api.hubapi.com/crm/v3/objects/contacts"
SCHEMA = {"type": "object", "properties": {"score": {"type": "integer"}, "reason": {"type": "string"}}}
@on_trigger
def run(event):
headers = {"Authorization": f"Bearer {credentials.connection('hubspot', 'work')}"}
since = state.get("since") or int((time.time() - 900) * 1000)
contacts = http.post(f"{API}/search", headers=headers, json={"limit": 50,
"properties": ["firstname", "lastname", "jobtitle", "company", "message"],
"filterGroups": [{"filters": [{"propertyName": "createdate", "operator": "GT", "value": since}]}]}).json()["results"]
report_fetched(len(contacts))
if not contacts:
return {"scored": 0}
for c in contacts:
p = c["properties"]
out = ai.generate(f"Title: {p.get('jobtitle')}\nCompany: {p.get('company')}\nForm: {(p.get('message') or '')[:1000]}",
system="Score this B2B lead's fit from 1 to 10 with a one-line reason.",
json_schema=SCHEMA, max_output_tokens=60).json
http.patch(f"{API}/{c['id']}", headers=headers, json={"properties": {"lead_score": out["score"]}}).raise_for_status()
if out["score"] >= 8:
notify.slack(f"Hot lead ({out['score']}/10): {p.get('firstname')} {p.get('lastname')}, "
f"{p.get('jobtitle')} at {p.get('company')}. {out['reason']}", channel="#sales")
state.set("since", int(time.time() * 1000))
return {"scored": len(contacts)}FAQ
Common questions
Which property does the score go into?
What counts as a high score?
Does it score existing contacts or only new ones?
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 short review of every lost deal
When a deal moves to closed lost, you get a blameless write-up of what happened, based on the deal notes.
See how it worksAssign new HubSpot deals to the right rep
Deals without an owner are given to a rep based on the company's country and size, within minutes.
See how it worksPost HubSpot form submissions to Slack
Each new form submission shows up in Slack with the answers, within a few minutes.
See how it worksKeep exploring
Set up “Score new HubSpot leads and flag the best ones” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.