自适应邮件自动回复器(GPT-4、RAG和人工反馈循环)
高级
这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 38 个节点。主要使用 If, Set, Gmail, Switch, Markdown 等节点。 自适应邮件自动回复器(GPT-4、RAG和人工反馈循环)
前置要求
- •Google 账号和 Gmail API 凭证
- •Google Sheets API 凭证
- •OpenAI API Key
- •Supabase URL 和 API Key
使用的节点 (38)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "205780d3749915e5b72849aad8492ed96140f3a3cf0d7f077a27e6df51ded409",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "e432c58f-163b-4a96-8a23-5c2749c2bcd1",
"name": "OpenAI 嵌入",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
368,
960
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "25b0117a-152b-4ad3-9114-606d42a8d7f1",
"name": "Supabase向量存储",
"type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
"position": [
400,
800
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "8fbca9a7-f3cc-4d13-ba37-427d62cedc9d",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
176,
800
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "d67fb10b-10f5-4d02-9a9d-1d69c07fd658",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
384,
416
],
"parameters": {},
"typeVersion": 1.8
},
{
"id": "0b7e252b-8e97-4ec7-9d9e-2ee120cb09a7",
"name": "自动修复输出解析器",
"type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
"position": [
720,
800
],
"parameters": {},
"typeVersion": 1
},
{
"id": "8156059d-5ae2-41a4-bc27-92ff8f2a46b7",
"name": "OpenAI 聊天模型1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
656,
960
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "f543ac29-3eb4-4554-b6aa-0e2285cdfb6b",
"name": "结构化输出解析器",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
848,
960
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "85b72d77-0541-45e6-b037-770acec610e9",
"name": "如果",
"type": "n8n-nodes-base.if",
"position": [
1040,
416
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "dc370570-4695-4ba9-9c46-8f08472bc910",
"name": "获取动态提示",
"type": "n8n-nodes-base.googleSheets",
"position": [
-448,
416
],
"parameters": {},
"typeVersion": 4.6
},
{
"id": "a064b42d-5aba-4745-8ed5-4adde17b1dd4",
"name": "编辑字段",
"type": "n8n-nodes-base.set",
"position": [
16,
416
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "d8cec49d-2aa5-413e-af1b-9c77895e91d5",
"name": "Gmail",
"type": "n8n-nodes-base.gmail",
"position": [
1296,
656
],
"webhookId": "82b32cdc-6587-4822-bfdc-03ea10edba0e",
"parameters": {},
"typeVersion": 2.1
},
{
"id": "55196c92-edcd-4dc7-ad96-48ab287d81bf",
"name": "Google Sheets",
"type": "n8n-nodes-base.googleSheets",
"position": [
1488,
352
],
"parameters": {},
"typeVersion": 4.6
},
{
"id": "02fcd994-63fc-4b9c-a9b5-61c6562abb5c",
"name": "Markdown",
"type": "n8n-nodes-base.markdown",
"position": [
1296,
352
],
"parameters": {},
"typeVersion": 1
},
{
"id": "2a83bb18-6ef0-42f2-ab9d-75b3bcc1a35e",
"name": "Google Sheets 触发器",
"type": "n8n-nodes-base.googleSheetsTrigger",
"position": [
-944,
1584
],
"parameters": {},
"typeVersion": 1
},
{
"id": "0cee2309-721d-4ed9-b1be-9b7607cc22fe",
"name": "OpenAI 聊天模型2",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-176,
1792
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "acc3ff75-16c4-4737-a25f-f7527898e387",
"name": "信息提取器",
"type": "@n8n/n8n-nodes-langchain.informationExtractor",
"position": [
-160,
1584
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "6605a7d8-cd6c-4260-a698-229139887305",
"name": "条件判断1",
"type": "n8n-nodes-base.if",
"position": [
-720,
1584
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "12ea4994-6d77-4094-853c-38c1430bfcc8",
"name": "原始回复",
"type": "n8n-nodes-base.markdown",
"position": [
-208,
416
],
"parameters": {},
"typeVersion": 1
},
{
"id": "5620dca5-25ce-412e-8984-068ae1c8a3fb",
"name": "如果2",
"type": "n8n-nodes-base.if",
"position": [
-720,
416
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "b0e81371-4e0b-437d-9e9e-17cb4588fd95",
"name": "获取动态提示1",
"type": "n8n-nodes-base.googleSheets",
"position": [
-416,
1584
],
"parameters": {},
"typeVersion": 4.6
},
{
"id": "9ce74bbc-bc67-4d71-b137-ccc0f8084195",
"name": "Markdown1",
"type": "n8n-nodes-base.markdown",
"position": [
448,
1424
],
"parameters": {},
"typeVersion": 1
},
{
"id": "b89cfee9-17f4-48b9-a308-6cc81c2ceecc",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"position": [
368,
1728
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "09a6bf0a-af94-42b2-91d1-d642f1b80cf1",
"name": "Gmail1",
"type": "n8n-nodes-base.gmail",
"position": [
672,
1424
],
"webhookId": "7582c9f1-a67c-4c9a-a690-2227198d8093",
"parameters": {},
"typeVersion": 2.1
},
{
"id": "7771aa20-b79e-40b8-a485-c63e378c72d3",
"name": "Google Sheets1",
"type": "n8n-nodes-base.googleSheets",
"position": [
672,
1760
],
"parameters": {},
"typeVersion": 4.6
},
{
"id": "202edba7-7a79-4acd-8107-71067b04ed0f",
"name": "Supabase 向量存储1",
"type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
"position": [
1248,
1376
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "5fdd5b0f-3b2e-43f3-8bf5-9a70f3807f5f",
"name": "Embeddings OpenAI1",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
1184,
1568
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "cc316e14-9675-4b74-a94c-8bca710b1a0f",
"name": "默认数据加载器",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
1392,
1504
],
"parameters": {},
"typeVersion": 1
},
{
"id": "b6b530ef-4720-4fdf-80a6-87c01547b01b",
"name": "递归字符文本分割器",
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
"position": [
1344,
1808
],
"parameters": {},
"typeVersion": 1
},
{
"id": "8d8e4d6b-86f1-40cb-bf0a-ff92ceac6463",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1040,
1424
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "c33f3ce5-ed89-4c8c-92c6-b117313f0251",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1168,
192
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "95773e14-3954-4a7a-805d-1f088d8ba01a",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1168,
576
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "b38c1b19-1e0a-41d4-8c67-c0b6aa628dac",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-240,
1312
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "453f19a5-4378-47a0-bb30-6b13ac1a9216",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
288,
1312
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "c33d9300-1069-4e4b-a54d-04d9eb8b0262",
"name": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
608,
1648
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "39cffcf5-647b-441c-8a5e-9032a827bbbe",
"name": "便签7",
"type": "n8n-nodes-base.stickyNote",
"position": [
1120,
1296
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "08939064-db0b-4cc8-9c72-03feed930813",
"name": "便签8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1040,
32
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "5107b6a4-b428-473b-957f-4c65a90b897b",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2512,
32
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "e8bc49f7-64f1-4cc5-8f81-cf63b2f36840",
"name": "Gmail Trigger1",
"type": "n8n-nodes-base.gmailTrigger",
"position": [
-960,
416
],
"parameters": {},
"typeVersion": 1.2
}
],
"pinData": {},
"connections": {
"If": {
"main": [
[
{
"node": "Markdown",
"type": "main",
"index": 0
}
],
[
{
"node": "Gmail",
"type": "main",
"index": 0
}
]
]
},
"If1": {
"main": [
[
{
"node": "Get Dynamic Prompt1",
"type": "main",
"index": 0
}
]
]
},
"If2": {
"main": [
[
{
"node": "Get Dynamic Prompt",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "Google Sheets1",
"type": "main",
"index": 0
}
],
[
{
"node": "Supabase Vector Store1",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"Markdown": {
"main": [
[
{
"node": "Google Sheets",
"type": "main",
"index": 0
}
]
]
},
"Markdown1": {
"main": [
[
{
"node": "Gmail1",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Gmail Trigger1": {
"main": [
[
{
"node": "If2",
"type": "main",
"index": 0
}
]
]
},
"Original Reply": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Embeddings OpenAI": {
"ai_embedding": [
[
{
"node": "Supabase Vector Store",
"type": "ai_embedding",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Embeddings OpenAI1": {
"ai_embedding": [
[
{
"node": "Supabase Vector Store1",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Get Dynamic Prompt": {
"main": [
[
{
"node": "Original Reply",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "Auto-fixing Output Parser",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model2": {
"ai_languageModel": [
[
{
"node": "Information Extractor",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Default Data Loader": {
"ai_document": [
[
{
"node": "Supabase Vector Store1",
"type": "ai_document",
"index": 0
}
]
]
},
"Get Dynamic Prompt1": {
"main": [
[
{
"node": "Information Extractor",
"type": "main",
"index": 0
}
]
]
},
"Google Sheets Trigger": {
"main": [
[
{
"node": "If1",
"type": "main",
"index": 0
}
]
]
},
"Information Extractor": {
"main": [
[
{
"node": "Markdown1",
"type": "main",
"index": 0
},
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Supabase Vector Store": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Auto-fixing Output Parser",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Auto-fixing Output Parser": {
"ai_outputParser": [
[
{
"node": "AI Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Recursive Character Text Splitter": {
"ai_textSplitter": [
[
{
"node": "Default Data Loader",
"type": "ai_textSplitter",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 内容创作, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
其他
AI驱动的邮件分诊与自动回复系统,集成OpenAI代理和Gmail
AI驱动的邮件分诊与自动回复系统,集成OpenAI代理和Gmail
If
Set
Gmail
+20
68 节点Abdullahi Ahmed
内容创作
GPT-4o与错误处理的自动化简历筛选 - Google表格与云端硬盘流程
GPT-4o与错误处理的自动化简历筛选 - Google表格与云端硬盘流程
If
Set
Gmail
+12
34 节点David Olusola
内容创作
使用 OpenAI、QuickChart 和 Google Drive 将电子表格数据转换为智能图表
使用 OpenAI、QuickChart 和 Google Drive 将电子表格数据转换为智能图表
If
Set
Code
+18
82 节点LeeWei
内容创作
基于AI的MIS代理
基于AI的管理信息系统代理
If
Set
Code
+29
129 节点Kumar Shivam
客户支持
使用Gmail、GPT-4和向量知识库的自动化客户支持系统
使用Gmail、GPT-4和向量知识库的自动化客户支持系统
If
Set
Code
+15
32 节点Khair Ahammed
AI RAG 检索增强