HighLevel + Gmail: leads routed to the right inbox
Leads come in. Then the scavenger hunt starts. Someone checks HighLevel, skims notes, guesses who should respond, forwards an email, and hopes nothing gets lost in the shuffle.
This HighLevel Gmail routing problem hits sales managers first, honestly. But support leads and partnership inquiries cause the same mess for ops leads and agency owners trying to keep response times tight.
This workflow classifies each new opportunity with AI and routes it to the right Gmail inbox in seconds, with the full context included. You’ll see how it works, what you need, and where teams usually trip up.
How This Automation Works
See how this solves the problem:
n8n Workflow Template: HighLevel + Gmail: leads routed to the right inbox
flowchart LR
subgraph sg0["When clicking ‘Execute workflow’ Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "When clicking ‘Execute workf..", pos: "b", h: 48 }
n1@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Check: Demo Request?", pos: "b", h: 48 }
n2@{ icon: "mdi:message-outline", form: "rounded", label: "Route to Demo Team", pos: "b", h: 48 }
n3@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Check: Support Query?", pos: "b", h: 48 }
n4@{ icon: "mdi:message-outline", form: "rounded", label: "Route to Support Team", pos: "b", h: 48 }
n5@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Check: Partnership Inquiry?", pos: "b", h: 48 }
n6@{ icon: "mdi:message-outline", form: "rounded", label: "Route to Partnership Team", pos: "b", h: 48 }
n7@{ icon: "mdi:robot", form: "rounded", label: "AI Lead Classifier Agent", pos: "b", h: 48 }
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/highLevel.svg' width='40' height='40' /></div><br/>Fetch All Opportunities"]
n9@{ icon: "mdi:brain", form: "rounded", label: "Azure OpenAI GPT-4o-mini", pos: "b", h: 48 }
n10["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Process AI Response"]
n11["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/highLevel.svg' width='40' height='40' /></div><br/>Fetch Contact Details"]
n10 --> n1
n10 --> n3
n10 --> n5
n1 --> n2
n3 --> n4
n11 --> n7
n8 --> n11
n7 --> n10
n9 -.-> n7
n5 --> n6
n0 --> n8
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n0 trigger
class n7 ai
class n9 aiModel
class n1,n3,n5 decision
class n10 code
classDef customIcon fill:none,stroke:none
class n8,n10,n11 customIcon
The Challenge: Lead triage that quietly breaks your pipeline
Manual lead sorting sounds small until you live with it. Opportunities arrive in HighLevel, but the details are scattered across notes, contact profiles, and whatever the lead typed in a hurry. Someone has to read it, interpret intent, and hand it off to the correct person. Do that wrong and you get the worst outcomes: demo requests answered like support tickets, support tickets ignored for hours, and partnership inquiries buried in a sales inbox. The real cost is the context switching, the missed handoffs, and the slow reply that makes you look disorganized.
It adds up fast. Here’s where it breaks down in day-to-day operations.
- Leads get forwarded to the wrong inbox because the message is vague or the notes are incomplete.
- Someone has to open HighLevel, then open the contact, then piece together the story from scraps.
- Response time suffers when triage depends on “whoever sees it first” instead of a consistent process.
- As volume grows, the manual process becomes a bottleneck, so follow-up quality drops even when the team is trying.
The Fix: AI lead classification and automatic Gmail routing
This n8n workflow pulls opportunities from HighLevel, enriches them with full contact details, and uses an AI agent (Azure OpenAI GPT-4o-mini) to figure out what the lead is actually asking for. Instead of relying on a human to interpret intent, the workflow reads the message notes and classifies the inquiry into one of three categories: demo request, support query, or partnership inquiry. Then it routes the lead to the right internal team by sending a neatly formatted email to the matching Gmail inbox (for example, [email protected], [email protected], [email protected]). Each email includes the contact info and original message context, so the recipient can reply quickly without digging around in the CRM.
The workflow starts with a manual run (or a schedule you can add) that fetches your latest opportunities from HighLevel. AI analyzes the lead’s message, a quick formatting step cleans up the response, and conditional checks send the lead to the correct team inbox. Done.
What Changes: Before vs. After
| What This Eliminates | Impact You’ll See |
|---|---|
|
|
Real-World Impact
Say you get 20 new opportunities a day. If a teammate spends maybe 6 minutes per lead to open HighLevel, check the contact profile, interpret the notes, then forward it to the right inbox, that’s about 2 hours daily of pure triage. With this workflow, the “human time” is closer to a quick glance at the routed email (call it a minute per lead), while n8n and Azure OpenAI handle the classification in the background. You’re still reviewing leads, but you’re not doing the sorting and forwarding work anymore.
Requirements
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- HighLevel (GHL) for opportunities and contact profiles.
- Gmail to route leads into the right inbox.
- Azure OpenAI API access (get it from your Azure OpenAI resource in the Azure Portal)
Skill level: Intermediate. You’ll connect accounts, add credentials, and adjust a couple of routing rules (no heavy coding).
Need help implementing this? Talk to an automation expert (free 15-minute consultation).
The Workflow Flow
A run is triggered from n8n. In this template it’s manual, which is handy for testing, but you can switch it to a schedule so it runs every few minutes without anyone touching it.
HighLevel opportunities are fetched and enriched. The workflow pulls a batch of opportunities, then retrieves each contact profile so the AI and your team emails include real names, emails, and message notes.
AI classifies intent. An AI Agent using Azure OpenAI GPT-4o-mini reads the lead’s message and outputs a clean intent label (demo, support, or partnership), then a small transformation step formats that result so routing rules are reliable.
Gmail routing happens automatically. Conditional checks decide which path the lead goes down, and the workflow sends a formatted email to the right inbox so your team can respond immediately with full context.
You can easily modify the three intent categories to match your business (for example, “billing” or “cancellation”) based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Manual Trigger
Start the workflow with the manual trigger to run tests on demand.
- Add and open Manual Execution Start.
- Leave all settings as default (no parameters required).
- Connect Manual Execution Start to Retrieve All Opportunities.
Step 2: Connect HighLevel Data Sources
Fetch opportunities and pull the matching contact profile for AI classification.
- Open Retrieve All Opportunities and set Resource to
opportunity, Operation togetAll, and Return All totrue. - Credential Required: Connect your
highLevelOAuth2Apicredentials in Retrieve All Opportunities. - Open Get Contact Profile and set Contact ID to
={{ $json.contactId }}and Operation toget. - Credential Required: Connect your
highLevelOAuth2Apicredentials in Get Contact Profile. - Confirm the connection flow: Retrieve All Opportunities → Get Contact Profile.
Step 3: Set Up AI Classification
Use the AI agent to interpret lead intent and prepare output for routing.
- Open AI Lead Triage Agent and set Prompt Type to
definewith Text set toYou are an AI lead router. Suggest the scope of lead. - Attach Azure GPT-4o Mini Model as the language model for AI Lead Triage Agent.
- Credential Required: Connect your
azureOpenAiApicredentials in Azure GPT-4o Mini Model (credentials should be added to the model node, not the agent). - Open Azure GPT-4o Mini Model and set Model to
gpt-4o-mini. - Connect the flow: Get Contact Profile → AI Lead Triage Agent → Transform AI Output.
Step 4: Configure Intent Routing Logic
Parse the AI response and branch into demo, support, or partnership workflows.
- Open Transform AI Output and paste the JavaScript in JS Code:
// Loop over input items and add a new field called 'myNewField' to the JSON of each one for (const item of $input.all()) { item.json.myNewField = 1; } return $input.all();- Configure Validate Demo Intent with a string condition where Value 1 is
={{$json["choices"][0]["message"]["content"]}}, Operation iscontains, and Value 2 isDemo. - Configure Validate Support Intent with Value 1 as
={{$json["choices"][0]["message"]["content"]}}, Operationcontains, and Value 2Support. - Configure Validate Partnership Intent with Value 1 as
={{$json["choices"][0]["message"]["content"]}}, Operationcontains, and Value 2Partnership.
Transform AI Output outputs to both Validate Demo Intent and Validate Support Intent and Validate Partnership Intent in parallel.
Step 5: Configure Email Dispatch Actions
Send the right email notification based on the classified intent.
- Open Dispatch Demo Email and set Subject to
New Demo Request Lead, To Email to[YOUR_EMAIL], and From Email to[YOUR_EMAIL]. - Set Text in Dispatch Demo Email to
Lead Details: Name: {{$json["contact"].firstName}} {{$json["contact"].lastName}} Email: {{$json["contact"].email}} Message: {{$json["contact"].notes}}. - Credential Required: Connect your
smtpcredentials in Dispatch Demo Email. - Repeat the same configuration for Dispatch Support Email (subject
New Support Query Lead) and Dispatch Partnership Email (subjectNew Partnership Lead). - Credential Required: Connect your
smtpcredentials in Dispatch Support Email and Dispatch Partnership Email.
Step 6: Test and Activate Your Workflow
Run a manual test to ensure intents route to the correct email notifications.
- Click Execute Workflow from Manual Execution Start to run a test.
- Verify that Retrieve All Opportunities and Get Contact Profile return valid lead data.
- Confirm that AI Lead Triage Agent outputs intent text that includes Demo, Support, or Partnership.
- Check that exactly one of the three email nodes sends a message based on the intent.
- When satisfied, toggle the workflow to Active for production use.
Watch Out For
- HighLevel credentials can expire or need specific permissions. If things break, check your HighLevel API key and app access settings first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Common Questions
About an hour if your HighLevel, Gmail, and Azure OpenAI access are ready.
Yes, but you will want someone comfortable with connecting credentials. No coding is required beyond minor copy edits to the AI prompt and email templates.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Azure OpenAI usage costs, which depend on how many leads you classify.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Start by editing the AI Lead Triage Agent prompt so it reflects your real categories and examples from your business. You can add more branches by duplicating the existing “Validate Demo Intent / Dispatch Demo Email” pattern, then changing the condition and destination inbox. If you don’t want Gmail, swap the email send step to Slack notifications or a helpdesk tool, while keeping the same AI classification and Transform AI Output logic.
Usually it’s an expired or rotated HighLevel API key. Update the credentials in n8n, then confirm the HighLevel account has access to opportunities and contacts; missing scopes can block the Get Contact Profile call. If it fails only on bigger batches, you may be hitting rate limits, so reduce how many opportunities you pull per run or add a short delay between items.
It scales to hundreds of leads a day on a typical n8n setup.
For this workflow, n8n is usually a better fit because the AI Agent logic, conditional routing, and data transformation are easier to control without getting pushed into expensive “premium” tiers. Self-hosting also removes execution ceilings, which matters when lead volume spikes. Zapier or Make can still work if you only need a simple 2-path router and you don’t care about deep prompt control. The tradeoff is flexibility versus convenience. Talk to an automation expert if you’re not sure which fits.
Once this is running, leads stop floating around your business unanswered. The workflow handles the sorting, and your team focuses on replying fast with the right context.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.