使用Gmail、GPT-4和向量知识库的自动化客户支持系统
高级
这是一个AI RAG, Multimodal AI领域的自动化工作流,包含 32 个节点。主要使用 If, Set, Code, Gmail, Telegram 等节点。 使用Gmail、GPT-4和向量知识库的自动化客户支持系统
前置要求
- •Google 账号和 Gmail API 凭证
- •Telegram Bot Token
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
- •OpenAI API Key
- •Qdrant 服务器连接信息
使用的节点 (32)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "b1b3b6962659881ba56842bd186156e739ee49465032539adf6dd86734a8d47a",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "dff6847c-c448-484d-9d17-b56038cdbb48",
"name": "获取对话历史",
"type": "n8n-nodes-base.gmail",
"position": [
-1824,
1808
],
"webhookId": "b9d2f8fc-ba53-4fdb-a7df-b01c297ffb87",
"parameters": {},
"typeVersion": 2.1
},
{
"id": "6d7bcf76-5e0f-4c31-be1b-2eafee23e0d4",
"name": "处理对话历史",
"type": "n8n-nodes-base.code",
"position": [
-1648,
1808
],
"parameters": {},
"typeVersion": 2
},
{
"id": "400f9dac-96ab-449d-be52-769f68f4ac9e",
"name": "AI 分析代理",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1088,
1984
],
"parameters": {},
"typeVersion": 1.9
},
{
"id": "33f40c6f-b611-47ad-b191-fc8580cdb0d9",
"name": "处理 AI 分析",
"type": "n8n-nodes-base.set",
"position": [
-720,
1984
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "89979abb-b901-435a-a0c4-f730ed4bfa67",
"name": "需要升级处理?",
"type": "n8n-nodes-base.if",
"position": [
-304,
1984
],
"parameters": {},
"typeVersion": 2
},
{
"id": "a9668608-2076-4149-adb0-4f7a93c679c9",
"name": "发送自动回复",
"type": "n8n-nodes-base.gmail",
"position": [
0,
1808
],
"webhookId": "fed72075-afad-49e2-a0c9-4421b72d133a",
"parameters": {},
"typeVersion": 2.1
},
{
"id": "166db4bd-1247-45a5-99f2-e32f4059bfa7",
"name": "记录工单到 Google Sheets",
"type": "n8n-nodes-base.googleSheets",
"position": [
528,
1984
],
"parameters": {},
"typeVersion": 4.4
},
{
"id": "29592047-bfaa-4933-bea5-c80e0e5665f1",
"name": "发送状态更新",
"type": "n8n-nodes-base.telegram",
"position": [
768,
1984
],
"webhookId": "3c149149-0585-4c0c-8664-b307356652bc",
"parameters": {},
"executeOnce": true,
"typeVersion": 1.2
},
{
"id": "4e85fdfb-6b40-418a-a7d4-2475d0a6b7f3",
"name": "Gmail 触发器1",
"type": "n8n-nodes-base.gmailTrigger",
"position": [
-2416,
1984
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "1272297d-6f1e-49b6-b04c-6e2d1078ee07",
"name": "OpenAI 聊天模型1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-1136,
2192
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "e1287b4b-770e-489f-8f7b-3d6cbc7bdc19",
"name": "Qdrant Vector Store",
"type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
"position": [
-960,
2192
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "c358ab1b-cb29-4a8f-8718-a9896b4440d1",
"name": "嵌入向量 Mistral Cloud",
"type": "@n8n/n8n-nodes-langchain.embeddingsMistralCloud",
"position": [
-960,
2320
],
"parameters": {},
"typeVersion": 1
},
{
"id": "87ba9f81-ad93-41b2-bc1d-cd0040f3d206",
"name": "筛选新客户邮件",
"type": "n8n-nodes-base.if",
"position": [
-2000,
1984
],
"parameters": {},
"typeVersion": 2
},
{
"id": "1b701c63-89c7-4ac6-bbec-745bf99a37a6",
"name": "提取电子邮件数据",
"type": "n8n-nodes-base.set",
"position": [
-2224,
1984
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "f71fd648-15df-433e-a2e4-ba51e5f1fdf3",
"name": "AI 分析代理1",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-544,
2544
],
"parameters": {},
"typeVersion": 1.9
},
{
"id": "b6ab5fcd-0093-494b-93aa-76e574871b32",
"name": "处理 AI 分析1",
"type": "n8n-nodes-base.set",
"position": [
-176,
2544
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "dad6b53e-cd97-448e-96eb-8751b2c72cc3",
"name": "OpenAI 聊天模型2",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-608,
2752
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "6c30cdd7-248a-4aca-a29a-9ee3014e7b74",
"name": "Qdrant 向量存储 1",
"type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
"position": [
-496,
2768
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "99d791ae-7fba-4a24-b5a8-65a18dc34548",
"name": "嵌入向量 Mistral Cloud1",
"type": "@n8n/n8n-nodes-langchain.embeddingsMistralCloud",
"position": [
-464,
2944
],
"parameters": {},
"typeVersion": 1
},
{
"id": "a7f0f0c8-77b8-4b1e-bc17-8aa6d77004e2",
"name": "结构化输出解析器1",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
-256,
2720
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "c17395d1-26ea-4097-98e6-39830febe824",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-880,
2448
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "7501e27e-cdb7-46fa-938f-83d1105857fa",
"name": "需要人工审核标签",
"type": "n8n-nodes-base.gmail",
"position": [
80,
2112
],
"webhookId": "19e98ea6-9d91-460a-8c3a-5ed7601e5463",
"parameters": {},
"typeVersion": 2.1
},
{
"id": "6b89232a-e6f1-455a-b2da-51829d0cdb5f",
"name": "自动解决标签",
"type": "n8n-nodes-base.gmail",
"position": [
304,
1808
],
"webhookId": "19e98ea6-9d91-460a-8c3a-5ed7601e5463",
"parameters": {},
"typeVersion": 2.1
},
{
"id": "1de2ebce-9b6e-402a-8653-21b2e1fb0956",
"name": "聚合",
"type": "n8n-nodes-base.aggregate",
"position": [
-1456,
1808
],
"parameters": {},
"typeVersion": 1
},
{
"id": "a5ded5ae-ce8f-4d7c-ab5c-4ecbbd19ead5",
"name": "编辑字段",
"type": "n8n-nodes-base.set",
"position": [
-528,
1984
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "c2c9d1d2-78cc-4342-abe8-55a40c3d1c77",
"name": "编辑字段 1",
"type": "n8n-nodes-base.set",
"position": [
-1328,
1984
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "92ecd5f5-0324-4139-8065-549dfeeddf3f",
"name": "表单提交时",
"type": "n8n-nodes-base.formTrigger",
"position": [
-2416,
2736
],
"webhookId": "5aa2c420-a473-4422-8128-b2861c0f0e9c",
"parameters": {},
"typeVersion": 2.2
},
{
"id": "25557f12-f0ca-4412-b069-a8acafe28563",
"name": "Default Data Loader1",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
-1712,
2912
],
"parameters": {},
"typeVersion": 1
},
{
"id": "624b7d08-9f53-4e7a-8d28-86cb03ea1d0e",
"name": "递归字符文本分割器",
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
"position": [
-1696,
3072
],
"parameters": {},
"typeVersion": 1
},
{
"id": "4a588f35-5bc1-42f1-811d-6efe27fc1803",
"name": "创建集合1",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"disabled": true,
"position": [
-2160,
2528
],
"parameters": {},
"typeVersion": 4.2,
"alwaysOutputData": true
},
{
"id": "db044436-a22a-409e-940e-5863d7d177a2",
"name": "Qdrant 向量存储2",
"type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
"position": [
-1856,
2736
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "aa3f2a30-b780-4317-8884-a2e3c7da6952",
"name": "嵌入向量 Mistral Cloud2",
"type": "@n8n/n8n-nodes-langchain.embeddingsMistralCloud",
"position": [
-1888,
2912
],
"parameters": {},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Aggregate": {
"main": [
[
{
"node": "Edit Fields1",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Needs Escalation?",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields1": {
"main": [
[
{
"node": "AI Analysis Agent",
"type": "main",
"index": 0
}
]
]
},
"Gmail Trigger1": {
"main": [
[
{
"node": "Extract Email Data",
"type": "main",
"index": 0
}
]
]
},
"AI Analysis Agent": {
"main": [
[
{
"node": "Process AI Analysis",
"type": "main",
"index": 0
}
]
]
},
"Needs Escalation?": {
"main": [
[
{
"node": "Needs Human Review Label",
"type": "main",
"index": 0
}
],
[
{
"node": "Send Automated Reply",
"type": "main",
"index": 0
},
{
"node": "Auto Resolved Label",
"type": "main",
"index": 0
}
]
]
},
"AI Analysis Agent1": {
"main": [
[
{
"node": "Process AI Analysis1",
"type": "main",
"index": 0
}
]
]
},
"Extract Email Data": {
"main": [
[
{
"node": "Filter New Customer Emails",
"type": "main",
"index": 0
}
]
]
},
"Get Thread History": {
"main": [
[
{
"node": "Process Thread History",
"type": "main",
"index": 0
}
]
]
},
"On form submission": {
"main": [
[
{
"node": "create collection1",
"type": "main",
"index": 0
},
{
"node": "Qdrant Vector Store2",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "AI Analysis Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model2": {
"ai_languageModel": [
[
{
"node": "AI Analysis Agent1",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Auto Resolved Label": {
"main": [
[
{
"node": "Log Ticket to Google Sheets",
"type": "main",
"index": 0
}
]
]
},
"Process AI Analysis": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Qdrant Vector Store": {
"ai_tool": [
[
{
"node": "AI Analysis Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Default Data Loader1": {
"ai_document": [
[
{
"node": "Qdrant Vector Store2",
"type": "ai_document",
"index": 0
}
]
]
},
"Qdrant Vector Store1": {
"ai_tool": [
[
{
"node": "AI Analysis Agent1",
"type": "ai_tool",
"index": 0
}
]
]
},
"Send Automated Reply": {
"main": [
[
{
"node": "Log Ticket to Google Sheets",
"type": "main",
"index": 0
}
]
]
},
"Process Thread History": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
]
]
},
"Embeddings Mistral Cloud": {
"ai_embedding": [
[
{
"node": "Qdrant Vector Store",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Needs Human Review Label": {
"main": [
[
{
"node": "Log Ticket to Google Sheets",
"type": "main",
"index": 0
}
]
]
},
"Embeddings Mistral Cloud1": {
"ai_embedding": [
[
{
"node": "Qdrant Vector Store1",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Embeddings Mistral Cloud2": {
"ai_embedding": [
[
{
"node": "Qdrant Vector Store2",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Structured Output Parser1": {
"ai_outputParser": [
[
{
"node": "AI Analysis Agent1",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Filter New Customer Emails": {
"main": [
[
{
"node": "Edit Fields1",
"type": "main",
"index": 0
}
],
[
{
"node": "Get Thread History",
"type": "main",
"index": 0
}
]
]
},
"Log Ticket to Google Sheets": {
"main": [
[
{
"node": "Send Status Update",
"type": "main",
"index": 0
}
]
]
},
"Recursive Character Text Splitter": {
"ai_textSplitter": [
[
{
"node": "Default Data Loader1",
"type": "ai_textSplitter",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - AI RAG 检索增强, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
AI驱动的邮件分诊与自动回复系统,集成OpenAI代理和Gmail
AI驱动的邮件分诊与自动回复系统,集成OpenAI代理和Gmail
If
Set
Gmail
+20
68 节点Abdullahi Ahmed
内容创作
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
其他
上下文混合RAG AI文案
Google Drive到Supabase上下文向量数据库同步用于RAG应用
If
Set
Code
+25
76 节点Michael Taleb
AI RAG 检索增强
内容生成器 v3
AI驱动博客自动化:使用GPT-4生成并发布SEO文章至WordPress和Twitter
If
Set
Code
+25
144 节点Jay Emp0
内容创作
自适应邮件自动回复器(GPT-4、RAG和人工反馈循环)
自适应邮件自动回复器(GPT-4、RAG和人工反馈循环)
If
Set
Gmail
+15
38 节点LeeWei
内容创作
WordPress博客自动化专业版(深度研究)v2.1市场
使用GPT-4o、Perplexity AI和多语言支持自动化SEO优化的博客创建
If
Set
Xml
+27
125 节点Daniel Ng
内容创作
工作流信息
难度等级
高级
节点数量32
分类2
节点类型18
作者
Khair Ahammed
@khair1212Automation engineer with over 2 years of experience specializing in building scalable and reliable automation solutions using n8n and other cutting-edge tools. With expertise in workflow optimization, API integrations, and process automation, I help businesses streamline their operations and eliminate repetitive tasks.
外部链接
在 n8n.io 查看 →
分享此工作流