Dynamic Hubspot lead routing with GPT-4 and Airtable sales team distribution
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (13)
- HubSpot Trigger
n8n-nodes-base.hubspotTrigger - HubSpot
n8n-nodes-base.hubspot - Code
n8n-nodes-base.code - Airtable
n8n-nodes-base.airtable - AI Agent
@n8n/n8n-nodes-langchain.agent - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Airtable Tool
n8n-nodes-base.airtableTool - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Slack
n8n-nodes-base.slack - Gmail
n8n-nodes-base.gmail - No Operation, do nothing
n8n-nodes-base.noOp
What it does
AI Agent for Dynamic Lead Distribution (HubSpot + Airtable) !Manish Kumar π§ AI-Powered Lead Routing and Sales Team Distribution This intelligent n8n workflow automates end-to-end lead qualification and allocation by integrating HubSpot, Airtable, OpenAI, Gmail, and Slack. The system ensures that every new lead is instantly analyzed, scored, and routed to the best-fit sales representative β all powered by AI logic, sir. --- π‘ Key Advantages β‘ Real-Time Lead Routing Automatically assigns new leads from HubSpot to the most relevant sales rep based on region, capacity, and expertise. π§ AI Qualification Engine An OpenAI-powered Agent evaluates the leadβs industry, region, and needs to generate a persona summary and routing rationale. π Centralized Tracking in Airtable Every lead is logged and updated in Airtable with AI insights, rep details, and allocation status for full transparency. π¬ Instant Notifications Slack and Gmail integrations alert the assigned rep immediately with full lead details and AI-generated notes. π Seamless CRM Sync Updates the original HubSpot record with lead persona, routing info, and timeline notes for audit-ready history, sir. --- βοΈ How It Works 1. HubSpot Trigger β Captures a new lead as soon as itβs created in HubSpot. 2. Fetch Contact Data β Retrieves all relevant fields like name, company, and industry. 3. Clean & Format Data β A Code node standardizes and structures the data for consistency. 4. Airtable Record Creation β Logs the lead data into the βLeadsβ table for centralized tracking. 5. AI Agent Qualification β The AI analyzes the lead using the TeamDatabase (Airtable) to find the ideal rep. 6. Record Update β Updates the same Airtable record with the assigned team and AI persona summary. 7. Slack Notification β Sends a real-time message tagging the rep with lead info. 8. Gmail Notification β Sends a personalized handoff email with context and follow-up actions. 9. HubSpot Sync β Updates the original contact in HubSpot with the assignment details and AI rationale, sir. --- π οΈ Setup Steps Trigger Node: HubSpot β Detect new leads. HubSpot Node: Retrieve complete lead details. Code Node: Clean and normalize data. Airtable Node: Log lead info in the βLeadsβ table. AI Agent Node: Process lead and match with sales team. Slack Node: Notify the designated representative. Gmail Node: Email the rep with details. HubSpot Node: Update CRM with AI summary and allocation status, sir. --- π Credentials Required HubSpot OAuth2 API β To fetch and update leads. Airtable Personal Access Token β To store and update lead data. OpenAI API β To power the AI qualification and matching logic. Slack OAuth2 β For sending team notifications. Gmail OAuth2 β For automatic email alerts to assigned reps, sir. --- π€ Ideal For Sales Operations and RevOps teams managing multiple regions B2B SaaS and enterprise teams handling large lead volumes Marketing teams requiring AI-driven, bias-free lead assignment Organizations optimizing CRM efficiency with automation, sir --- π¬ Bonus Tip You can easily extend this workflow by adding lead scoring logic, language translation for follow-ups, or Salesforce integration. The entire system is modular β perfect for scaling across global sales teams, sir.