intermediate1 hour3 min read

How to route HubSpot leads by territory and company size

Route HubSpot leads by territory and company size automatically. Compare n8n, Zapier, Make, Code+Cron, and Claude Code setup guides.

How to route HubSpot leads by territory and company size

This recipe includes a downloadable n8n template and Claude Code skill.

Workflow

New lead arrives
Check segment
Enterprise
Assign to senior AE
SMB
Assign to SMB team
Slack notify rep

Why route by territory and size?

Generic round-robin routing ignores context. An enterprise prospect in New York should go to the enterprise AE who covers the Northeast, not a random SDR. A 10-person startup should go to the SMB team, not take up an enterprise rep's time. Research from TOPO (now Gartner) shows that leads routed to territory-aligned reps convert 15-25% better than randomly distributed ones — reps with local market knowledge and segment expertise run better conversations.

The core problem is that most CRMs route by simple rules (owner of the associated company, or round-robin) and don't combine geography, company size, and existing account relationships into a single routing decision.

Territory and size-based routing ensures:

  • Leads go to the right rep — someone with the right territory knowledge and segment expertise
  • Enterprise and SMB are worked differently — senior AEs handle large accounts, SDRs handle smaller ones
  • Existing accounts stay together — new contacts at known companies go to the current account owner
  • Territory changes are easy — update a config or mapping table, not the automation itself

How it works

Every approach in this guide follows the same three-tier routing hierarchy:

  1. Check for existing account owner — if the lead's company already has an owner in HubSpot, assign the lead to that owner (keeps accounts together)
  2. Apply size override — if the company has 1,000+ employees, route to the enterprise AE regardless of geography
  3. Match by territory — use the company's state/region to find the territory owner; fall back to a default rep for unmatched locations

Which approach should I use?

  • n8n (recommended) — best for complex routing logic. The Code node handles the three-tier hierarchy cleanly, and you can fetch company associations for accurate territory data. Self-hosted is free; Cloud starts at $24/mo.
  • Zapier — good if you already have a Professional plan. Paths handle the existing-owner vs. new-account split, and Code by Zapier handles territory matching. Requires $29.99/mo minimum.
  • Make — visual Router module makes the branching logic transparent. Code module (Core plan, $10.59/mo) is cleaner than nested routes. Good for teams that want visual clarity.
  • Code + Cron — full control over the routing hierarchy, company association lookups, and state normalization. Real-time via webhooks. Zero per-execution cost, but you host it yourself.
  • Claude Code — on-demand bulk routing and rerouting. Best for initial territory setup, rerouting after territory changes, or auditing with dry-run mode. Not for real-time routing of individual leads.
What you'll get
#sales-leads
Lead Routerapp9:41 AM

🗺️ Territory Lead Assigned

Contact: Rachel Kim — Director of Operations at Contoso Ltd

Company Size: 2,400 employees

Region: West — California

Segment: Enterprise

Assigned to: David Reyes (West Enterprise AE)

View in HubSpot →

What you'll need

Prerequisites
  • HubSpot account with API access
  • A territory mapping (region → owner, size tier → team)
  • Enriched company data in HubSpot (state, country, employee count)
  • Slack workspace for rep notifications

Choose your approach

Select an approach below to see the full step-by-step guide.

Compare approaches

n8n

medium
Cost: $0-24/mo
Latency: polling
Code: low
Reliability: 24/7 cloud

Zapier

medium
Cost: $20-50/mo
Latency: real-time
Code: none
Reliability: 24/7 cloud

Make

medium
Cost: $10-29/mo
Latency: polling
Code: none
Reliability: 24/7 cloud

Code + Cron

medium
Cost: $0
Latency: real-time
Code: high
Reliability: Self-hosted

Claude Code

low
Cost: Usage-based
Latency: on-demand
Code: none
Reliability: On demand

n8n

medium

HubSpot Trigger → Code node with territory/size rules → Update Owner → Slack notify

Downloadable templateView guide

Zapier

medium

New Contact → Paths for territory/size logic → Update Contact → Slack DM

Cost: $20-50/moView guide

Make

medium

Watch Contacts → Router with filters per territory → Update → Slack

Cost: $10-29/moView guide

Code + Cron

medium

Python script with territory mapping table and routing rules

Cost: $0View guide

Claude Code

low

Guided Claude Code skill — tell the agent to route or reroute leads by territory conversationally

Downloadable skillView guide

Related Recipes

Frequently Asked Questions

Looking to scale your AI operations?

We build and optimize automation systems for mid-market businesses. Let's discuss the right approach for your team.