AI-Powered HighLevel Lead Routing and Intent Classification - n8n Workflow

Use this advanced n8n workflow to automatically fetch HighLevel opportunities, classify lead intent using Azure OpenAI GPT-4o-mini, and route leads instantly to the appropriate sales or support team via email. Perfect for high-volume CRM automation.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Sales Operations teams looking to instantly qualify and route leads based on AI analysis.
Businesses using HighLevel CRM needing intelligent automation without manual lead sorting.
Developers seeking robust n8n templates for integrating AI agents with core business systems.
Users aiming to leverage GPT-4o-mini for efficient lead categorization within an n8n environment.

Overview

Manual lead qualification and routing are time-consuming and prone to human error, especially in high-volume environments. This sophisticated n8n workflow solves this by introducing artificial intelligence into the critical path of lead management.

Starting with a manual n8n trigger, the system queries HighLevel for new opportunities. Crucially, the workflow uses the Azure OpenAI GPT-4o-mini model, configured via an n8n node, to analyze the context (notes, messages) of the lead. It classifies the intent into categories like 'Demo Request,' 'Support Query,' or 'Partnership Inquiry.' Based on this categorization, the lead is automatically routed to the correct internal team via email, ensuring the fastest possible response time and improving conversion rates. This powerful n8n template demonstrates effective integration between CRM, custom code, and generative AI.

How it Works

This automation begins with the Manual Trigger n8n trigger, designed for on-demand execution.


  1. Data Extraction: The first n8n node uses the HighLevel connector to Fetch All Opportunities and then proceeds to Fetch Contact Details for each unique lead ID, gathering necessary context like name, email, and notes.

  2. AI Analysis Setup: The collected data is fed into the AI Lead Classifier Agent n8n node. This agent is powered by the Azure OpenAI GPT-4o-mini n8n node, using a specific system prompt to act as an 'AI lead router' and suggest the scope of the lead.

  3. Data Transformation: The Process AI Response n8n node (a Code node) is used to stabilize and prepare the AI output, transforming the text response into a structured format suitable for subsequent conditional checks.

  4. Intelligent Routing: The workflow proceeds through a series of If n8n nodes (Check: Demo Request?, Check: Support Query?, Check: Partnership Inquiry?). These nodes analyze the AI's classification output (e.g., checking if the response 'contains' the word 'Demo').

  5. Final Action: Depending on the outcome of the conditional checks, the data is routed via an Email Send n8n node (using SMTP credentials) to the corresponding internal team ([email protected], [email protected], or [email protected]), completing this efficient n8n workflow.

Installation Guide

To deploy this comprehensive n8n workflow, follow these setup steps:


  1. Import: Copy the provided JSON data and paste it directly into your n8n instance using the 'New' > 'Import from JSON' option.

  2. HighLevel Credentials: Locate the Fetch All Opportunities and Fetch Contact Details n8n nodes. You must configure your HighLevel OAuth2 API credentials. Ensure the connection has permissions to read opportunities and contact details.

  3. Azure OpenAI Credentials: Configure the Azure OpenAI GPT-4o-mini n8n node with your Azure Open AI API credentials, ensuring the necessary keys and endpoint are correctly set up for the GPT-4o-mini model.

  4. SMTP Configuration: Update all three Route to... Team n8n node instances with your existing SMTP credentials so the n8n workflow can send outbound notifications.

  5. Activation: Once credentials are set, activate the n8n workflow to run it manually or integrate it into a scheduled process.

Node Details

This n8n template relies on several key nodes for its functionality:

When clicking ‘Execute workflow’ (Manual Trigger): The starting n8n trigger for the entire process, allowing for on-demand execution.
Fetch All Opportunities (HighLevel n8n node): Gathers all current opportunities from the HighLevel CRM, serving as the raw data input.
Fetch Contact Details (HighLevel n8n node): Extracts specific contact information (name, email, notes) required for the AI to make an informed decision.
AI Lead Classifier Agent (Langchain Agent n8n node): Defines the AI agent's role ('AI lead router') and sends the prompt to the language model. This is the core intelligence component of the n8n workflow.
Azure OpenAI GPT-4o-mini (Langchain LLM n8n node): The language model n8n node responsible for processing the input text and generating the classification (Demo, Support, Partnership).
Process AI Response (Code n8n node): Although containing placeholder code, its function is critical: to ensure the AI's complex JSON output is simplified and prepared for the downstream conditional n8n nodes.
Check: Demo Request? (If n8n node): This core flow control n8n node evaluates the AI's classification result to determine if the lead is a Demo Request. It drives the branching logic.
Route to Demo Team (Email Send n8n node): The final action n8n node that formats and sends an email containing all lead details to the dedicated demo team mailbox.

Related n8n Workflows

Free

Nodes: 8 Nodes
Updated: December 26 2025
View all
Created by

Rahul Joshi is a seasoned technology leader specializing in the n8n automation tool and AI-driven workflow automation. With deep expertise in building open-source workflow automation and self-hosted automation platforms, he helps organizations eliminate manual processes through intelligent n8n ai agent automation solutions.

Featured*