Marquage et routage intelligent des prospects

Avancé

Ceci est unLead Generation, AI Summarizationworkflow d'automatisation du domainecontenant 17 nœuds.Utilise principalement des nœuds comme If, Code, EmailSend, HighLevel, ManualTrigger. Classification et routage des prospects pilotés par l'IA, basés sur HighLevel et Azure GPT-4o-mini

Prérequis
  • Clé API OpenAI
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "id": "roVzAsXzSDUWxYQb",
  "meta": {
    "instanceId": "8443f10082278c46aa5cf3acf8ff0f70061a2c58bce76efac814b16290845177",
    "templateCredsSetupCompleted": true
  },
  "name": "Smart Lead Tagging & Routing",
  "tags": [],
  "nodes": [
    {
      "id": "14abd76c-5099-45d6-9ff3-f95af9f47056",
      "name": "Lors du clic sur 'Exécuter le workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -2640,
        736
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "73d64595-b0ba-4a49-b03e-aeeff73b40be",
      "name": "Note - Vue d'ensemble du workflow",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3072,
        592
      ],
      "parameters": {
        "color": 4,
        "width": 360,
        "height": 352,
        "content": "## 🤖 AI-POWERED LEAD ROUTING WORKFLOW\n\nThis workflow uses AI to intelligently categorize and route leads:\n\n1. Fetches opportunities from HighLevel\n2. Gets contact details for each opportunity\n3. AI analyzes lead intent (Demo/Support/Partnership)\n4. Routes leads to appropriate teams via email\n\n**Trigger:** Manual execution\n**AI Model:** Azure OpenAI GPT-4o-mini"
      },
      "typeVersion": 1
    },
    {
      "id": "ff1ad33d-0c3d-465d-a509-ca49f0b2a5d5",
      "name": "Note - Collecte des données",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2416,
        384
      ],
      "parameters": {
        "color": 5,
        "width": 320,
        "height": 304,
        "content": "## 📥 DATA COLLECTION PHASE\n\n**Step 1:** Fetch all opportunities from HighLevel CRM\n**Step 2:** Get detailed contact information for each opportunity\n\nThis provides complete lead data (name, email, notes) needed for AI analysis.\n\n**Output:** Enriched lead data ready for AI processing"
      },
      "typeVersion": 1
    },
    {
      "id": "dfa52319-320d-475b-9262-b8f624f53013",
      "name": "Note - Analyse IA",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2080,
        1072
      ],
      "parameters": {
        "color": 6,
        "width": 340,
        "height": 280,
        "content": "## 🧠 AI ANALYSIS PHASE\n\n**AI Agent:** Analyzes lead message/notes to determine intent\n\n**Azure OpenAI Model:** GPT-4o-mini processes contact data and classifies leads\n\n**Prompt:** \"You are an AI lead router. Suggest the scope of lead\"\n\n**Output:** AI classification (Demo Request, Support Query, or Partnership Inquiry)"
      },
      "typeVersion": 1
    },
    {
      "id": "52a4bef2-ff2f-4c34-ac9e-aea35f8c6f89",
      "name": "Note - Logique de routage",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -816,
        624
      ],
      "parameters": {
        "color": 7,
        "width": 360,
        "height": 352,
        "content": "## 🔀 INTELLIGENT ROUTING\n\nBased on AI classification, leads are routed to:\n\n**🎯 Demo Requests** → demo@company.com\n**🛠️ Support Queries** → support@company.com\n**🤝 Partnership Inquiries** → partnership@company.com\n\nEach email includes:\n- Contact name\n- Email address\n- Original message/notes\n\nEnsures leads reach the right team instantly!"
      },
      "typeVersion": 1
    },
    {
      "id": "ce2aa645-d4a4-401b-afd2-2de399a3590a",
      "name": "Note - Traitement",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1776,
        368
      ],
      "parameters": {
        "color": 3,
        "width": 280,
        "height": 316,
        "content": "## ⚙️ POST-PROCESSING\n\nJavaScript code node that processes AI output and prepares data for routing conditions.\n\n**Purpose:** Transforms AI response into usable format for conditional branching.\n\n**Note:** Consider updating this node's logic based on specific AI response structure."
      },
      "typeVersion": 1
    },
    {
      "id": "2b1578f2-7e7f-4874-8481-7e615ade490a",
      "name": "Vérifier : Demande de démo ?",
      "type": "n8n-nodes-base.if",
      "position": [
        -1392,
        656
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json[\"choices\"][0][\"message\"][\"content\"]}}",
              "value2": "Demo",
              "operation": "contains"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d2b3fe52-4857-4031-9ef1-e689678b3ef8",
      "name": "Router vers l'équipe Démo",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        -1088,
        544
      ],
      "parameters": {
        "text": "Lead Details:\n\nName: {{$json[\"contact\"].firstName}} {{$json[\"contact\"].lastName}}\nEmail: {{$json[\"contact\"].email}}\nMessage: {{$json[\"contact\"].notes}}",
        "options": {},
        "subject": "New Demo Request Lead",
        "toEmail": "demo@company.com",
        "fromEmail": "noreply@company.com"
      },
      "credentials": {
        "smtp": {
          "id": null,
          "name": "Your SMTP Credential"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "9d878a92-9ffe-4c9b-aea5-9d54c750ae0e",
      "name": "Vérifier : Requête de support ?",
      "type": "n8n-nodes-base.if",
      "position": [
        -1392,
        848
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json[\"choices\"][0][\"message\"][\"content\"]}}",
              "value2": "Support",
              "operation": "contains"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "1e6fabeb-1f5d-4715-b579-483b99249102",
      "name": "Router vers l'équipe Support",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        -1088,
        800
      ],
      "parameters": {
        "text": "Lead Details:\n\nName: {{$json[\"contact\"].firstName}} {{$json[\"contact\"].lastName}}\nEmail: {{$json[\"contact\"].email}}\nMessage: {{$json[\"contact\"].notes}}",
        "options": {},
        "subject": "New Support Query Lead",
        "toEmail": "support@company.com",
        "fromEmail": "noreply@company.com"
      },
      "credentials": {
        "smtp": {
          "id": null,
          "name": "Your SMTP Credential"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "649aa2c1-f3e0-4da9-8a4a-9077273a55f8",
      "name": "Vérifier : Demande de partenariat ?",
      "type": "n8n-nodes-base.if",
      "position": [
        -1392,
        1056
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json[\"choices\"][0][\"message\"][\"content\"]}}",
              "value2": "Partnership",
              "operation": "contains"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "dc06d9fa-a7c1-4cc2-9161-231ac977e44f",
      "name": "Router vers l'équipe Partenariats",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        -1088,
        1008
      ],
      "parameters": {
        "text": "Lead Details:\n\nName: {{$json[\"contact\"].firstName}} {{$json[\"contact\"].lastName}}\nEmail: {{$json[\"contact\"].email}}\nMessage: {{$json[\"contact\"].notes}}",
        "options": {},
        "subject": "New Partnership Lead",
        "toEmail": "partnership@company.com",
        "fromEmail": "noreply@company.com"
      },
      "credentials": {
        "smtp": {
          "id": null,
          "name": "Your SMTP Credential"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "050df426-cc6c-42d4-9d98-7af4752f1e97",
      "name": "Agent de Classification IA des Prospects",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1984,
        736
      ],
      "parameters": {
        "text": "You are an AI lead router. Suggest the scope of lead",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "dbc6739b-dd49-481a-9b77-d7303229142f",
      "name": "Récupérer toutes les opportunités",
      "type": "n8n-nodes-base.highLevel",
      "position": [
        -2400,
        736
      ],
      "parameters": {
        "filters": {},
        "resource": "opportunity",
        "operation": "getAll",
        "returnAll": true,
        "requestOptions": {}
      },
      "credentials": {
        "highLevelOAuth2Api": {
          "id": "5QWHSi134dLIBEsC",
          "name": "HighLevel account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "bd6b5b4f-a0aa-42c9-8f00-ea15de067a70",
      "name": "Azure OpenAI GPT-4o-mini",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        -2016,
        928
      ],
      "parameters": {
        "model": "gpt-4o-mini",
        "options": {}
      },
      "credentials": {
        "azureOpenAiApi": {
          "id": "C3WzT18XqF8OdVM6",
          "name": "Azure Open AI account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "91516bae-94ac-4647-8985-4eca9526d15e",
      "name": "Traiter la réponse IA",
      "type": "n8n-nodes-base.code",
      "position": [
        -1632,
        736
      ],
      "parameters": {
        "jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nfor (const item of $input.all()) {\n  item.json.myNewField = 1;\n}\n\nreturn $input.all();"
      },
      "typeVersion": 2
    },
    {
      "id": "fe176854-c40c-4925-abef-2826261ff25b",
      "name": "Récupérer les détails du contact",
      "type": "n8n-nodes-base.highLevel",
      "position": [
        -2192,
        736
      ],
      "parameters": {
        "contactId": "={{ $json.contactId }}",
        "operation": "get",
        "requestOptions": {}
      },
      "credentials": {
        "highLevelOAuth2Api": {
          "id": "5QWHSi134dLIBEsC",
          "name": "HighLevel account"
        }
      },
      "typeVersion": 2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "3e6ac3e5-2786-42fb-b411-3ec2064cbdd9",
  "connections": {
    "91516bae-94ac-4647-8985-4eca9526d15e": {
      "main": [
        [
          {
            "node": "2b1578f2-7e7f-4874-8481-7e615ade490a",
            "type": "main",
            "index": 0
          },
          {
            "node": "9d878a92-9ffe-4c9b-aea5-9d54c750ae0e",
            "type": "main",
            "index": 0
          },
          {
            "node": "649aa2c1-f3e0-4da9-8a4a-9077273a55f8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2b1578f2-7e7f-4874-8481-7e615ade490a": {
      "main": [
        [
          {
            "node": "d2b3fe52-4857-4031-9ef1-e689678b3ef8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9d878a92-9ffe-4c9b-aea5-9d54c750ae0e": {
      "main": [
        [
          {
            "node": "1e6fabeb-1f5d-4715-b579-483b99249102",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fe176854-c40c-4925-abef-2826261ff25b": {
      "main": [
        [
          {
            "node": "050df426-cc6c-42d4-9d98-7af4752f1e97",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "dbc6739b-dd49-481a-9b77-d7303229142f": {
      "main": [
        [
          {
            "node": "fe176854-c40c-4925-abef-2826261ff25b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "050df426-cc6c-42d4-9d98-7af4752f1e97": {
      "main": [
        [
          {
            "node": "91516bae-94ac-4647-8985-4eca9526d15e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bd6b5b4f-a0aa-42c9-8f00-ea15de067a70": {
      "ai_languageModel": [
        [
          {
            "node": "050df426-cc6c-42d4-9d98-7af4752f1e97",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "649aa2c1-f3e0-4da9-8a4a-9077273a55f8": {
      "main": [
        [
          {
            "node": "dc06d9fa-a7c1-4cc2-9161-231ac977e44f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "14abd76c-5099-45d6-9ff3-f95af9f47056": {
      "main": [
        [
          {
            "node": "dbc6739b-dd49-481a-9b77-d7303229142f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Avancé - Génération de leads, Résumé IA

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Avancé
Nombre de nœuds17
Catégorie2
Types de nœuds8
Description de la difficulté

Adapté aux utilisateurs avancés, avec des workflows complexes contenant 16+ nœuds

Auteur
Rahul Joshi

Rahul Joshi

@rahul08

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.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34