---
title: "How to automate lead routing with AI (HubSpot and MarkOps)"
description: "TL;DR: AI can score and route leads. HubSpot Breeze, Agent CLI, and Claude can also write the CRM from chat. A chat that re-decides the cutoff will put people on the wrong sequence. Lock the score bands, the owner rule, and the sequence entry in a saved playbook. Use AI to enrich and to draft. Use the playbook to assign."
canonical_url: "https://docs.ballet.dev/articles/how-to-automate-lead-routing-with-ai-hubspot-and-markops-cTGsMhuVp2"
md_url: "https://docs.ballet.dev/articles/how-to-automate-lead-routing-with-ai-hubspot-and-markops-cTGsMhuVp2.md"
---
# How to automate lead routing with AI (HubSpot and MarkOps)

**TL;DR:** AI can score and route leads. HubSpot Breeze, Agent CLI, and Claude can also write the CRM from chat. A chat that re-decides the cutoff will put people on the wrong sequence. Lock the score bands, the owner rule, and the sequence entry in a saved playbook. Use AI to enrich and to draft. Use the playbook to assign.

## What is AI lead routing?

Lead routing is the rule that decides who owns a new person and what happens next: score, territory, round-robin, sequence, Slack ping.

MarkOps automation is that rule plus list hygiene, campaign membership, and suppression. RevOps owns the CRM fields. MarkOps owns the motion that fills them.

Teams now search `HubSpot AI agent`, `lead routing automation`, and `automate lead assignment` because the vendors shipped agents that can do the write from chat:

- HubSpot [Breeze Agents](https://www.hubspot.com/company-news/introducing-the-agentic-customer-platform) enrich, qualify, and update the CRM.
- HubSpot [Agent CLI](https://knowledge.hubspot.com/integrations/use-the-hubspot-agent-cli) lets Claude Code or similar agents search records and propose cleanups.
- Salesforce in Claude does the same for pipeline. See [Salesforce in Claude](/articles/salesforce-in-claude-what-shipped-what-it-can-write-what-it-cannot-govern-PUUKFaqwc1).

The demo looks like routing is solved. The failure mode is a fuzzy cutoff.

## Why chat routing breaks

Example rule: score 70 or higher, assign to AE by region, add to Sequence A. Score 40 to 69, assign to SDR. Below 40, nurture.

In a chat, "this company feels like a 68, put them on Sequence A" is one sentence. On the 200th lead of the week, 68 and 70 swap. A person lands on the wrong sequence. Unsubscribes and brand risk follow.

Industry agent tests (τ-bench) showed a strong model staying consistent on retail work under 25% of the time across eight identical tries. One good route is a demo. Eight identical routes is MarkOps. Context: [Deterministic operations, measured](/articles/deterministic-operations-measured-A0mAp58RxY).

## HubSpot AI agent vs a HubSpot workflow

| | HubSpot workflow / assignment | HubSpot AI agent or Claude chat | Saved playbook |
| --- | --- | --- | --- |
| Trigger | Form, list, property change | Prompt or Agent CLI | Webhook, schedule, or form |
| Score | Property or workflow | Model re-scores in language | Fixed bands you version |
| Owner | Round-robin or territory table | Can invent an exception | Same table every run |
| Sequence | Enrollment action | Easy to talk into a different list | Same enrollment rule |
| Who edits the rule | Admins | Anyone in the thread | Owners and editors |
| Audit | Workflow history | Chat plus CRM field history | Playbook run + CRM write |

Keep HubSpot workflows for simple, stable assignment. Use an AI agent to research the account. Do not let the agent be the only copy of the cutoff.

## How to automate lead routing with AI (steps)

1. **Write the rule in one paragraph.** ICP, score bands, territory, round-robin fallback, suppression (customers, competitors, unsubscribes).
2. **Enrich first, route second.** Company size, industry, country. AI is useful here. See [Recipe: Enrich new leads automatically](/articles/recipe-enrich-new-leads-automatically-mPEoUuj0zc).
3. **Lock the bands in the playbook.** The model may suggest a score. The playbook decides the bucket.
4. **Write with a scoped user.** HubSpot or Salesforce integration user, not a pasted portal password. No shared super-admin.
5. **Enroll the sequence only after the bucket is set.** Same cutoff every run.
6. **Notify the owner in Slack** with the score, the reason, and the playbook run link.
7. **Log every assignment.** Who ran it, which lead, which owner, which sequence. If a human must override, pause on the same run.

Copy-paste starting point: [Recipe: Score, route, and follow up on leads](/articles/recipe-score-route-and-follow-up-on-leads-YaHA7hepdQ). Department index: [Marketing Ops recipes](/articles/marketing-ops-recipes-up0zI82PDp) and [RevOps recipes](/articles/revops-recipes-ElxIvdFLGX).

## Where Ballet fits

Ask Ballet can draft the playbook from the paragraph in step 1. The run is compiled steps, not a new chat.

- Form or CRM webhook starts the playbook.
- Enrichment can call an API or an AI step.
- Routing is code or a table: same 70, same region, same sequence.
- Owners edit the bands. SDRs run. They cannot talk the cutoff down to 65 for a friend.
- Credentials stay in the workspace.

That is the same split as [Claude writes the playbook. Ballet runs it.](/articles/claude-writes-the-playbook-ballet-runs-it-odiAydjDXG).

## FAQ

**How do I automate lead assignment in HubSpot?**
Use a workflow if the rule is a few properties. Use a playbook if you mix enrichment, territory tables, and a sequence that must not drift.

**What is MarkOps automation?**
The ops layer on campaigns: lists, scores, routing, suppression, attribution. Not the ad creative.

**Can Claude route HubSpot leads?**
Yes, through Agent CLI or MCP. Treat it as a research assistant. Put the assignment in a saved path.

**AI lead scoring vs rules?**
Use AI to propose features (fit, intent). Use rules for the bucket that enrolls a sequence. Mixing them in one chat is how 68 becomes 70.

## Related articles

- [Recipe: Score, route, and follow up on leads](/articles/recipe-score-route-and-follow-up-on-leads-YaHA7hepdQ)
- [Recipe: Enrich new leads automatically](/articles/recipe-enrich-new-leads-automatically-mPEoUuj0zc)
- [RevOps recipes](/articles/revops-recipes-ElxIvdFLGX)
- [Marketing Ops recipes](/articles/marketing-ops-recipes-up0zI82PDp)
- [Salesforce in Claude: what shipped, what it can write, what it cannot govern](/articles/salesforce-in-claude-what-shipped-what-it-can-write-what-it-cannot-govern-PUUKFaqwc1)
- [Claude writes the playbook. Ballet runs it.](/articles/claude-writes-the-playbook-ballet-runs-it-odiAydjDXG)
