GPT-4o-mini を使って Intercom メッセージを分類し、ClickUp または Slack にルーティング
中級
これはAI Summarization, Multimodal AI分野の自動化ワークフローで、14個のノードを含みます。主にIf, Code, Slack, ClickUp, Webhookなどのノードを使用。 GPT-4o-mini を使用してインターコム メッセージを分類し、ClickUp または Slack にルーティングする
前提条件
- •Slack Bot Token または Webhook URL
- •HTTP Webhookエンドポイント(n8nが自動生成)
- •OpenAI API Key
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"meta": {
"instanceId": "EXAMPLE_INSTANCE_ID",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "c9ffdea8-c384-4ec1-ba34-f228c1ec6694",
"name": "📨 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": "🧠 分類器 – AIプロンプト",
"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": "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": "🧮 分類処理",
"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": "🛠️ サポート依頼か?",
"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": "📦 製品依頼か?",
"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": "💼 営業依頼か?",
"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": "🧾 サポートタスク作成",
"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": "🛍️ 製品タスク作成",
"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 – 営業チームに通知",
"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": "付箋",
"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": "付箋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": "付箋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": "付箋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
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
中級 - AI要約, マルチモーダルAI
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
15 - LeadFlow オートメーション
OpenAI GPT-4O、HubSpot、Slack、Google Sheetsを使ってGmailのリードフォローアップを自動化
If
Set
Code
+
If
Set
Code
14 ノードAvkash Kakdiya
AI要約
12 - インテリジェントリードエンハンサー
AIベースのリード情報強化:TypeformとCalendlyからHubSpot CRMへ
If
Code
Merge
+
If
Code
Merge
13 ノードAvkash Kakdiya
AI要約
16 - InsightMark:AI駆動のコメント分析
GPT-4を使用してフォームフィードバックを分析し、タスクをMonday、ClickUp、HubSpotに同期
Code
Click Up
Hubspot
+
Code
Click Up
Hubspot
13 ノードAvkash Kakdiya
AI要約
09 - リードプロフィール強化ツール
自動化されたリード情報の豊富さとパーソナライズされたアウトレーシュ:HubSpot、Phantombuster、GPT
If
Set
Code
+
If
Set
Code
30 ノードAvkash Kakdiya
リードナーチャリング
Notion アイデア収集ツール
GPT-4o-mini、Notion、Slack通知を使ってアイデアをキャプチャーして処理
Code
Slack
Notion
+
Code
Slack
Notion
9 ノードAvkash Kakdiya
コンテンツ作成
LeadFusion - AIリードエンリッチメントワークフロー
GPT-4oを活用したAIリードスコアリングとエンリッチメント(MailchimpからHubSpotおよびPipedriveへ)
If
Code
Hubspot
+
If
Code
Hubspot
13 ノードAvkash Kakdiya
コンテンツ作成
ワークフロー情報
難易度
中級
ノード数14
カテゴリー2
ノードタイプ8
作成者
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.
外部リンク
n8n.ioで表示 →
このワークフローを共有