Automatisation de la qualification des prospects et du support client avec un agent GPT-4o-mini
Ceci est unLead Nurturing, AI Chatbotworkflow d'automatisation du domainecontenant 16 nœuds.Utilise principalement des nœuds comme If, Set, Code, ManualTrigger, Agent. Automatisation de la qualification des prospects et du support client avec des agents GPT-4o-mini
- •Clé API OpenAI
Nœuds utilisés (16)
Catégorie
{
"meta": {
"instanceId": "efb474b59b0341d7791932605bd9ff04a6c7ed9941fdd53dc4a2e4b99a6f9439"
},
"nodes": [
{
"id": "9b686668-2c0e-4c1d-908f-c2954e67b0da",
"name": "À la réception d'un message chat",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
20,
580
],
"webhookId": "e104e40e-6134-4825-a6f0-8a646d882662",
"parameters": {
"public": true,
"options": {}
},
"typeVersion": 1.1
},
{
"id": "851344f4-1862-4bc6-9ea6-1f17831a706f",
"name": "En cliquant sur 'Tester le workflow'",
"type": "n8n-nodes-base.manualTrigger",
"position": [
0,
0
],
"parameters": {},
"typeVersion": 1
},
{
"id": "a6e3505c-3e7d-43d1-bfb4-b3c2b0a44e46",
"name": "OpenAI Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
400,
300
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "ghJTvay8CvwXDsXz",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "243b3744-ada2-4eaa-bcaf-3ae91e3a4441",
"name": "Analyseur de sortie structurée",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
600,
300
],
"parameters": {
"jsonSchemaExample": "{\n \"Name\": \"Alex Chen\",\n \"Is Good Lead\": \"No\",\n \"Reasoning\": \"The customer is interested in buying a single item for personal use.\"\n}\n"
},
"typeVersion": 1.2
},
{
"id": "5177741d-236d-47a6-9ac8-9cb46ba1a3f1",
"name": "Modifier les champs1",
"type": "n8n-nodes-base.set",
"position": [
780,
40
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "948759d1-4c0c-4751-a83d-9daa1ec3bb1c",
"name": "Name",
"type": "string",
"value": "={{$json[\"output\"][\"Name\"]}}"
},
{
"id": "91dbdf7b-8f0d-4ae2-ab36-701b01b581e2",
"name": "Good Lead",
"type": "string",
"value": "={{$json[\"output\"][\"Is Good Lead\"]}}"
},
{
"id": "5d38cd05-eb1a-4734-83d2-cdd5ee973ea7",
"name": "Reasoning",
"type": "string",
"value": "={{ $json.output.Reasoning }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "7261e97b-e056-44f5-a98e-b62641ed137e",
"name": "OpenAI Chat Model2",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
240,
800
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "ghJTvay8CvwXDsXz",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "a9207b97-4599-44d4-9cfe-a38d6a5976c0",
"name": "Mémoire simple",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
420,
820
],
"parameters": {
"contextWindowLength": 10
},
"typeVersion": 1.3
},
{
"id": "162bcc59-f8ac-4468-900a-a65f52320ec8",
"name": "Note adhésive",
"type": "n8n-nodes-base.stickyNote",
"position": [
-180,
-60
],
"parameters": {
"width": 1300,
"height": 500,
"content": "## Lead Qualifier Agent\n"
},
"typeVersion": 1
},
{
"id": "45e03054-92b4-4fbb-a9f0-a65bd024f972",
"name": "Note adhésive1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-180,
460
],
"parameters": {
"color": 5,
"width": 1300,
"height": 540,
"content": "## Ecommerce Chatbot\n"
},
"typeVersion": 1
},
{
"id": "19c265f1-ac38-472f-a975-4674a42f89ef",
"name": "Créer des données d'exemple",
"type": "n8n-nodes-base.code",
"position": [
200,
40
],
"parameters": {
"jsCode": "return [\n {\n json: {\n name: \"Jordan Lee\",\n transcript: \"Hi, I'm looking to place a large order of custom mugs for an upcoming corporate event. Probably around 300 units.\"\n }\n },\n {\n json: {\n name: \"Alex Chen\",\n transcript: \"Do you sell just one of these backpacks? I’m shopping for my daughter.\"\n }\n },\n {\n json: {\n name: \"Samira Patel\",\n transcript: \"We’re exploring gifts for our team and might want to add a logo. What's your bulk pricing on notebooks?\"\n }\n },\n {\n json: {\n name: \"Marcus Grant\",\n transcript: \"Just checking shipping times for a single product before I order. Thanks.\"\n }\n }\n];\n"
},
"typeVersion": 2
},
{
"id": "dbf6ef88-e1c3-4cd7-95e9-9fa47b2d81b4",
"name": "Agent de qualification des leads",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
400,
40
],
"parameters": {
"text": "=Name: {{$json[\"name\"]}}\nTranscript: {{$json[\"transcript\"]}}\n",
"options": {
"systemMessage": "You are a lead qualification assistant for an ecommerce store. Your job is to determine if a customer from a phone call is a good lead for a **bulk order**.\n\nIf they mention:\n- large quantities\n- logos\n- team gifts\n- events\n- wholesale\n- or any indication of buying in bulk\n\nThen classify them as a **good lead**. Otherwise, mark them as not a good lead.\n\nRespond only in valid JSON with:\n- \"Name\": customer’s name\n- \"Is Good Lead\": Yes or No\n- \"Reasoning\": short one-sentence reason"
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.8
},
{
"id": "ef1d7730-6945-4dc6-b8d1-0d8b48c29b10",
"name": "Chatbot e-commerce",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
300,
580
],
"parameters": {
"options": {
"systemMessage": "👋 Hi there! I'm your personal assistant here to help you with anything related to our ecommerce store.\n\nI can assist you with:\n- Product information\n- Bulk orders\n- Pricing questions\n- Customization options (like adding a logo)\n- Shipping times and return policies\n\nHere’s how I work:\n- I know the details of our products, pricing, and bulk order discounts.\n- I respond politely, professionally, and clearly.\n- If you're placing a bulk order, I’ll ask for the quantity you need, when you need it, and whether you have your artwork or logo ready.\n\n## Product Pricing (Standard Retail):\n- **Custom Notebook**: $12.00 each \n- **Eco Water Bottle**: $15.00 each \n- **Enamel Mug**: $10.00 each \n- **Canvas Tote Bag**: $14.00 each\n\n## Bulk Discount Tiers:\n- 50+ units: 10% off \n- 100+ units: 15% off \n- 250+ units: 20% off \n- 500+ units: 25% off \n*Discounts apply per product type and are automatically calculated.*\n\n## Shipping & Returns:\n- Standard shipping: 3–5 business days \n- Bulk orders may take 7–14 business days depending on customization\n- Returns accepted within 30 days for non-customized items\n\n## Rules:\n- Be honest and helpful\n- Never make up data or offer discounts outside the tiers above\n- If unsure about something, say a team member will follow up\n- If the customer mentions a bulk order, ask how many units they need and if they have artwork ready\n\n\n- if the customer has confirmed they want to place an order output ***** along with the response. \n\nJust ask your question, and I’ll take it from there!\n"
}
},
"typeVersion": 1.8
},
{
"id": "052a2f31-f0fa-41ff-be09-121b7ac2f9f1",
"name": "Tester si la conversation est terminée",
"type": "n8n-nodes-base.if",
"position": [
640,
600
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "a3eb2967-e920-4342-ad2b-a2ae3b972955",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.output }}",
"rightValue": "*****"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "973fc612-a2ff-4105-8b58-ab1c22f171ba",
"name": "Répondre à l'utilisateur",
"type": "n8n-nodes-base.noOp",
"position": [
860,
720
],
"parameters": {},
"typeVersion": 1
},
{
"id": "e7401017-be65-4e75-8cd3-1af132116108",
"name": "Terminer la conversation",
"type": "n8n-nodes-base.code",
"position": [
880,
500
],
"parameters": {
"jsCode": "let text = \"Your order has been placed\"\n\nreturn {text}\n \n "
},
"typeVersion": 2
},
{
"id": "d2055f0c-81ce-4b83-9541-12634e4fc75c",
"name": "Note adhésive2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-900,
-60
],
"parameters": {
"color": 4,
"width": 680,
"height": 1060,
"content": "### Need help? \nEmail **rbreen@ynteractive.com**\n\n---\n\n### How to Install & Run\n\n1. **Import the workflow** \n - n8n → **Workflows → Import from File** (or **Paste JSON**) → **Save**\n\n2. **Add your OpenAI API key** \n - n8n → **Credentials → New → OpenAI API** \n - Paste the key from <https://platform.openai.com> \n - Select this credential in both **OpenAI Chat Model** nodes\n\n3. **(Optional) Choose another model** \n - Default model: **gpt‑4o‑mini** \n - Open each **OpenAI Chat Model** node → choose **GPT‑4o**, **GPT‑3.5‑turbo**, etc.\n\n4. **Test the Lead‑Qualifier Task Automator** \n - Click **Activate** \n - Press **Test workflow** \n - Sample transcripts run; each item returns JSON with **Name**, **Is Good Lead**, **Reasoning**\n\n5. **Test the Ecommerce Chatbot** \n - Copy the **Webhook URL** from **When chat message received** \n - POST example payload: \n ```json\n { \"message\": \"Hi, do you offer discounts if I buy 120 notebooks?\" }\n ``` \n - Chatbot replies with pricing details \n - If the response contains `*****`, the **If** node sends: **“Your order has been placed”**\n\n---\n\n### Customization Ideas\n\n- Edit prompts to change lead‑qualification rules or chatbot dialogue \n- Add Google Sheets, Airtable, or database nodes to store qualified leads \n- Integrate inventory, shipping, or payment APIs \n- Adjust the **Simple Memory** node’s window size to remember more conversation context\n"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"a9207b97-4599-44d4-9cfe-a38d6a5976c0": {
"ai_memory": [
[
{
"node": "ef1d7730-6945-4dc6-b8d1-0d8b48c29b10",
"type": "ai_memory",
"index": 0
}
]
]
},
"ef1d7730-6945-4dc6-b8d1-0d8b48c29b10": {
"main": [
[
{
"node": "052a2f31-f0fa-41ff-be09-121b7ac2f9f1",
"type": "main",
"index": 0
}
]
]
},
"19c265f1-ac38-472f-a975-4674a42f89ef": {
"main": [
[
{
"node": "dbf6ef88-e1c3-4cd7-95e9-9fa47b2d81b4",
"type": "main",
"index": 0
}
]
]
},
"a6e3505c-3e7d-43d1-bfb4-b3c2b0a44e46": {
"ai_languageModel": [
[
{
"node": "dbf6ef88-e1c3-4cd7-95e9-9fa47b2d81b4",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"7261e97b-e056-44f5-a98e-b62641ed137e": {
"ai_languageModel": [
[
{
"node": "ef1d7730-6945-4dc6-b8d1-0d8b48c29b10",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"dbf6ef88-e1c3-4cd7-95e9-9fa47b2d81b4": {
"main": [
[
{
"node": "5177741d-236d-47a6-9ac8-9cb46ba1a3f1",
"type": "main",
"index": 0
}
]
]
},
"243b3744-ada2-4eaa-bcaf-3ae91e3a4441": {
"ai_outputParser": [
[
{
"node": "dbf6ef88-e1c3-4cd7-95e9-9fa47b2d81b4",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"9b686668-2c0e-4c1d-908f-c2954e67b0da": {
"main": [
[
{
"node": "ef1d7730-6945-4dc6-b8d1-0d8b48c29b10",
"type": "main",
"index": 0
}
]
]
},
"052a2f31-f0fa-41ff-be09-121b7ac2f9f1": {
"main": [
[
{
"node": "e7401017-be65-4e75-8cd3-1af132116108",
"type": "main",
"index": 0
}
],
[
{
"node": "973fc612-a2ff-4105-8b58-ab1c22f171ba",
"type": "main",
"index": 0
}
]
]
},
"851344f4-1862-4bc6-9ea6-1f17831a706f": {
"main": [
[
{
"node": "19c265f1-ac38-472f-a975-4674a42f89ef",
"type": "main",
"index": 0
}
]
]
}
}
}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é - Nurturing de leads, Chatbot 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.
Workflows recommandés
Robert Breen
@rbreenProfessional services consultant with over 10 years of experience solving complex business problems across industries. I specialize in n8n and process automation—designing custom workflows that integrate tools like Google Calendar, Airtable, GPT, and internal systems. Whether you need to automate scheduling, sync data, or streamline operations, I build solutions that save time and drive results.
Partager ce workflow