AutomationFlowsAI & RAG › Classify Intercom Messages & Route to Clickup or Slack with Gpt-4o-mini

Classify Intercom Messages & Route to Clickup or Slack with Gpt-4o-mini

ByAvkash Kakdiya @itechnotion on n8n.io

This workflow automates the classification and routing of incoming Intercom conversations. When a new customer message arrives, it is analyzed by AI to determine category, sentiment, urgency, and tags. Based on this classification, the workflow creates tasks in ClickUp for…

Webhook trigger★★★★☆ complexityAI-powered14 nodesAgentOpenAI ChatClickUpSlack
AI & RAG Trigger: Webhook Nodes: 14 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #7933 — we link there as the canonical source.

This workflow follows the Agent → OpenAI Chat recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "c9ffdea8-c384-4ec1-ba34-f228c1ec6694",
      "name": "\ud83d\udce8 Intercom Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1160,
        160
      ],
      "parameters": {
        "path": "your-webhook-path-here",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 1
    },
    {
      "id": "74f38000-b249-404d-b430-7d864652d00f",
      "name": "\ud83e\udde0 Classifier \u2013 AI prompt",
      "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\u20134 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 model (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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "146ebc31-9ffa-4ade-954a-51bd561236ea",
      "name": "\ud83e\uddee Process 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 = $('\ud83d\udce8 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": "\ud83d\udee0\ufe0f Is Support Request?",
      "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": "\ud83d\udce6 Is Product Request?",
      "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": "\ud83d\udcbc Is Sales Request?",
      "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": "\ud83e\uddfe Create Support Task",
      "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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "257d17bf-5f65-43d9-a4c5-09cdf06c4e17",
      "name": "\ud83d\udecd\ufe0f Create Product Task",
      "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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6ba00f81-e6af-45b5-86ba-875fec8e30b1",
      "name": "\ud83d\udce3 Slack \u2013 Notify Sales team",
      "type": "n8n-nodes-base.slack",
      "position": [
        -104,
        360
      ],
      "parameters": {
        "text": "\ud83d\udea8 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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "96a7c0c2-5b4c-4f13-aa55-d93de00e9401",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1300,
        -180
      ],
      "parameters": {
        "color": 4,
        "width": 320,
        "height": 720,
        "content": "## \ud83d\udce8 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": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        -240
      ],
      "parameters": {
        "color": 6,
        "width": 540,
        "height": 780,
        "content": "## \ud83e\udd16 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": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        -300
      ],
      "parameters": {
        "color": 5,
        "height": 840,
        "content": "## \ud83d\udd00 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": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -140,
        -400
      ],
      "parameters": {
        "color": 3,
        "width": 260,
        "height": 940,
        "content": "## \ud83d\udccc 4. Action Handling \ud83e\uddfe \n\n**\ud83e\uddfeSupport:**\n\nCreates a ClickUp task with title, description, priority, and tags.\n\n**\ud83d\udce6 Product:**\nSame as Support \u2013 task created in ClickUp with relevant details.\n\n**\ud83d\udce3 Sales:**\nSends a Slack message to the Sales team with AI's reasoning."
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "\ud83d\udce8 Intercom Webhook": {
      "main": [
        [
          {
            "node": "\ud83e\udde0 Classifier \u2013 AI prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udcbc Is Sales Request?": {
      "main": [
        [
          {
            "node": "\ud83d\udce3 Slack \u2013 Notify Sales team",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GPT model (gpt-4o-mini)": {
      "ai_languageModel": [
        [
          {
            "node": "\ud83e\udde0 Classifier \u2013 AI prompt",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udce6 Is Product Request?": {
      "main": [
        [
          {
            "node": "\ud83d\udecd\ufe0f Create Product Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83e\uddfe Create Support Task": {
      "main": [
        []
      ]
    },
    "\ud83d\udee0\ufe0f Is Support Request?": {
      "main": [
        [
          {
            "node": "\ud83e\uddfe Create Support Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83e\uddee Process Classification": {
      "main": [
        [
          {
            "node": "\ud83d\udee0\ufe0f Is Support Request?",
            "type": "main",
            "index": 0
          },
          {
            "node": "\ud83d\udce6 Is Product Request?",
            "type": "main",
            "index": 0
          },
          {
            "node": "\ud83d\udcbc Is Sales Request?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83e\udde0 Classifier \u2013 AI prompt": {
      "main": [
        [
          {
            "node": "\ud83e\uddee Process Classification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow automates the classification and routing of incoming Intercom conversations. When a new customer message arrives, it is analyzed by AI to determine category, sentiment, urgency, and tags. Based on this classification, the workflow creates tasks in ClickUp for…

Source: https://n8n.io/workflows/7933/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This n8n workflow orchestrates a powerful suite of AI Agents and automations to manage and optimize various aspects of an e-commerce operation, particularly for platforms like Shopify. It leverages La

Google Sheets, HTTP Request, Slack +10
AI & RAG

Enhance your support, onboarding, and internal knowledge workflows with an intelligent RAG-powered chatbot that responds using live data stored in Google Sheets. 🤖📚 Built for teams that rely on struct

Chat Trigger, Output Parser Structured, Memory Buffer Window +6
AI & RAG

This workflow automatically processes new free-trial / lead sign-ups in real time: Catches a webhook from any source (Webflow form, Intercom, custom agent, etc.) Filters out personal / disposable / .e

Output Parser Structured, Agent, HTTP Request +7
AI & RAG

Public-facing professionals (developer advocates, founders, marketers, content creators) who get bombarded with LinkedIn messages that aren't actually for them - support requests when you're in market

Slack, HTTP Request, Agent +4
AI & RAG

This workflow automates enterprise resource planning (ERP) operations across Engineering, Finance, HR, and Admin departments for operations managers, ERP administrators, and business process owners wh

Agent, Gmail, Slack +6