支持工单分类与路由自动化
高级
这是一个AI Summarization, Multimodal AI领域的自动化工作流,包含 23 个节点。主要使用 Set, Jira, Switch, Hubspot, HubspotTool 等节点。 使用GPT自动化从HubSpot到Jira的支持工单分类与路由
前置要求
- •HubSpot API Key
- •OpenAI API Key
使用的节点 (23)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"nodes": [
{
"id": "dbd0b5f4-bb55-4a33-b03e-3cabd5a7b840",
"name": "获取多个工单",
"type": "n8n-nodes-base.hubspot",
"position": [
128,
96
],
"parameters": {
"resource": "ticket",
"operation": "getAll",
"authentication": "oAuth2",
"additionalFields": {
"properties": [
"content",
"createdate",
"hs_all_conversation_mentions",
"hs_pipeline_stage",
"subject",
"hs_created_by_user_id",
"hs_all_associated_contact_emails"
]
}
},
"credentials": {
"hubspotOAuth2Api": {
"id": "qubiIFrowxvUdpu6",
"name": "HubSpot account for node"
}
},
"typeVersion": 2.1
},
{
"id": "492b2964-330d-46c2-b667-7a0ceaabaec1",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1824,
384
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "gpt-4o"
},
"options": {
"temperature": 0
}
},
"credentials": {
"openAiApi": {
"id": "yepsCCAriRlCkICW",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "fbf725e8-9fc3-4efa-abf3-1722d742af7e",
"name": "当被另一个工作流执行时",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
-96,
544
],
"parameters": {
"workflowInputs": {
"values": [
{
"name": "route"
},
{
"name": "userId"
},
{
"name": "text"
}
]
}
},
"typeVersion": 1.1
},
{
"id": "8d6628a5-4bca-47d6-a24c-25738e28b832",
"name": "哨兵",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
928,
320
],
"parameters": {
"name": "Sentinel",
"workflowId": {
"__rl": true,
"mode": "id",
"value": "={{$workflow.id }}"
},
"description": "检测流失风险、客户意图和情感语调",
"workflowInputs": {
"value": {
"text": "={{ $('Set the variables').item.json.message }}",
"route": "Sentinel"
},
"schema": [
{
"id": "route",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "route",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "userId",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "userId",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "text",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "text",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"route"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"typeVersion": 2.1
},
{
"id": "f3dd6fb6-bf9d-4abf-bb28-f6a8a600d6c7",
"name": "分析器",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
1056,
320
],
"parameters": {
"name": "Profiler",
"workflowId": {
"__rl": true,
"mode": "id",
"value": "={{$workflow.id }}"
},
"workflowInputs": {
"value": {
"route": "Profiler",
"userId": "={{ $('Search contacts').item.json.id }}"
},
"schema": [
{
"id": "route",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "route",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "userId",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "userId",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"route"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"typeVersion": 2.1
},
{
"id": "14a177f5-093b-4e0f-93dd-1ff41a04bd1c",
"name": "分析器_代理",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
352,
688
],
"parameters": {
"text": "=# Overview \nYou are a Profiler, an AI agent responsible for retrieving and analyzing a user's interactions from a CRM\n\n## Context \n- Triggered by every incoming message. \n- Retrieve any past interaction using the from_crm tool\n- Return the list of the past interactions\n\n## Instructions \n1. get all interactions with the from_crm tool\n2. Return it to the agent\n---",
"options": {},
"promptType": "define"
},
"typeVersion": 1.8
},
{
"id": "df816db0-6ab1-47d5-bd7f-43f18db908d3",
"name": "哨兵_代理",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
352,
384
],
"parameters": {
"text": "=# Overview \nYou are Sentinel, an AI agent responsible for detecting risks and opportunities in customer communication. Your role is to analyze every inbound message for emotional tone, churn risk, and purchase intent. If any alert is triggered, you must immediately notify the customer via Messenger.\n\n## Context \n- Triggered by every incoming message. \n- Operates in real time and takes immediate action when any risk or intent signal is detected. \n- Your objective is to preempt churn, detect intent to buy, and ensure the emotional tone is addressed quickly. \n ",
"options": {},
"promptType": "define"
},
"typeVersion": 1.8
},
{
"id": "0c8813a0-b865-4126-a263-defd06d803c7",
"name": "搜索联系人",
"type": "n8n-nodes-base.hubspot",
"position": [
416,
96
],
"parameters": {
"operation": "search",
"authentication": "oAuth2",
"filterGroupsUi": {
"filterGroupsValues": [
{
"filtersUi": {
"filterValues": [
{
"value": "={{ $json.properties.hs_all_associated_contact_emails.value }}",
"propertyName": "email|string"
}
]
}
}
]
},
"additionalFields": {}
},
"credentials": {
"hubspotOAuth2Api": {
"id": "qubiIFrowxvUdpu6",
"name": "HubSpot account for node"
}
},
"typeVersion": 2.1
},
{
"id": "9937e184-d03a-4688-b4d2-c4143e5d3d08",
"name": "多表:您可以连接多个表以实现有组织的数据结构",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1184,
320
],
"parameters": {
"jsonSchemaExample": "{\n\t\"risk\": \"high\",\n\t\"text\": \"this is a text\",\n}"
},
"typeVersion": 1.3
},
{
"id": "366d8b7d-57aa-4716-8c92-7e736157929b",
"name": "协调器",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
992,
96
],
"parameters": {
"text": "=# Overview \nYou are an AI orchestrator for a Customer Success (CS) system. Your role is to monitor incoming chat messages across any customer-facing channel and coordinate a real-time, automated response by leveraging various internal tools. Your ultimate goal is to reduce churn, boost engagement, automate support and marketing tasks, and connect internal teams with valuable insights.\nThe current date and time is {{ $now }}\n\n## Context \n- Triggered by any new inbound message like:\n{{ $json.message }}\n- The system should operate autonomously without requiring human intervention. \n- The orchestrator must adapt to each customer's context, sentiment, and intent. \n\n## Instructions \n{{ $json.agent}}\n\n## Tools \n- **Profiler**: Gathers real-time customer insights from CRM, tickets, and behavior. \n- **Sentinel**: Detects churn risk, customer intent, and emotional tone. \n- **Classifier**: Chooses the right classification for the output message. In order to send it to the right person. \n\n## Examples \n- Input: \"I'm really frustrated that my order is late.\" \n- Output: \n 1. **Sentinel** flags high frustration and churn risk. Sets \n 2. **Profiler** shows this is a repeat buyer with past complaints. \n 3. **Classifier** fulfillment\n\n- Input: \"Why do I keep getting logged out of my account? This is so annoying!\" \n- Output: \n 1. **Sentinel** flags high frustration and possible churn risk. \n 2. **Profiler** identifies frequent login issues over the past week and device/browser inconsistencies. \n 3. **Classifier** technical\n\n- Input: \"I love the new dashboard update. Really smooth experience!\" \n- Output: \n 1. **Sentinel** detects positive sentiment and customer satisfaction. \n 2. **Profiler** confirms the user is a long-time customer with high engagement. \n 3. **Classifier** commercial\n\n## SOP (Standard Operating Procedure) \n1. Detect inbound message across any channel. \n2. Run sentiment, intent, and tone detection via **Sentinel**. \n3. Enrich customer profile using **Profiler**. \n4. Calssify the message using **Classifier**\n7. Monitor engagement outcome and update customer status. \n\n## Final Notes \n- Always prioritize empathetic and context-aware responses. \n- Ensure internal teams only receive insights when relevant and actionable. \n- Responses must be personalized, timely, and aligned with customer history. \n- Operate entirely autonomously, but log all actions for transparency and review. \n---\n\nIf one of the tool doesn't work, stop immediately",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2.2
},
{
"id": "3299144b-a36a-4ae1-8269-599c2a98cb59",
"name": "设置变量",
"type": "n8n-nodes-base.set",
"position": [
704,
96
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "bdc0fff6-b6fd-49e5-b308-040a7cfe3feb",
"name": "message",
"type": "string",
"value": "={{ $('Get many tickets').item.json.properties.subject.value }}\n{{ $('Get many tickets').item.json.properties.content.value}}"
},
{
"id": "a5341fdc-4936-42cd-8aff-b50e32bac86a",
"name": "agents",
"type": "string",
"value": "1. When a new message arrives, analyze it for tone, intent, and urgency using **Sentinel**. \n2. Query **Profiler** to fetch a full understanding of the customer's status, behavior, and history. \n3. Use **Content Manager** to retrieve or personalize the appropriate content or message snippet. \n4. If response suggestions are needed, activate **Guide** to auto-generate a suitable reply. \n5. Send the response automatically via **Messenger**, choosing the right channel and timing. \n6. If insights from the message or customer state can support other teams (e.g., product or sales), use **Facilitator** to share those insights internally. \n7. Continuously update the customer profile and behavior signals in real time. "
},
{
"id": "cb6bd968-90ae-4692-bdf8-963f6b739884",
"name": "agent",
"type": "string",
"value": "1. When a new message arrives, analyze it for tone, intent, and urgency using **Sentinel**.\n2. Query **Profiler** to fetch a full understanding of the customer's status, behavior, and history. \n3. Then run **Classifier** to get the classification of the message abd return it as a variable named \"class\" \n4. Then summarize the output of the Profiler using **Summarizer**\n5. You will return a variable named \"risk\" to true if you estimate that the client is at risk. False otherwise\n6. you will return the output as \"text\""
}
]
}
},
"typeVersion": 3.4
},
{
"id": "c3031469-f7aa-4a76-8828-b5de0350c65e",
"name": "在 Jira 中创建问题",
"type": "n8n-nodes-base.jira",
"position": [
2112,
128
],
"parameters": {
"project": {
"__rl": true,
"mode": "list",
"value": "10001",
"cachedResultName": "Testing n9n workflow"
},
"summary": "={{ $json.output.text }}",
"issueType": {
"__rl": true,
"mode": "list",
"value": "10011",
"cachedResultName": "Epic"
},
"additionalFields": {
"assignee": {
"__rl": true,
"mode": "list",
"value": "712020:ca8ed082-0f07-48b8-b231-5a3bf70a74d4",
"cachedResultName": "Thomas Vie"
},
"description": "={{ $('Orchestrator').item.json.output.text }}"
}
},
"credentials": {
"jiraSoftwareCloudApi": {
"id": "iyOGq3xnTAK7bfI6",
"name": "Jira SW Cloud account"
}
},
"typeVersion": 1
},
{
"id": "97c36385-a37b-4877-a3d3-6ae4a16433b7",
"name": "路由器",
"type": "n8n-nodes-base.switch",
"position": [
128,
544
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "sentinel",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "ae3a40cd-b4ad-47af-bef8-87f7f97df1f4",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.route }}",
"rightValue": "Sentinel"
}
]
},
"renameOutput": true
},
{
"outputKey": "profiler",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "d6b7f19e-dc1d-4968-b661-e333ed0228b4",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.route }}",
"rightValue": "Profiler"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "048caf93-771a-4a11-b54f-e58bab648b86",
"name": "来自_crm",
"type": "n8n-nodes-base.hubspotTool",
"position": [
432,
912
],
"parameters": {
"contactId": {
"__rl": true,
"mode": "id",
"value": "={{ $('When Executed by Another Workflow').item.json.userId }}"
},
"operation": "get",
"authentication": "oAuth2",
"additionalFields": {
"propertiesCollection": {
"propertiesValues": {
"properties": [
"hs_buying_role",
"hs_conversations_visitor_email",
"num_contacted_notes",
"email"
]
}
}
}
},
"credentials": {
"hubspotOAuth2Api": {
"id": "qubiIFrowxvUdpu6",
"name": "HubSpot account for node"
}
},
"typeVersion": 2.1
},
{
"id": "beab4322-2f47-40e7-af70-d99986877bd1",
"name": "分类器",
"type": "@n8n/n8n-nodes-langchain.textClassifier",
"position": [
1744,
96
],
"parameters": {
"options": {
"systemPromptTemplate": "Please classify the text provided by the user into one of the following categories: {categories}, and use the provided formatting instructions below. Don't explain, and only output the json."
},
"inputText": "={{ $('Orchestrator').item.json.output.text }}",
"categories": {
"categories": [
{
"category": "invoicing",
"description": "for problems related to wrong invoice, delay of payment"
},
{
"category": "technical",
"description": "for problems related to software not working, for feature request."
},
{
"category": "commercial",
"description": "if the message is positive"
},
{
"category": "fulfillment",
"description": "for problems related to sending and receiving products, delayed shipments."
}
]
}
},
"typeVersion": 1.1
},
{
"id": "e1f92d13-5c4a-4078-ab18-b8a77462ecff",
"name": "生成工单标题",
"type": "@n8n/n8n-nodes-langchain.chainSummarization",
"position": [
1392,
96
],
"parameters": {
"options": {
"summarizationMethodAndPrompts": {
"values": {
"prompt": "=Write a concise title for a ticket of the following:\n\n{{ $json.output.text }}\n\n\nCONCISE SUMMARY: ",
"combineMapPrompt": "=Write a concise title for a ticket of the following:\n{{ $json.output.text }}\n\n\"\"\n\n\nCONCISE SUMMARY:"
}
}
},
"chunkSize": 200,
"chunkOverlap": 20
},
"typeVersion": 2.1
},
{
"id": "11414136-f230-48eb-91dd-411ea79e85e4",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-144,
352
],
"parameters": {
"color": 6,
"width": 832,
"height": 688,
"content": "## 代理子工作流"
},
"typeVersion": 1
},
{
"id": "41d01ec4-fdf0-43d1-8ec1-2075280ab5d4",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1680,
0
],
"parameters": {
"color": 5,
"width": 656,
"height": 288,
"content": "## 工单路由器"
},
"typeVersion": 1
},
{
"id": "332c214a-3ac9-435b-b3a5-108756744a49",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
896,
0
],
"parameters": {
"color": 5,
"width": 752,
"height": 464,
"content": "## 工单生成"
},
"typeVersion": 1
},
{
"id": "540c7fa8-4de4-4e28-9c78-fdef19450154",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
80,
16
],
"parameters": {
"color": 5,
"width": 576,
"height": 272,
"content": "## 从 Hubspot 获取工单"
},
"typeVersion": 1
},
{
"id": "a38ef7cf-89ce-423c-bda2-10063ac9f3dc",
"name": "用于测试",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-96,
0
],
"parameters": {},
"typeVersion": 1
},
{
"id": "2a389272-0f90-41e7-afca-24b194985732",
"name": "设置运行间隔",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-96,
192
],
"parameters": {
"rule": {
"interval": [
{}
]
}
},
"typeVersion": 1.2
},
{
"id": "073896f5-d6cf-4be5-a57e-40673b394b55",
"name": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-112,
-128
],
"parameters": {
"width": 768,
"height": 100,
"content": "## 联系我"
},
"typeVersion": 1
}
],
"connections": {
"Router": {
"main": [
[
{
"node": "Sentinel_agent",
"type": "main",
"index": 0
}
],
[
{
"node": "Profiler_agent",
"type": "main",
"index": 0
}
]
]
},
"Profiler": {
"ai_tool": [
[
{
"node": "Orchestrator",
"type": "ai_tool",
"index": 0
}
]
]
},
"Sentinel": {
"ai_tool": [
[
{
"node": "Orchestrator",
"type": "ai_tool",
"index": 0
}
]
]
},
"from_crm": {
"ai_tool": [
[
{
"node": "Profiler_agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"For testing": {
"main": [
[
{
"node": "Get many tickets",
"type": "main",
"index": 0
}
]
]
},
"Orchestrator": {
"main": [
[
{
"node": "generate ticket title",
"type": "main",
"index": 0
}
]
]
},
"Search contacts": {
"main": [
[
{
"node": "Set the variables",
"type": "main",
"index": 0
}
]
]
},
"Get many tickets": {
"main": [
[
{
"node": "Search contacts",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Orchestrator",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Sentinel_agent",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Profiler_agent",
"type": "ai_languageModel",
"index": 0
},
{
"node": "generate ticket title",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Cateogory Classifier",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Set the variables": {
"main": [
[
{
"node": "Orchestrator",
"type": "main",
"index": 0
}
]
]
},
"Cateogory Classifier": {
"main": [
[
{
"node": "Create an issue in Jira",
"type": "main",
"index": 0
}
],
[
{
"node": "Create an issue in Jira",
"type": "main",
"index": 0
}
],
[
{
"node": "Create an issue in Jira",
"type": "main",
"index": 0
}
],
[
{
"node": "Create an issue in Jira",
"type": "main",
"index": 0
}
]
]
},
"generate ticket title": {
"main": [
[
{
"node": "Cateogory Classifier",
"type": "main",
"index": 0
}
]
]
},
"Set the running interval": {
"main": [
[
{
"node": "Get many tickets",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Orchestrator",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Router",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - AI 摘要总结, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
LinkedIn和X病毒内容自动引擎
使用AI生成和发布自动创建LinkedIn和X的病毒内容
If
Set
Wait
+26
156 节点Diptamoy Barman
内容创作
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
其他
通过AI分析HubSpot和Google Sheets数据预测客户流失
通过AI分析HubSpot和Google Sheets数据预测客户流失
Set
Code
Merge
+17
27 节点PollupAI
客户关系管理
使用HubSpot、Google日历和AI驱动的Gmail自动化新客户入职
使用HubSpot、Google日历和AI驱动的Gmail自动化新客户入职
If
Set
Gmail
+14
31 节点PollupAI
人力资源
使用Google Sheets、Forms和Gmail通知自动化多步骤入职流程
使用Google Sheets、Forms和Gmail通知自动化多步骤入职流程
If
Set
Code
+11
31 节点PollupAI
人力资源
每日Jira工单摘要生成器(GPT-5 + Jira API)
使用GPT-5和Jira API的每日Jira工单摘要生成器
Set
Code
Jira
+11
24 节点Billy Christi
AI 摘要总结
工作流信息
难度等级
高级
节点数量23
分类2
节点类型15
作者
PollupAI
@zeerobugWe create bespoke AI solutions, automations and agents that help your business as it scales.
外部链接
在 n8n.io 查看 →
分享此工作流