How to route and assign Salesforce leads with round-robin and Slack alerts
Distribute Salesforce leads with round-robin logic and Slack alerts. Compare native Flow, n8n, and Claude Code approaches step by step.

This recipe includes a downloadable n8n template and Claude Code skill.
Workflow
Why automate lead routing?
Speed-to-lead is the strongest predictor of conversion. Responding within 5 minutes makes you dramatically more likely to connect than waiting 30 minutes. Manual lead assignment creates delays — the lead sits in a queue while managers decide who should get it.
Salesforce's native Lead Assignment Rules have significant limitations:
- One active rule per org — you can only have a single active assignment rule at a time
- No round-robin — rules route to a specific user or queue based on criteria, with no built-in rotation
- No workload balancing — no awareness of how many leads each rep already has
- No availability checking — no way to skip reps who are out of office
- Leads and Cases only — assignment rules don't apply to Opportunities or custom objects
- No notifications beyond email — no native Slack or Teams integration
Automated round-robin routing with Slack notifications ensures:
- Every lead is assigned instantly, no queue
- Distribution is fair and equal across the team
- The assigned rep gets a Slack DM within seconds
- No leads fall through the cracks
🔄 New Salesforce Lead Assigned
Contact: Priya Sharma — Head of Procurement at Fabrikam Inc
Company Size: 800 employees
Lead Source: Web — Requested demo
Assigned to: Kevin Torres (next in rotation)
How it works
Every approach follows the same pattern:
- Detect new leads — trigger on Lead creation in Salesforce (via Flow, polling, or on-demand query)
- Assign via round-robin — increment a counter, use modulo arithmetic to pick the next rep from a roster, and update the Lead's OwnerId
- Notify the rep — send a Slack DM with lead details and a direct link to the Salesforce record
Which approach should I use?
- Salesforce Flow — best for real-time assignment with zero external dependencies. The before-save flow assigns instantly on record creation. Requires Flow Builder experience and Custom Settings/Metadata setup. No polling delay.
- n8n — best when you want visual workflow control and chaining with other tools (enrichment, scoring). Polls for new Leads every minute. Self-hosted n8n is free with unlimited executions. Requires a Salesforce Connected App for OAuth.
- Claude Code — best for auditing and rebalancing existing assignments. Tell the agent "show me lead distribution this week" or "rebalance leads across the team." Ideal for one-time redistribution when reps join/leave, not for always-on routing.
What you'll need
- Salesforce org with API access (Enterprise, Unlimited, or Developer edition)
- Slack workspace with a bot added
- A list of rep Salesforce User IDs and their corresponding Slack User IDs
Choose your approach
Select an approach below to see the full step-by-step guide.
Compare approaches
| Approach | Complexity | Cost | Latency | Code | Reliability |
|---|---|---|---|---|---|
Salesforce Flow | medium | $0 (included) | real-time | low | 24/7 cloud |
n8n | medium | $0-24/mo | polling | low | 24/7 cloud |
Claude Code | low | Usage-based | on-demand | none | On demand |
Salesforce Flow
mediumn8n
mediumClaude Code
lowSalesforce Flow
mediumRecord-Triggered Flow on Lead creation → custom round-robin with Custom Setting → Slack notification
n8n
mediumSalesforce Lead Trigger → round-robin Code node → Update Lead owner → Slack DM
Claude Code
lowGuided Claude Code skill to audit and rebalance lead assignments conversationally, on a schedule, or via Cowork
Related Recipes
How to round-robin route new HubSpot leads and notify reps in Slack
HubSpot + Slack
How to round-robin assign Pipedrive deals and notify reps in Slack
Pipedrive + Slack
How to instantly notify a rep in Slack when a high-intent lead books a demo in HubSpot
HubSpot + Slack
How to route HubSpot leads by territory and company size
HubSpot + Slack
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.