AI 客户支持分流与摘要系统
高级
这是一个Ticket Management, AI Summarization领域的自动化工作流,包含 32 个节点。主要使用 If, Set, Code, Gmail, Slack 等节点。 使用GPT-4o、Slack和CRM集成自动处理客户支持
前置要求
- •Google 账号和 Gmail API 凭证
- •Slack Bot Token 或 Webhook URL
- •HTTP Webhook 端点(n8n 会自动生成)
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
- •OpenAI API Key
使用的节点 (32)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "wDPgvREnPGzo267x",
"meta": {
"instanceId": "f7efda6e0fb3e5b5aba58995b43b7c79234174dc1e6bcfb5578eff460018af38",
"templateCredsSetupCompleted": true
},
"name": "AI 客户支持分流与摘要系统",
"tags": [],
"nodes": [
{
"id": "40bab90c-06e8-400e-ba35-d629ab529144",
"name": "入站触发器(电子邮件/表单/聊天)",
"type": "n8n-nodes-base.webhook",
"position": [
928,
1664
],
"webhookId": "a5df9695-a412-414a-8684-8beae74f0dd4",
"parameters": {
"path": "support-intake",
"options": {},
"httpMethod": "POST",
"responseMode": "lastNode"
},
"typeVersion": 2.1
},
{
"id": "94f25509-3536-4eaa-8e30-bb0d3d2bcb3a",
"name": "工作流配置",
"type": "n8n-nodes-base.set",
"position": [
1152,
1664
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "id-1",
"name": "technicalSlackChannel",
"type": "string",
"value": "<__PLACEHOLDER_VALUE__Technical Slack Channel ID__>"
},
{
"id": "id-2",
"name": "billingSlackChannel",
"type": "string",
"value": "<__PLACEHOLDER_VALUE__Billing Slack Channel ID__>"
},
{
"id": "id-3",
"name": "generalSlackChannel",
"type": "string",
"value": "<__PLACEHOLDER_VALUE__General Slack Channel ID__>"
},
{
"id": "id-4",
"name": "urgentSlackChannel",
"type": "string",
"value": "<__PLACEHOLDER_VALUE__Urgent Slack Channel ID__>"
},
{
"id": "id-5",
"name": "crmApiUrl",
"type": "string",
"value": "<__PLACEHOLDER_VALUE__CRM API Endpoint URL__>"
},
{
"id": "id-6",
"name": "googleSheetId",
"type": "string",
"value": "<__PLACEHOLDER_VALUE__Google Sheet ID__>"
},
{
"id": "id-7",
"name": "slaThresholdHours",
"type": "number",
"value": 24
},
{
"id": "id-8",
"name": "urgencyThreshold",
"type": "number",
"value": 4
},
{
"id": "id-9",
"name": "supportPortalUrl",
"type": "string",
"value": "<__PLACEHOLDER_VALUE__Support Portal URL__>"
},
{
"id": "id-10",
"name": "companyName",
"type": "string",
"value": "<__PLACEHOLDER_VALUE__Company Name__>"
},
{
"id": "id-11",
"name": "supportEmail",
"type": "string",
"value": "<__PLACEHOLDER_VALUE__Support Email Address__>"
},
{
"id": "id-12",
"name": "standardSlaHours",
"type": "number",
"value": 48
},
{
"id": "id-13",
"name": "prioritySlaHours",
"type": "number",
"value": 24
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "6df1111d-ada7-4877-8f7c-e8499e9138ee",
"name": "提取客户数据",
"type": "n8n-nodes-base.set",
"position": [
1376,
1664
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "id-1",
"name": "customerName",
"type": "string",
"value": "={{ $json.body.name || $json.body.from_name || 'Unknown' }}"
},
{
"id": "id-2",
"name": "customerEmail",
"type": "string",
"value": "={{ $json.body.email || $json.body.from_email || '' }}"
},
{
"id": "id-3",
"name": "product",
"type": "string",
"value": "={{ $json.body.product || $json.body.subject || '' }}"
},
{
"id": "id-4",
"name": "issueType",
"type": "string",
"value": "={{ $json.body.issue_type || $json.body.category || '' }}"
},
{
"id": "id-5",
"name": "rawMessage",
"type": "string",
"value": "={{ $json.body.message || $json.body.text || $json.body.content || '' }}"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "754686ef-a5a9-4158-9eee-be35c091b5f1",
"name": "AI 分流与摘要代理",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1600,
1664
],
"parameters": {
"text": "=You are a customer support triage assistant. Analyze the customer inquiry and provide:\n\n1. A concise summary (max 200 words)\n2. Classification: technical, billing, general, or urgent\n3. Urgency score (1-5, where 5 is most urgent)\n4. Suggested next action\n\nCustomer Details:\nName: {{ $json.customerName }}\nEmail: {{ $json.customerEmail }}\nProduct: {{ $json.product }}\nIssue Type: {{ $json.issueType }}\nMessage: {{ $json.rawMessage }}\n\nProvide structured output with fields: summary, classification, urgency, nextAction",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2.2
},
{
"id": "471ce97b-249c-4061-bdc1-be65d3d7e014",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1600,
1888
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"credentials": {},
"typeVersion": 1.2
},
{
"id": "097c80f5-3577-4b45-985e-ef073c3a55f3",
"name": "结构化输出解析器",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1728,
1888
],
"parameters": {
"jsonSchemaExample": "{\n\t\"summary\": \"Brief summary of the customer issue (max 200 words)\",\n\t\"classification\": \"technical\",\n\t\"urgency\": 3,\n\t\"nextAction\": \"Recommended next action for support team\"\n}"
},
"typeVersion": 1.3
},
{
"id": "b97cd4c8-8dbe-434b-b47b-4ca4c9608218",
"name": "按分类路由",
"type": "n8n-nodes-base.switch",
"position": [
1952,
1632
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "technical",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.classification }}",
"rightValue": "technical"
}
]
},
"renameOutput": true
},
{
"outputKey": "billing",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.classification }}",
"rightValue": "billing"
}
]
},
"renameOutput": true
},
{
"outputKey": "general",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.classification }}",
"rightValue": "general"
}
]
},
"renameOutput": true
},
{
"outputKey": "urgent",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.classification }}",
"rightValue": "urgent"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.3
},
{
"id": "27af38f5-7f57-48b0-9933-2f14fb492ba1",
"name": "发布到技术 Slack",
"type": "n8n-nodes-base.slack",
"position": [
2176,
1376
],
"webhookId": "5641deda-88ec-40e5-97f8-768edddd62ef",
"parameters": {
"text": "=*New Technical Support Ticket*\n\n*Customer:* {{ $json.customerName }} ({{ $json.customerEmail }})\n*Product:* {{ $json.product }}\n*Urgency:* {{ $json.urgency }}/5\n\n*Summary:*\n{{ $json.summary }}\n\n*Next Action:*\n{{ $json.nextAction }}",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Workflow Configuration').first().json.technicalSlackChannel }}"
},
"otherOptions": {}
},
"typeVersion": 2.3
},
{
"id": "22546b0f-d5e9-4f7a-b569-612df6d66721",
"name": "发布到财务 Slack",
"type": "n8n-nodes-base.slack",
"position": [
2176,
1568
],
"webhookId": "d9fbfba9-8405-484b-9e12-3e76274d8a12",
"parameters": {
"text": "=*New Billing Support Ticket*\n\n*Customer:* {{ $json.customerName }} ({{ $json.customerEmail }})\n*Product:* {{ $json.product }}\n*Urgency:* {{ $json.urgency }}/5\n\n*Summary:*\n{{ $json.summary }}\n\n*Next Action:*\n{{ $json.nextAction }}",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Workflow Configuration').first().json.billingSlackChannel }}"
},
"otherOptions": {}
},
"typeVersion": 2.3
},
{
"id": "397fc082-4440-47a2-a6a7-602471bf1485",
"name": "发布到普通 Slack",
"type": "n8n-nodes-base.slack",
"position": [
2176,
1760
],
"webhookId": "05e761b5-e77e-422a-86ee-8cb0fc907bfb",
"parameters": {
"text": "=*New General Support Ticket*\n\n*Customer:* {{ $json.customerName }} ({{ $json.customerEmail }})\n*Product:* {{ $json.product }}\n*Urgency:* {{ $json.urgency }}/5\n\n*Summary:*\n{{ $json.summary }}\n\n*Next Action:*\n{{ $json.nextAction }}",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Workflow Configuration').first().json.generalSlackChannel }}"
},
"otherOptions": {}
},
"typeVersion": 2.3
},
{
"id": "96528838-d29c-497d-a221-b2b4c9025a5d",
"name": "发布到紧急 Slack",
"type": "n8n-nodes-base.slack",
"position": [
2176,
1952
],
"webhookId": "84244cb1-7ea0-4504-9617-d56b151fe9dc",
"parameters": {
"text": "=*🚨 URGENT Support Ticket 🚨*\n\n*Customer:* {{ $json.customerName }} ({{ $json.customerEmail }})\n*Product:* {{ $json.product }}\n*Urgency:* {{ $json.urgency }}/5\n\n*Summary:*\n{{ $json.summary }}\n\n*Next Action:*\n{{ $json.nextAction }}",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Workflow Configuration').first().json.urgentSlackChannel }}"
},
"otherOptions": {
"includeLinkToWorkflow": true
}
},
"typeVersion": 2.3
},
{
"id": "b8aa6a61-7439-4af7-8dcd-00283d0684f8",
"name": "创建 CRM 任务(技术)",
"type": "n8n-nodes-base.httpRequest",
"position": [
2400,
1376
],
"parameters": {
"url": "={{ $('Workflow Configuration').first().json.crmApiUrl }}",
"method": "POST",
"options": {
"response": {
"response": {
"neverError": true
}
}
},
"jsonBody": "={{ {\n \"customer_name\": $json.customerName,\n \"customer_email\": $json.customerEmail,\n \"product\": $json.product,\n \"classification\": \"technical\",\n \"urgency\": $json.urgency,\n \"summary\": $json.summary,\n \"next_action\": $json.nextAction,\n \"sla_hours\": $json.urgency >= $('Workflow Configuration').first().json.urgencyThreshold ? $('Workflow Configuration').first().json.slaThresholdHours : 48\n} }}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "ddb40ba2-945a-4f0f-ad46-ef46eb2d852a",
"name": "创建 CRM 任务(财务)",
"type": "n8n-nodes-base.httpRequest",
"position": [
2400,
1568
],
"parameters": {
"url": "={{ $('Workflow Configuration').first().json.crmApiUrl }}",
"method": "POST",
"options": {
"response": {
"response": {
"neverError": true
}
}
},
"jsonBody": "={{ {\n \"customer_name\": $json.customerName,\n \"customer_email\": $json.customerEmail,\n \"product\": $json.product,\n \"classification\": \"billing\",\n \"urgency\": $json.urgency,\n \"summary\": $json.summary,\n \"next_action\": $json.nextAction,\n \"sla_hours\": $json.urgency >= $('Workflow Configuration').first().json.urgencyThreshold ? $('Workflow Configuration').first().json.slaThresholdHours : 48\n} }}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "8b8e2540-5dd7-4ec1-bc5d-d7e8d4c80ac7",
"name": "创建 CRM 任务(普通)",
"type": "n8n-nodes-base.httpRequest",
"position": [
2400,
1760
],
"parameters": {
"url": "={{ $('Workflow Configuration').first().json.crmApiUrl }}",
"method": "POST",
"options": {
"response": {
"response": {
"neverError": true
}
}
},
"jsonBody": "={{ {\n \"customer_name\": $json.customerName,\n \"customer_email\": $json.customerEmail,\n \"product\": $json.product,\n \"classification\": \"general\",\n \"urgency\": $json.urgency,\n \"summary\": $json.summary,\n \"next_action\": $json.nextAction,\n \"sla_hours\": $json.urgency >= $('Workflow Configuration').first().json.urgencyThreshold ? $('Workflow Configuration').first().json.slaThresholdHours : 48\n} }}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "8e57b175-aca0-4c67-82dc-10f2bfd245eb",
"name": "创建 CRM 任务(紧急)",
"type": "n8n-nodes-base.httpRequest",
"position": [
2400,
1952
],
"parameters": {
"url": "={{ $('Workflow Configuration').first().json.crmApiUrl }}",
"method": "POST",
"options": {
"response": {
"response": {
"neverError": true
}
}
},
"jsonBody": "={\n \"customer_name\": \"{{ $json.customerName }}\",\n \"customer_email\": \"{{ $json.customerEmail }}\",\n \"product\": \"{{ $json.product }}\",\n \"classification\": \"urgent\",\n \"urgency\": {{ $json.urgency }},\n \"summary\": \"{{ $json.summary }}\",\n \"next_action\": \"{{ $json.nextAction }}\",\n \"sla_hours\": {{ $('Workflow Configuration').first().json.slaThresholdHours }}\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "1fcfd918-bdb5-4ce3-b038-cab9cfa2c433",
"name": "记录到 Google 表格(技术)",
"type": "n8n-nodes-base.googleSheets",
"position": [
2624,
1376
],
"parameters": {
"columns": {
"value": {
"Product": "={{ $json.product }}",
"Summary": "={{ $json.summary }}",
"Urgency": "={{ $json.urgency }}",
"Timestamp": "={{ $now.toISO() }}",
"Next Action": "={{ $json.nextAction }}",
"Customer Name": "={{ $json.customerName }}",
"Classification": "technical",
"Customer Email": "={{ $json.customerEmail }}"
},
"schema": [
{
"id": "Timestamp",
"required": false,
"displayName": "Timestamp",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Customer Name",
"required": false,
"displayName": "Customer Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Customer Email",
"required": false,
"displayName": "Customer Email",
"defaultMatch": true,
"canBeUsedToMatch": true
},
{
"id": "Product",
"required": false,
"displayName": "Product",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Classification",
"required": false,
"displayName": "Classification",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Urgency",
"required": false,
"displayName": "Urgency",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Summary",
"required": false,
"displayName": "Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Next Action",
"required": false,
"displayName": "Next Action",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Customer Email"
]
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "name",
"value": "Support Tickets"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Workflow Configuration').first().json.googleSheetId }}"
}
},
"credentials": {},
"typeVersion": 4.7
},
{
"id": "dfecf8ef-ce60-4fa0-b944-529a637ce06b",
"name": "记录到 Google 表格(财务)",
"type": "n8n-nodes-base.googleSheets",
"position": [
2624,
1568
],
"parameters": {
"columns": {
"value": {
"Product": "={{ $json.product }}",
"Summary": "={{ $json.summary }}",
"Urgency": "={{ $json.urgency }}",
"Timestamp": "={{ $now.toISO() }}",
"Next Action": "={{ $json.nextAction }}",
"Customer Name": "={{ $json.customerName }}",
"Classification": "billing",
"Customer Email": "={{ $json.customerEmail }}"
},
"schema": [
{
"id": "Timestamp",
"required": false,
"displayName": "Timestamp",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Customer Name",
"required": false,
"displayName": "Customer Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Customer Email",
"required": false,
"displayName": "Customer Email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Product",
"required": false,
"displayName": "Product",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Classification",
"required": false,
"displayName": "Classification",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Urgency",
"required": false,
"displayName": "Urgency",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Summary",
"required": false,
"displayName": "Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Next Action",
"required": false,
"displayName": "Next Action",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Timestamp"
]
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "name",
"value": "Support Tickets"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Workflow Configuration').first().json.googleSheetId }}"
}
},
"credentials": {},
"typeVersion": 4.7
},
{
"id": "c492c5b8-8caa-422a-b291-be06512b1810",
"name": "记录到 Google 表格(普通)",
"type": "n8n-nodes-base.googleSheets",
"position": [
2624,
1760
],
"parameters": {
"columns": {
"value": {
"Product": "={{ $json.product }}",
"Summary": "={{ $json.summary }}",
"Urgency": "={{ $json.urgency }}",
"Timestamp": "={{ $now.toISO() }}",
"Next Action": "={{ $json.nextAction }}",
"Customer Name": "={{ $json.customerName }}",
"Classification": "general",
"Customer Email": "={{ $json.customerEmail }}"
},
"schema": [
{
"id": "Timestamp",
"required": false,
"displayName": "Timestamp",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Customer Name",
"required": false,
"displayName": "Customer Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Customer Email",
"required": false,
"displayName": "Customer Email",
"defaultMatch": true,
"canBeUsedToMatch": true
},
{
"id": "Product",
"required": false,
"displayName": "Product",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Classification",
"required": false,
"displayName": "Classification",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Urgency",
"required": false,
"displayName": "Urgency",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Summary",
"required": false,
"displayName": "Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Next Action",
"required": false,
"displayName": "Next Action",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Customer Email"
]
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "name",
"value": "Support Tickets"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Workflow Configuration').first().json.googleSheetId }}"
}
},
"credentials": {},
"typeVersion": 4.7
},
{
"id": "472ccb11-7e70-419c-822f-c6154ea2abc8",
"name": "记录到 Google 表格(紧急)",
"type": "n8n-nodes-base.googleSheets",
"position": [
2624,
1952
],
"parameters": {
"columns": {
"value": {
"Product": "={{ $json.product }}",
"Summary": "={{ $json.summary }}",
"Urgency": "={{ $json.urgency }}",
"Timestamp": "={{ $now.toISO() }}",
"Next Action": "={{ $json.nextAction }}",
"Customer Name": "={{ $json.customerName }}",
"Classification": "urgent",
"Customer Email": "={{ $json.customerEmail }}"
},
"schema": [
{
"id": "Timestamp",
"required": false,
"displayName": "Timestamp",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Customer Name",
"required": false,
"displayName": "Customer Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Customer Email",
"required": false,
"displayName": "Customer Email",
"defaultMatch": true,
"canBeUsedToMatch": true
},
{
"id": "Product",
"required": false,
"displayName": "Product",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Classification",
"required": false,
"displayName": "Classification",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Urgency",
"required": false,
"displayName": "Urgency",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Summary",
"required": false,
"displayName": "Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Next Action",
"required": false,
"displayName": "Next Action",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Customer Email"
]
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "name",
"value": "Support Tickets"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Workflow Configuration').first().json.googleSheetId }}"
}
},
"credentials": {},
"typeVersion": 4.7
},
{
"id": "f74fcb3e-acc8-429a-a372-9b2cb23666ff",
"name": "检查紧急性以确定 SLA",
"type": "n8n-nodes-base.if",
"position": [
2848,
1664
],
"parameters": {
"options": {},
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": false,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "id-1",
"operator": {
"type": "number",
"operation": "gte"
},
"leftValue": "={{ $json.urgency }}",
"rightValue": "={{ $('Workflow Configuration').first().json.urgencyThreshold }}"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "b8991d6c-954f-487b-8f11-829761a6d5e6",
"name": "错误处理程序 - 记录到 DLQ",
"type": "n8n-nodes-base.httpRequest",
"position": [
928,
2176
],
"parameters": {
"url": "<__PLACEHOLDER_VALUE__Dead Letter Queue API Endpoint__>",
"method": "POST",
"options": {},
"jsonBody": "={{ { \"workflow\": \"AI Customer Support Triage\", \"error\": $json.error, \"timestamp\": $now.toISO(), \"data\": $json } }}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "a6fe778b-d8de-4127-8bd6-1cfb0266d228",
"name": "生成参考编号",
"type": "n8n-nodes-base.code",
"position": [
3072,
1664
],
"parameters": {
"jsCode": "const timestamp = Date.now();\nconst random = Math.random().toString(36).substring(2, 8).toUpperCase();\nconst referenceNumber = `SUP-${timestamp}-${random}`;\nconst urgency = items[0].json.urgency;\nconst urgencyThreshold = items[0].json.urgencyThreshold || 4;\nconst slaHours = urgency >= urgencyThreshold ? items[0].json.slaThresholdHours || 24 : 48;\nconst slaResponseTime = `${slaHours} hours`;\nreturn { json: { ...items[0].json, referenceNumber, slaHours, slaResponseTime } };"
},
"typeVersion": 2
},
{
"id": "e3b53f01-39cf-40fa-b4b1-a16279d383fa",
"name": "准备自动回复电子邮件数据",
"type": "n8n-nodes-base.set",
"position": [
3296,
1664
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "id-1",
"name": "emailSubject",
"type": "string",
"value": "=Your Support Request Received - Ref: {{ $json.referenceNumber }}"
},
{
"id": "id-2",
"name": "emailBody",
"type": "string",
"value": "=Dear {{ $json.customerName }},\n\nThank you for contacting {{ $('Workflow Configuration').first().json.companyName }} support. We have received your inquiry and our team is reviewing it.\n\n**Ticket Details:**\n• Reference Number: {{ $json.referenceNumber }}\n• Issue Summary: {{ $json.summary }}\n• Classification: {{ $json.classification }}\n• Priority Level: {{ $json.urgency }}/5\n• Expected Response Time: {{ $json.slaResponseTime }}\n\nOur support team will respond to your request within {{ $json.slaResponseTime }}. You can track the status of your ticket at:\n{{ $('Workflow Configuration').first().json.supportPortalUrl }}\n\nIf you have any additional information to add, please reply to this email with your reference number: {{ $json.referenceNumber }}\n\nBest regards,\n{{ $('Workflow Configuration').first().json.companyName }} Support Team\n{{ $('Workflow Configuration').first().json.supportEmail }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "113a0dee-5142-48ab-9b94-a1ef76407712",
"name": "通过 Gmail 发送自动回复",
"type": "n8n-nodes-base.gmail",
"position": [
3520,
1664
],
"webhookId": "6c090444-ecd0-486e-9e4d-5ef48968023d",
"parameters": {
"sendTo": "={{ $json.customerEmail }}",
"message": "={{ $json.emailBody }}",
"options": {},
"subject": "={{ $json.emailSubject }}"
},
"credentials": {},
"typeVersion": 2.1
},
{
"id": "e92c40d8-b13e-4223-996e-ab9540592c46",
"name": "重试自动回复(尝试 1)",
"type": "n8n-nodes-base.httpRequest",
"position": [
3744,
1664
],
"parameters": {
"url": "<__PLACEHOLDER_VALUE__SMTP Fallback API Endpoint__>",
"method": "POST",
"options": {},
"jsonBody": "={{ {\n \"to\": $json.customerEmail,\n \"subject\": $json.emailSubject,\n \"body\": $json.emailBody,\n \"referenceNumber\": $json.referenceNumber\n} }}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.3
},
{
"id": "d05dc36d-bb82-42d6-a631-5fbe16d3ab04",
"name": "重试自动回复(尝试 2)",
"type": "n8n-nodes-base.httpRequest",
"position": [
3968,
1664
],
"parameters": {
"url": "<__PLACEHOLDER_VALUE__SMTP Fallback API Endpoint (Backup)__>",
"method": "POST",
"options": {
"response": {
"response": {
"neverError": true
}
}
},
"jsonBody": "={{ {\n \"to\": $json.customerEmail,\n \"subject\": $json.emailSubject,\n \"body\": $json.emailBody,\n \"referenceNumber\": $json.referenceNumber\n} }}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.3
},
{
"id": "bacdcf4a-d4ae-4436-bfaf-43954b53d832",
"name": "记录失败的自动回复到 DLQ",
"type": "n8n-nodes-base.httpRequest",
"position": [
4192,
1664
],
"parameters": {
"url": "<__PLACEHOLDER_VALUE__Dead Letter Queue API Endpoint__>",
"method": "POST",
"options": {},
"jsonBody": "={{ { \"workflow\": \"AI Customer Support Auto-Reply\", \"error\": \"Failed to send auto-reply after 3 attempts\", \"timestamp\": $now.toISO(), \"customerEmail\": $json.customerEmail, \"referenceNumber\": $json.referenceNumber, \"data\": $json } }}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.3
},
{
"id": "1b09b649-cda1-4e24-aef7-dda7c3edede8",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
432,
496
],
"parameters": {
"color": 4,
"width": 736,
"height": 640,
"content": "# 🟢 设置与接收"
},
"typeVersion": 1
},
{
"id": "28b93a1c-529b-47b2-bea0-3b6c78ad215b",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1264,
512
],
"parameters": {
"color": 3,
"width": 784,
"height": 624,
"content": "# 🤖 AI 分流"
},
"typeVersion": 1
},
{
"id": "2abd4593-c630-4bb0-96df-f5c592d489d2",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
2128,
528
],
"parameters": {
"color": 5,
"width": 784,
"height": 608,
"content": "# 🔀 路由与记录"
},
"typeVersion": 1
},
{
"id": "3482614e-7fe0-4e62-93dd-d15d43c83e60",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
3040,
544
],
"parameters": {
"width": 736,
"height": 592,
"content": "# ✉️ 自动回复与错误处理"
},
"typeVersion": 1
},
{
"id": "5e3bc0f5-b4be-4b12-892c-d9f24a8ad2d3",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1200,
2144
],
"parameters": {
"color": 2,
"width": 496,
"height": 320,
"content": "# 🔴 错误处理程序 – 记录到 DLQ"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "cddc9402-f487-4610-8ff6-7b0a423840cc",
"connections": {
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Triage & Summarization Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Post to Urgent Slack": {
"main": [
[
{
"node": "Create CRM Task (Urgent)",
"type": "main",
"index": 0
}
]
]
},
"Check Urgency for SLA": {
"main": [
[
{
"node": "Generate Reference Number",
"type": "main",
"index": 0
}
]
]
},
"Extract Customer Data": {
"main": [
[
{
"node": "AI Triage & Summarization Agent",
"type": "main",
"index": 0
}
]
]
},
"Post to Billing Slack": {
"main": [
[
{
"node": "Create CRM Task (Billing)",
"type": "main",
"index": 0
}
]
]
},
"Post to General Slack": {
"main": [
[
{
"node": "Create CRM Task (General)",
"type": "main",
"index": 0
}
]
]
},
"Workflow Configuration": {
"main": [
[
{
"node": "Extract Customer Data",
"type": "main",
"index": 0
}
]
]
},
"Post to Technical Slack": {
"main": [
[
{
"node": "Create CRM Task (Technical)",
"type": "main",
"index": 0
}
]
]
},
"Route by Classification": {
"main": [
[
{
"node": "Post to Technical Slack",
"type": "main",
"index": 0
}
],
[
{
"node": "Post to Billing Slack",
"type": "main",
"index": 0
}
],
[
{
"node": "Post to General Slack",
"type": "main",
"index": 0
}
],
[
{
"node": "Post to Urgent Slack",
"type": "main",
"index": 0
}
]
]
},
"Create CRM Task (Urgent)": {
"main": [
[
{
"node": "Log to Google Sheets (Urgent)",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "AI Triage & Summarization Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Create CRM Task (Billing)": {
"main": [
[
{
"node": "Log to Google Sheets (Billing)",
"type": "main",
"index": 0
}
]
]
},
"Create CRM Task (General)": {
"main": [
[
{
"node": "Log to Google Sheets (General)",
"type": "main",
"index": 0
}
]
]
},
"Generate Reference Number": {
"main": [
[
{
"node": "Prepare Auto-Reply Email Data",
"type": "main",
"index": 0
}
]
]
},
"Send Auto-Reply via Gmail": {
"main": [
[
{
"node": "Retry Auto-Reply (Attempt 1)",
"type": "main",
"index": 0
}
]
]
},
"Create CRM Task (Technical)": {
"main": [
[
{
"node": "Log to Google Sheets (Technical)",
"type": "main",
"index": 0
}
]
]
},
"Retry Auto-Reply (Attempt 1)": {
"main": [
[
{
"node": "Retry Auto-Reply (Attempt 2)",
"type": "main",
"index": 0
}
]
]
},
"Retry Auto-Reply (Attempt 2)": {
"main": [
[
{
"node": "Log Failed Auto-Reply to DLQ",
"type": "main",
"index": 0
}
]
]
},
"Log to Google Sheets (Urgent)": {
"main": [
[
{
"node": "Check Urgency for SLA",
"type": "main",
"index": 0
}
]
]
},
"Prepare Auto-Reply Email Data": {
"main": [
[
{
"node": "Send Auto-Reply via Gmail",
"type": "main",
"index": 0
}
]
]
},
"Log to Google Sheets (Billing)": {
"main": [
[
{
"node": "Check Urgency for SLA",
"type": "main",
"index": 0
}
]
]
},
"Log to Google Sheets (General)": {
"main": [
[
{
"node": "Check Urgency for SLA",
"type": "main",
"index": 0
}
]
]
},
"AI Triage & Summarization Agent": {
"main": [
[
{
"node": "Route by Classification",
"type": "main",
"index": 0
}
]
]
},
"Log to Google Sheets (Technical)": {
"main": [
[
{
"node": "Check Urgency for SLA",
"type": "main",
"index": 0
}
]
]
},
"Inbound Trigger (Email/Form/Chat)": {
"main": [
[
{
"node": "Workflow Configuration",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 工单管理, AI 摘要总结
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
构建基于AI的API错误目录:从GitHub到Airtable、Notion和Slack
使用GPT-4o自动检测和分类GitHub API错误至Airtable、Notion和Slack
If
Set
Code
+11
30 节点Rahul Joshi
工单管理
智能潜在客户资格认证与多渠道接入路由系统
使用 GPT-4o、Slack 和 CRM 集成跨渠道筛选和路由潜在客户
If
Set
Code
+10
19 节点NodeAlchemy
客户培育
潜在客户开发与邮件工作流
使用Google Maps、SendGrid和AI自动化B2B潜在客户开发与邮件营销
If
Set
Code
+21
141 节点Ezema Kingsley Chibuzo
潜在客户开发
Twitter监控工作流
使用OpenAI、Google表格和Slack提醒自动化Twitter情感分析
If
Set
Slack
+10
15 节点InfyOm Technologies
市场调研
每日 WhatsApp 群组智能分析:GPT-4.1 分析与语音消息转录
每日 WhatsApp 群组智能分析:GPT-4.1 分析与语音消息转录
If
Set
Code
+20
52 节点Daniel Lianes
杂项
具有 AI 分类、Gmail 草稿和 Slack 通知的智能电子邮件助手
使用 OpenAI 分类、Gmail 草稿和 Slack 提醒实现邮件管理自动化
Set
Code
Gmail
+6
16 节点Fabian ZNTL
工单管理
工作流信息
难度等级
高级
节点数量32
分类2
节点类型13
作者
NodeAlchemy
@robertsantini🧠 NodeAlchemy turns ideas into powerful automations. I build modular n8n workflows for creators and businesses — from personal productivity tools to full-scale systems. ⚡ Explore ready-made templates or request a custom build.
外部链接
在 n8n.io 查看 →
分享此工作流