基于 Outlook、OpenAI 和 JIRA 的 AI 支持自动化
高级
这是一个Ticket Management, Multimodal AI领域的自动化工作流,包含 18 个节点。主要使用 If, Jira, Gmail, Webhook, Function 等节点。 集成 Outlook、OpenAI 和 JIRA 工单的 AI 支持自动化系统
前置要求
- •Google 账号和 Gmail API 凭证
- •HTTP Webhook 端点(n8n 会自动生成)
- •OpenAI API Key
使用的节点 (18)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "54727bff0f5eeffb7bf9295509a4e3003a61b32ef52459f329ae99e7b5243230"
},
"nodes": [
{
"id": "b28b477c-281c-4371-9bc6-e9cdff0623cb",
"name": "Outlook 触发器1",
"type": "n8n-nodes-base.microsoftOutlook",
"position": [
-48,
1344
],
"webhookId": "d22fa384-f0e1-411f-bb06-867458d1a22c",
"parameters": {
"options": {},
"filtersUI": {
"values": {
"filters": {
"receivedAfter": "={{ $now.minus({ minutes: 30 }).toISO() }}"
}
}
},
"operation": "getAll"
},
"typeVersion": 2
},
{
"id": "51e582d1-d8ea-43f1-8db8-d8af869b41fe",
"name": "Webhook 触发器1",
"type": "n8n-nodes-base.webhook",
"position": [
-48,
1104
],
"webhookId": "f319cf3f-aad0-487d-b4a1-897ac7545efe",
"parameters": {
"path": "support",
"options": {},
"httpMethod": "POST"
},
"typeVersion": 1.1
},
{
"id": "96a9a667-47e9-4103-b3ff-239a2fe0b888",
"name": "数据标准化1",
"type": "n8n-nodes-base.function",
"position": [
160,
1232
],
"parameters": {
"functionCode": "const data = $input.all();\nconst result = [];\n\nfor (const item of data) {\n let normalized = {\n source: item.json.from ? 'email' : 'webhook',\n email: item.json.from?.emailAddress?.address || item.json.email,\n name: item.json.from?.emailAddress?.name || item.json.name,\n subject: item.json.subject || 'Web Request',\n message: item.json.body?.content || item.json.message,\n timestamp: new Date().toISOString()\n };\n result.push({ json: normalized });\n}\n\nreturn result;"
},
"typeVersion": 1
},
{
"id": "b6447498-d7ad-4733-bcd7-bbf0bae1cb1e",
"name": "去重1",
"type": "n8n-nodes-base.removeDuplicates",
"position": [
368,
1232
],
"parameters": {
"options": {},
"operation": "removeItemsSeenInPreviousExecutions",
"dedupeValue": "={{ $json.email + $json.subject }}"
},
"typeVersion": 2
},
{
"id": "37505804-f4a2-445f-b751-bd4b5aa98062",
"name": "OpenAI 模型1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
576,
1424
],
"parameters": {
"model": {
"value": "gpt-4o-mini"
},
"options": {}
},
"typeVersion": 1.2
},
{
"id": "d8a47dc8-7baa-414f-9ffb-c36f1ee87294",
"name": "JSON 解析器1",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
768,
1424
],
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"category\": {\"type\": \"string\"},\n \"urgency\": {\"type\": \"string\"},\n \"expertise\": {\"type\": \"string\"},\n \"canAutoResolve\": {\"type\": \"boolean\"},\n \"isVIP\": {\"type\": \"boolean\"}\n }\n}"
},
"typeVersion": 1.2
},
{
"id": "8210bcfa-c0f1-4329-a7ba-8d3b0fa3e3ac",
"name": "路由决策1",
"type": "n8n-nodes-base.if",
"position": [
928,
1232
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "ff7f1bf0-0ce3-4eb3-a9de-1675a785f2c2",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "",
"rightValue": ""
}
]
}
},
"typeVersion": 2
},
{
"id": "3ef69825-72c7-4d8c-9009-eba6a7591c19",
"name": "自动回复1",
"type": "n8n-nodes-base.microsoftOutlook",
"position": [
1184,
1056
],
"webhookId": "3d561e9a-2aaa-425b-8f3b-e0d9b51bed5f",
"parameters": {
"operation": "sendMessage"
},
"typeVersion": 2
},
{
"id": "1bfa088a-9721-4975-a7b0-cea8d6225114",
"name": "分配客服1",
"type": "n8n-nodes-base.function",
"position": [
1184,
1328
],
"parameters": {
"functionCode": "const request = $json;\nconst expertise = request.output.expertise;\nconst isVIP = request.output.isVIP;\nconst urgency = request.output.urgency;\n\n// Agent assignment logic\nconst agents = {\n 'frontend': 'john@company.com',\n 'backend': 'sarah@company.com',\n 'business': 'lisa@company.com',\n 'support': 'tom@company.com'\n};\n\nconst assignedAgent = agents[expertise] || agents['support'];\n\n// SLA calculation\nconst slaHours = {\n 'critical': isVIP ? 1 : 2,\n 'high': isVIP ? 4 : 8,\n 'medium': isVIP ? 8 : 24,\n 'low': 24\n};\n\nreturn [{\n json: {\n ...request,\n assignedAgent,\n slaHours: slaHours[urgency],\n priority: urgency === 'critical' ? 1 : urgency === 'high' ? 2 : 3\n }\n}];"
},
"typeVersion": 1
},
{
"id": "53f8485b-5287-433a-b7b7-e2e6356fd7ed",
"name": "创建 JIRA 工单1",
"type": "n8n-nodes-base.jira",
"position": [
1360,
1328
],
"parameters": {
"project": {
"value": "SUP"
},
"summary": "{{ $json.subject }}",
"issueType": {
"value": "Task"
},
"additionalFields": {
"labels": [
"{{ $json.output.category }}",
"{{ $json.source }}"
],
"assignee": {
"value": "{{ $json.assignedAgent }}"
},
"priority": {
"value": "{{ $json.priority }}"
},
"description": "Customer: {{ $json.name }} ({{ $json.email }})\nSource: {{ $json.source }}\nCategory: {{ $json.output.category }}\nUrgency: {{ $json.output.urgency }}\n{{ $json.output.isVIP ? 'VIP CUSTOMER' : '' }}\n\nMessage:\n{{ $json.message }}"
}
},
"typeVersion": 1
},
{
"id": "6d76ea6d-050c-4e36-a217-f6efd492217b",
"name": "发送确认1",
"type": "n8n-nodes-base.gmail",
"position": [
1536,
1328
],
"webhookId": "909c81d1-fb58-4349-b978-0966e5d93e3b",
"parameters": {
"message": "Dear {{ $json.name }},\n\nYour support request has been received and assigned ticket #{{ $json.ticketKey }}.\n\nPriority: {{ $json.output.urgency }}{{ $json.output.isVIP ? ' (VIP)' : '' }}\nAssigned to: {{ $json.assignedAgent }}\nExpected response: {{ $json.slaHours }} hours\n\nWe'll update you as we work on your request.\n\nBest regards,\nSupport Team",
"options": {},
"subject": "Support Ticket Created - {{ $json.subject }}"
},
"typeVersion": 2.1
},
{
"id": "9811b90f-39a8-4c9d-9472-5ae94c29aa97",
"name": "Webhook 响应1",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1728,
1056
],
"parameters": {
"options": {},
"respondWith": "json",
"responseBody": "{\n \"status\": \"success\",\n \"message\": \"Request processed\",\n \"ticketId\": \"{{ $json.ticketKey || 'AUTO_RESOLVED' }}\"\n}"
},
"typeVersion": 1.1
},
{
"id": "2c96f390-163c-4b2a-8a69-ad53ffbfdd17",
"name": "AI 分类器2",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
592,
1232
],
"parameters": {
"text": "Subject: {{ $json.subject }}\nMessage: {{ $json.message }}\nFrom: {{ $json.name }} ({{ $json.email }})",
"messages": {
"messageValues": [
{
"message": "Classify this support request. Return JSON with:\n{\n \"category\": \"technical|billing|account|feature\",\n \"urgency\": \"critical|high|medium|low\",\n \"expertise\": \"frontend|backend|support|business\",\n \"canAutoResolve\": true|false,\n \"isVIP\": true|false\n}\n\nVIP indicators: enterprise email domains, mentions of \"enterprise\", \"premium\", urgent language.\nAuto-resolve: simple how-to questions, password resets, basic billing questions."
}
]
},
"hasOutputParser": true
},
"typeVersion": 1.6
},
{
"id": "ea4bb972-004b-4214-b9a7-4a0fe0ce014d",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-704,
528
],
"parameters": {
"color": 3,
"width": 464,
"height": 336,
"content": "## 智能客服工作流"
},
"typeVersion": 1
},
{
"id": "23bd9e14-7a5a-4ac0-82da-8c901f422557",
"name": "便签 1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-704,
880
],
"parameters": {
"color": 3,
"width": 464,
"height": 400,
"content": "### 为您的团队定制"
},
"typeVersion": 1
},
{
"id": "40549f86-6fc2-427c-b382-944c5f321fb3",
"name": "便签 2",
"type": "n8n-nodes-base.stickyNote",
"position": [
528,
528
],
"parameters": {
"width": 352,
"height": 1056,
"content": "### AI 分类提示"
},
"typeVersion": 1
},
{
"id": "97a5075b-315d-406b-9e43-bf1f448eee67",
"name": "便签 3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1104,
528
],
"parameters": {
"width": 288,
"height": 688,
"content": "### 自动解决适用于:"
},
"typeVersion": 1
},
{
"id": "6919f336-fc6b-4c46-b1dd-222b426c23cb",
"name": "便签 4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-176,
528
],
"parameters": {
"width": 336,
"height": 752,
"content": "### WEBHOOK 集成"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"JSON Parser1": {
"ai_outputParser": [
[
{
"node": "AI Classifier2",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Assign Agent1": {
"main": [
[
{
"node": "Create JIRA Ticket1",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Model1": {
"ai_languageModel": [
[
{
"node": "AI Classifier2",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"AI Classifier2": {
"main": [
[
{
"node": "Route Decision1",
"type": "main",
"index": 0
}
]
]
},
"Auto Response1": {
"main": [
[
{
"node": "Webhook Response1",
"type": "main",
"index": 0
}
]
]
},
"Normalize Data1": {
"main": [
[
{
"node": "Remove Duplicates1",
"type": "main",
"index": 0
}
]
]
},
"Route Decision1": {
"main": [
[
{
"node": "Auto Response1",
"type": "main",
"index": 0
}
],
[
{
"node": "Assign Agent1",
"type": "main",
"index": 0
}
]
]
},
"Outlook Trigger1": {
"main": [
[
{
"node": "Normalize Data1",
"type": "main",
"index": 0
}
]
]
},
"Webhook Trigger1": {
"main": [
[
{
"node": "Normalize Data1",
"type": "main",
"index": 0
}
]
]
},
"Remove Duplicates1": {
"main": [
[
{
"node": "AI Classifier2",
"type": "main",
"index": 0
}
]
]
},
"Send Confirmation1": {
"main": [
[
{
"node": "Webhook Response1",
"type": "main",
"index": 0
}
]
]
},
"Create JIRA Ticket1": {
"main": [
[
{
"node": "Send Confirmation1",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 工单管理, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
其他
潜在客户资格评定与路由引擎
基于AI的潜在客户资格评定与路由:使用OpenAI、Slack和Airtable
If
Set
Slack
+8
17 节点Xavier Tai
内容创作
SmartSupport流程:从邮件到Jira自动处理IT请求,附带Slack通知
通过AI解决方案和Slack提醒将邮件自动转换为Jira工单
If
Set
Jira
+10
25 节点Trung Tran
工单管理
AI邮件助手 - 智能邮件处理与回复
集成Gmail、GPT-4分类和自动回复的智能邮件管理器
If
Gmail
Limit
+13
36 节点Ronnie Craig
AI 聊天机器人
通过 OpenAI GPT-4o 进行 AI 内容生成,包含人工审核与一键批准工作流
使用GPT-4o简化内容创建,集成一键人工审核批准
If
Set
Code
+8
23 节点Cheng Siong Chin
内容创作
AI个性化多产品邮件营销
基于SMTP轮换的AI个性化多产品邮件营销(GPT-4o/o3-mini)
If
Code
Wait
+16
41 节点Badr
销售