Route HubSpot leads by territory and company size using Make
Prerequisites
- Make account (Core plan or higher recommended)
- HubSpot connection configured in Make via OAuth
- Slack connection configured in Make
- Enriched company data in HubSpot (state, country, employee count)
Step 1: Add a Watch Contacts trigger
Create a new scenario. Add a HubSpot CRM -> Watch Contacts module:
- Connection: Your HubSpot OAuth connection
- Watch: New contacts
- Limit: 10
- Properties: Select
firstname,lastname,email,company,jobtitle,state,country,hubspot_owner_id
Step 2: Get the associated company
Add an HTTP module to fetch the contact's company association:
- URL:
https://api.hubapi.com/crm/v3/objects/contacts/{{1.id}}/associations/companies - Method: GET
- Headers: Use HubSpot connection for auth
Then add a HubSpot CRM -> Get a Company module:
- Company ID:
{{2.results[1].id}}(first associated company) - Properties:
name,numberofemployees,state,country,hubspot_owner_id
Step 3: Check for existing account owner
Add a Router with two routes:
Route 1: Existing account owner (company has hubspot_owner_id)
- Filter:
hubspot_owner_idis not empty - This route skips territory logic and assigns the contact to the existing company owner
Route 2: New account — apply territory rules
- Filter:
hubspot_owner_idis empty (or does not exist)
Step 4: Apply territory routing with a Code module
On Route 2, add a JavaScript Code module:
const state = (company.state || contact.state || '').toUpperCase();
const employees = parseInt(company.numberofemployees || '0');
const territories = {
'NY': { ownerId: '111111', slackId: 'U01AAAA', rep: 'Alice' },
'MA': { ownerId: '111111', slackId: 'U01AAAA', rep: 'Alice' },
'CT': { ownerId: '111111', slackId: 'U01AAAA', rep: 'Alice' },
'CA': { ownerId: '222222', slackId: 'U02BBBB', rep: 'Bob' },
'WA': { ownerId: '222222', slackId: 'U02BBBB', rep: 'Bob' },
'FL': { ownerId: '333333', slackId: 'U03CCCC', rep: 'Carol' },
'TX': { ownerId: '333333', slackId: 'U03CCCC', rep: 'Carol' },
};
const enterpriseRep = { ownerId: '444444', slackId: 'U04DDDD', rep: 'Dave' };
const defaultRep = { ownerId: '555555', slackId: 'U05EEEE', rep: 'Eve' };
let assigned, reason;
if (employees >= 1000) {
assigned = enterpriseRep;
reason = `Enterprise (${employees} employees)`;
} else if (territories[state]) {
assigned = territories[state];
reason = `Territory: ${state}`;
} else {
assigned = defaultRep;
reason = 'Fallback — no territory match';
}
return { assigned, reason };If you're on Make's Free plan (which doesn't include the JavaScript Code module), use a Router with one route per territory. Each route has a filter checking the state value. It's more visual but harder to maintain as territories grow.
Step 5: Update contact owner in HubSpot
Add a HubSpot CRM -> Update a Contact module (on both routes):
- Contact ID:
{{1.id}} - Contact Owner: The owner ID from either the existing company owner (Route 1) or the territory code output (Route 2)
Step 6: Send a Slack DM
Add a Slack -> Create a Message module:
- Channel ID: The Slack user ID of the assigned rep
- Text:
🆕 *New Lead Routed to You*
*{{1.firstname}} {{1.lastname}}* at {{company.name}} ({{company.numberofemployees}} employees)
📍 {{state}}
Routing: {{reason}}Since the Router creates two branches, you need a Slack module on each branch (or merge them back with an Aggregator before a single Slack module). Most people just duplicate the Slack module on each branch.
Step 7: Schedule and activate
- Set the scenario schedule to Immediately
- Toggle the scenario to Active
Cost
- Free plan: 1,000 credits/month. Each routed lead uses ~5-6 credits. Handles ~170 leads/month on free.
- Core plan: $10.59/mo for 10,000 credits. Handles ~1,700 leads/month.
Need help implementing this?
We build and optimize automation systems for mid-market businesses. Let's discuss the right approach for your team.