Every 10 minutes
Assign 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.
- Runs
- Every 10 minutes
- Apps
- HubSpot
- AI
- Not needed
- Access
- crm.objects.deals.read/write, crm.objects.companies.read, crm.objects.owners.read
Send this to your assistant
Create a ClickRuntime automation: every 10 minutes, find HubSpot deals with no owner. If the company is in the UK or Ireland, assign them to Sarah. If it has more than 500 employees, assign them to Tom. Otherwise assign them to Priya.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A new deal with no owner is a deal nobody is working. In a HubSpot account where deals come from forms, imports and partner referrals, the unassigned ones pile up in a view that a sales manager checks twice a day. A $40,000 opportunity from a 500-person company sits for three hours while the manager is in a meeting, and by the time it is assigned the prospect has spoken to a competitor.
Every 10 minutes, deals without an owner are searched, the associated company is read for region and size, and your routing rules are applied: for example EMEA mid-market to one rep and North America enterprise to another. The deal's hubspot_owner_id is set to the right person.
It suits teams with territories or segments that want fast, fair routing without a manager acting as dispatcher.
What you get out of it
Leads get a quick first touch
With ownership assigned in minutes, reps are notified by HubSpot and can reach out the same hour. Response time to new deals is one of the most reliable drivers of win rate.
No more manual dispatching
Sales managers stop spending part of every day assigning deals. That time returns to coaching and pipeline reviews, which are higher-value work. Fewer interruptions for the manager also means fewer assignments delayed by a busy afternoon.
Territories are respected
A deal from Germany goes to the German-speaking rep and an enterprise account goes to an enterprise specialist. Rules are applied the same way every time. Rules can reflect language, region or deal size, so the person best suited to the buyer gets the conversation.
Fairness is visible and consistent
Reps trust a system that applies written rules. Disputes about who got the good lead fade, because the logic is explicit and the same for everybody. Written routing is easier to audit later, which makes quota and commission discussions simpler to resolve.
Nothing sits unowned overnight
Deals created after hours or on weekends are assigned as soon as the next check runs, so Monday morning does not begin with a backlog. Waiting only for the next 10-minute check means even weekend deals get an owner and a HubSpot notification quickly.
How it works
What happens, step by step
Every 10 minutes, the automation looks for HubSpot deals that don't have an owner yet.
For each one, it reads the linked company's country and size.
It applies your assignment rules, for example UK companies go to Sarah.
The deal is given to that rep in HubSpot, usually within minutes of being created.
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
- Add an AI step, for example to summarize, sort or draft a reply
- 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
from clickruntime import on_trigger, credentials, http, report_fetched
API = "https://api.hubapi.com/crm/v3/objects"
SARAH, TOM, PRIYA = "111111", "222222", "333333" # HubSpot owner ids
@on_trigger
def run(event):
headers = {"Authorization": f"Bearer {credentials.connection('hubspot', 'work')}"}
deals = http.post(f"{API}/deals/search", headers=headers, json={"limit": 50, "filterGroups": [{"filters": [
{"propertyName": "hubspot_owner_id", "operator": "NOT_HAS_PROPERTY"}]}]}).json()["results"]
report_fetched(len(deals))
if not deals:
return {"assigned": 0}
for deal in deals:
links = http.get(f"{API}/deals/{deal['id']}/associations/companies", headers=headers).json()["results"]
company = {}
if links:
company = http.get(f"{API}/companies/{links[0]['id']}", headers=headers,
params={"properties": "country,numberofemployees"}).json()["properties"]
if (company.get("country") or "") in ("United Kingdom", "Ireland"):
owner = SARAH
elif int(company.get("numberofemployees") or 0) > 500:
owner = TOM
else:
owner = PRIYA
http.patch(f"{API}/deals/{deal['id']}", headers=headers,
json={"properties": {"hubspot_owner_id": owner}}).raise_for_status()
return {"assigned": len(deals)}FAQ
Common questions
What if a deal matches no rule?
Can it do round-robin among reps?
Which company properties can the rules use?
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
Post HubSpot form submissions to Slack
Each new form submission shows up in Slack with the answers, within a few minutes.
See how it worksPost new HubSpot contacts to Slack
Your team sees each new contact's name, email and source in Slack within minutes.
See how it worksGet a Slack message when a deal changes stage
When a deal moves stage, the deal name, new stage and amount are posted to Slack.
See how it worksKeep exploring
Set up “Assign new HubSpot deals to the right rep” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.