Classer les messages Intercom en utilisant GPT-4o-mini et les router vers ClickUp ou Slack
Ceci est unAI Summarization, Multimodal AIworkflow d'automatisation du domainecontenant 14 nœuds.Utilise principalement des nœuds comme If, Code, Slack, ClickUp, Webhook. Classer les messages Intercom et les acheminer vers ClickUp ou Slack en utilisant GPT-4o-mini
- •Token Bot Slack ou URL Webhook
- •Point de terminaison HTTP Webhook (généré automatiquement par n8n)
- •Clé API OpenAI
Nœuds utilisés (14)
Catégorie
{
"meta": {
"instanceId": "EXAMPLE_INSTANCE_ID",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "c9ffdea8-c384-4ec1-ba34-f228c1ec6694",
"name": "📨 Réception Intercom Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
-1160,
160
],
"webhookId": "your-webhook-id-here",
"parameters": {
"path": "your-webhook-path-here",
"options": {},
"httpMethod": "POST"
},
"typeVersion": 1
},
{
"id": "74f38000-b249-404d-b430-7d864652d00f",
"name": "🧠 Classificateur – Invite IA",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-920,
160
],
"parameters": {
"text": "You are an AI assistant designed to analyze customer conversations from Intercom. Your task is to classify each conversation into structured fields for workflow automation.\n\nConversation: {{ $json[\"data\"][\"item\"] }}\n\nBased on the provided conversation JSON, respond ONLY with a valid JSON object in the following format:\n\n{\n \"category\": \"<Support | Product | Sales | Other>\",\n \"sentiment\": \"<Positive | Neutral | Negative>\",\n \"urgency\": \"<High | Medium | Low>\",\n \"reasoning\": \"<Brief explanation of how you classified it>\",\n \"tags\": [\"tag1\", \"tag2\"]\n}\n\nGuidelines:\n- \"category\": Determine the main topic. Use:\n - \"Support\" for help requests, bugs, technical issues, etc.\n - \"Product\" for feature requests, feedback, or UX issues.\n - \"Sales\" for pricing, demo, onboarding, or enterprise inquiries.\n - \"Other\" if it doesn't fit above.\n- \"sentiment\": Analyze customer tone. Choose Positive, Neutral, or Negative.\n- \"urgency\": \n - High = frustrated users, urgent bug, blocked access.\n - Medium = requesting help soon, moderately concerned.\n - Low = casual inquiry, general feedback.\n- \"reasoning\": Explain how you decided on the classification.\n- \"tags\": Suggest 2–4 keywords as tags based on context (e.g., \"billing\", \"login\", \"onboarding\").\n\nOnly output valid JSON. Do NOT include explanations or extra text outside the JSON.",
"options": {},
"promptType": "define"
},
"typeVersion": 2
},
{
"id": "68ee4343-685a-4f13-b0a7-c57c271dafb0",
"name": "Modèle GPT (GPT-4o-mini)",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-832,
380
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "YOUR_OPENAI_CREDENTIAL_ID",
"name": "OpenAI API Key"
}
},
"typeVersion": 1.2
},
{
"id": "146ebc31-9ffa-4ade-954a-51bd561236ea",
"name": "🧮 Traiter la classification",
"type": "n8n-nodes-base.code",
"position": [
-544,
160
],
"parameters": {
"jsCode": "// Parse the OpenAI response and structure the data\nconst aiResponse = $input.first().json.choices[0].message.content;\n\ntry {\n const classification = JSON.parse(aiResponse);\n \n // Extract original conversation data\n const conversationData = $('📨 Intercom Webhook').first().json.data.item;\n \n return {\n json: {\n // Classification results\n category: classification.category,\n sentiment: classification.sentiment,\n urgency: classification.urgency,\n reasoning: classification.reasoning,\n tags: classification.tags || [],\n \n // Original conversation data\n conversation_id: conversationData.id,\n subject: conversationData.conversation_parts.conversation_parts[0].subject || 'No Subject',\n message: conversationData.conversation_parts.conversation_parts[0].body,\n customer_name: conversationData.user.name,\n customer_email: conversationData.user.email,\n created_at: conversationData.created_at,\n \n // Formatted data for tasks\n task_title: `[${classification.category.toUpperCase()}] ${conversationData.conversation_parts.conversation_parts[0].subject || 'Support Request'}`,\n task_description: `**Customer:** ${conversationData.user.name} (${conversationData.user.email})\\n\\n**Original Message:**\\n${conversationData.conversation_parts.conversation_parts[0].body}\\n\\n**AI Classification:**\\n- Category: ${classification.category}\\n- Sentiment: ${classification.sentiment}\\n- Urgency: ${classification.urgency}\\n- Reasoning: ${classification.reasoning}\\n\\n**Conversation ID:** ${conversationData.id}`\n }\n };\n} catch (error) {\n throw new Error(`Failed to parse AI response: ${error.message}`);\n}"
},
"typeVersion": 2
},
{
"id": "9ef8a0da-aae3-4c64-96cb-24ef077b389f",
"name": "🛠️ Demande de support ?",
"type": "n8n-nodes-base.if",
"position": [
-324,
-40
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "support_condition",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.category }}",
"rightValue": "Support"
}
]
}
},
"typeVersion": 2
},
{
"id": "5f505600-5d12-4e51-8799-823951346b3b",
"name": "📦 Demande produit ?",
"type": "n8n-nodes-base.if",
"position": [
-324,
160
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "product_condition",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.category }}",
"rightValue": "Product"
}
]
}
},
"typeVersion": 2
},
{
"id": "9565f5e6-d9ba-428d-a737-bce1eb24ebc9",
"name": "💼 Demande commerciale ?",
"type": "n8n-nodes-base.if",
"position": [
-324,
360
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "sales_condition",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.category }}",
"rightValue": "Sales"
}
]
}
},
"typeVersion": 2
},
{
"id": "a96be2e2-1e56-4ac6-a7e0-3815748277d0",
"name": "🧾 Créer tâche support",
"type": "n8n-nodes-base.clickUp",
"position": [
-104,
-40
],
"parameters": {
"list": "YOUR_CLICKUP_LIST_ID",
"name": "={{ $json.task_title }}",
"team": "YOUR_CLICKUP_TEAM_ID",
"space": "YOUR_CLICKUP_SPACE_NAME",
"folder": "YOUR_CLICKUP_FOLDER_NAME",
"authentication": "oAuth2",
"additionalFields": {
"tags": "={{ $json.tags.join(', ') }}",
"status": "YOUR_STATUS_NAME",
"priority": "={{ $json.urgency }}",
"assignees": "YOUR_ASSIGNEE_ID"
}
},
"credentials": {
"clickUpOAuth2Api": {
"id": "YOUR_CLICKUP_CREDENTIAL_ID",
"name": "ClickUp OAuth2 API"
}
},
"typeVersion": 1
},
{
"id": "257d17bf-5f65-43d9-a4c5-09cdf06c4e17",
"name": "🛍️ Créer tâche produit",
"type": "n8n-nodes-base.clickUp",
"position": [
-104,
160
],
"parameters": {
"list": "YOUR_CLICKUP_LIST_ID",
"name": "={{ $json.task_title }}",
"team": "YOUR_CLICKUP_TEAM_ID",
"space": "YOUR_CLICKUP_SPACE_NAME",
"folder": "YOUR_CLICKUP_FOLDER_NAME",
"authentication": "oAuth2",
"additionalFields": {
"tags": "={{ $json.tags.join(', ') }}",
"status": "YOUR_STATUS_NAME",
"priority": "={{ $json.urgency }}",
"assignees": "YOUR_ASSIGNEE_ID"
}
},
"credentials": {
"clickUpOAuth2Api": {
"id": "YOUR_CLICKUP_CREDENTIAL_ID",
"name": "ClickUp OAuth2 API"
}
},
"typeVersion": 1
},
{
"id": "6ba00f81-e6af-45b5-86ba-875fec8e30b1",
"name": "📣 Slack – Notifier l'équipe commerciale",
"type": "n8n-nodes-base.slack",
"position": [
-104,
360
],
"webhookId": "your-slack-webhook-id",
"parameters": {
"text": "🚨 New Sales Inquiry Alert!\n\n**Customer:** {{ $json.customer_name }} ({{ $json.customer_email }})\n**Subject:** {{ $json.subject }}\n**Sentiment:** {{ $json.sentiment }}\n**Urgency:** {{ $json.urgency }}\n\n**Message:**\n{{ $json.message }}\n\n**AI Reasoning:** {{ $json.reasoning }}\n\n**Conversation ID:** {{ $json.conversation_id }}",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "id",
"value": "YOUR_SLACK_CHANNEL_ID"
},
"otherOptions": {}
},
"credentials": {
"slackApi": {
"id": "YOUR_SLACK_CREDENTIAL_ID",
"name": "Slack API"
}
},
"typeVersion": 2.3
},
{
"id": "96a7c0c2-5b4c-4f13-aa55-d93de00e9401",
"name": "Note adhésive",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1300,
-180
],
"parameters": {
"color": 4,
"width": 320,
"height": 720,
"content": "## 📨 1. Webhook Intake\n\nPurpose:\n\n*Receives incoming conversation data from Intercom via a webhook (triggered on new messages).\n\nInput:\n\nFull conversation JSON\nCustomer name, email, and message content*"
},
"typeVersion": 1
},
{
"id": "4153b386-0f82-4da0-9d76-c52824ced79e",
"name": "Note adhésive 1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-960,
-240
],
"parameters": {
"color": 6,
"width": 540,
"height": 780,
"content": "## 🤖 2. AI Classification Engine\n\nHow it works:\n\n*The conversation is sent to an AI model with a prompt to classify it.\n\nAI responds with a structured JSON containing:\ncategory: Support | Product | Sales | Other\nsentiment: Positive | Neutral | Negative\nurgency: High | Medium | Low\nreasoning: Explanation for classification\ntags: Relevant keywords\n\nA code node parses this AI output and merges it with user + conversation details to prepare for task creation or routing.*"
},
"typeVersion": 1
},
{
"id": "65b8eff5-9782-403a-b01e-8f72f698ad1e",
"name": "Note adhésive 2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-400,
-300
],
"parameters": {
"color": 5,
"height": 840,
"content": "## 🔀 3. Conditional Routing\n\nLogic:\n\n*Each path checks the category returned by the AI.\n\nBased on category, it routes the conversation to the appropriate action.*"
},
"typeVersion": 1
},
{
"id": "415d9545-aa7b-405b-9aa4-50a02e938602",
"name": "Note adhésive 3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-140,
-400
],
"parameters": {
"color": 3,
"width": 260,
"height": 940,
"content": "## 📌 4. Action Handling 🧾 \n\n**🧾Support:**\n\nCreates a ClickUp task with title, description, priority, and tags.\n\n**📦 Product:**\nSame as Support – task created in ClickUp with relevant details.\n\n**📣 Sales:**\nSends a Slack message to the Sales team with AI's reasoning."
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"c9ffdea8-c384-4ec1-ba34-f228c1ec6694": {
"main": [
[
{
"node": "74f38000-b249-404d-b430-7d864652d00f",
"type": "main",
"index": 0
}
]
]
},
"9565f5e6-d9ba-428d-a737-bce1eb24ebc9": {
"main": [
[
{
"node": "6ba00f81-e6af-45b5-86ba-875fec8e30b1",
"type": "main",
"index": 0
}
]
]
},
"68ee4343-685a-4f13-b0a7-c57c271dafb0": {
"ai_languageModel": [
[
{
"node": "74f38000-b249-404d-b430-7d864652d00f",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"5f505600-5d12-4e51-8799-823951346b3b": {
"main": [
[
{
"node": "257d17bf-5f65-43d9-a4c5-09cdf06c4e17",
"type": "main",
"index": 0
}
]
]
},
"a96be2e2-1e56-4ac6-a7e0-3815748277d0": {
"main": [
[]
]
},
"9ef8a0da-aae3-4c64-96cb-24ef077b389f": {
"main": [
[
{
"node": "a96be2e2-1e56-4ac6-a7e0-3815748277d0",
"type": "main",
"index": 0
}
]
]
},
"146ebc31-9ffa-4ade-954a-51bd561236ea": {
"main": [
[
{
"node": "9ef8a0da-aae3-4c64-96cb-24ef077b389f",
"type": "main",
"index": 0
},
{
"node": "5f505600-5d12-4e51-8799-823951346b3b",
"type": "main",
"index": 0
},
{
"node": "9565f5e6-d9ba-428d-a737-bce1eb24ebc9",
"type": "main",
"index": 0
}
]
]
},
"74f38000-b249-404d-b430-7d864652d00f": {
"main": [
[
{
"node": "146ebc31-9ffa-4ade-954a-51bd561236ea",
"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é ?
Intermédiaire - Résumé IA, IA Multimodale
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
Avkash Kakdiya
@itechnotion🚀 Founder of iTechNotion — we build custom AI-powered automation workflows for startups, agencies, and founders. 💡 Specializing in agentic AI systems, content automation, sales funnels, and digital workers. 🔧 14+ years in tech | Building scalable no-code/low-code solutions using n8n, OpenAI, and other API-first tools. 📬 Let’s automate what slows you down.
Partager ce workflow