即时RAG构建器
中级
这是一个Engineering, AI, IT Ops领域的自动化工作流,包含 12 个节点。主要使用 GoogleDrive, Agent, GoogleDriveTrigger, ChatTrigger, LmChatOpenAi 等节点,结合人工智能技术实现智能自动化。 使用Google Drive、OpenAI GPT-4o-mini和Pinecone构建和查询RAG系统
前置要求
- •Google Drive API 凭证
- •OpenAI API Key
- •Pinecone API Key
使用的节点 (12)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "xOFhKr29kjrBDnlw",
"meta": {
"instanceId": "2000c64071c20843606b95c63795bb0797c41036047055a6586498e855b96efc",
"templateCredsSetupCompleted": true
},
"name": "即时 RaG 构建器",
"tags": [],
"nodes": [
{
"id": "71812204-ccca-4757-a52f-0cd30c7ef393",
"name": "Google Drive触发器",
"type": "n8n-nodes-base.googleDriveTrigger",
"position": [
-440,
-80
],
"parameters": {
"event": "fileCreated",
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"triggerOn": "specificFolder",
"folderToWatch": {
"__rl": true,
"mode": "list",
"value": "1uf6zZN51rgAuQgid4-Oi314f6mJIQdiB",
"cachedResultUrl": "https://drive.google.com/drive/folders/1uf6zZN51rgAuQgid4-Oi314f6mJIQdiB",
"cachedResultName": "ETOO power"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "IPz4dCJVFC8uaoHw",
"name": "Google Drive account 2"
}
},
"typeVersion": 1
},
{
"id": "e4302b23-c964-421e-a8fd-3e84935a1fea",
"name": "Google Drive",
"type": "n8n-nodes-base.googleDrive",
"position": [
-220,
-80
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "IPz4dCJVFC8uaoHw",
"name": "Google Drive account 2"
}
},
"typeVersion": 3
},
{
"id": "9990d9d8-3c56-49af-beb9-d9a335ed7874",
"name": "Pinecone 向量存储",
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"position": [
40,
-80
],
"parameters": {
"mode": "insert",
"options": {},
"pineconeIndex": {
"__rl": true,
"mode": "list",
"value": "ragfile",
"cachedResultName": "ragfile"
}
},
"credentials": {
"pineconeApi": {
"id": "Q5ey0Vpj2rWRrb7p",
"name": "PineconeApi account 2"
}
},
"typeVersion": 1.1
},
{
"id": "ee09de71-4146-4f51-a036-5eeb0d72044a",
"name": "OpenAI 嵌入",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
-40,
140
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "AAQM78g30SkuHYxB",
"name": "OpenAi success"
}
},
"typeVersion": 1.2
},
{
"id": "b1edcf2c-4b19-43dc-9985-dad03a0e6df2",
"name": "默认数据加载器",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
180,
140
],
"parameters": {
"options": {},
"dataType": "binary"
},
"typeVersion": 1
},
{
"id": "1db4c053-9953-4a63-91cc-676fc59d434d",
"name": "递归字符文本分割器",
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
"position": [
200,
260
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "80e69d74-18ca-4d47-8900-9fa070fd2b22",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-440,
440
],
"parameters": {
"options": {}
},
"typeVersion": 2
},
{
"id": "9679f79a-cbee-4d6e-9633-76c96e5c7ffc",
"name": "当收到聊天消息时",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-720,
440
],
"webhookId": "fa37c7db-d78c-4a86-9de3-7cb6805de74f",
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "3ea509ac-f5dd-410f-b310-587382770773",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-440,
620
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "AAQM78g30SkuHYxB",
"name": "OpenAi success"
}
},
"typeVersion": 1.2
},
{
"id": "6bbee514-a4c6-4ea9-97fb-02d0343c93a9",
"name": "Pinecone 向量存储",
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"position": [
-140,
600
],
"parameters": {
"mode": "retrieve-as-tool",
"options": {},
"toolName": "knowledge_base",
"pineconeIndex": {
"__rl": true,
"mode": "list",
"value": "ragfile",
"cachedResultName": "ragfile"
},
"toolDescription": "call this tool to access the database"
},
"credentials": {
"pineconeApi": {
"id": "Q5ey0Vpj2rWRrb7p",
"name": "PineconeApi account 2"
}
},
"typeVersion": 1.2
},
{
"id": "37fd9772-35c6-4310-b449-f1b07b729f6d",
"name": "嵌入 OpenAI1",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
60,
760
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "AAQM78g30SkuHYxB",
"name": "OpenAi success"
}
},
"typeVersion": 1.2
},
{
"id": "51c6804d-6b49-4a5f-a475-26abef7925b0",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1220,
80
],
"parameters": {
"width": 460,
"height": 620,
"content": "## 即时 RaG 构建器:Drive 到 Pinecone"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "f8ed5291-ab8f-428a-9728-8db5b3c04122",
"connections": {
"Google Drive": {
"main": [
[
{
"node": "Pinecone Vector Store",
"type": "main",
"index": 0
}
]
]
},
"Embeddings OpenAI": {
"ai_embedding": [
[
{
"node": "Pinecone 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": "Pinecone Vector Store1",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Default Data Loader": {
"ai_document": [
[
{
"node": "Pinecone Vector Store",
"type": "ai_document",
"index": 0
}
]
]
},
"Google Drive Trigger": {
"main": [
[
{
"node": "Google Drive",
"type": "main",
"index": 0
}
]
]
},
"Pinecone Vector Store1": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Recursive Character Text Splitter": {
"ai_textSplitter": [
[
{
"node": "Default Data Loader",
"type": "ai_textSplitter",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 工程, 人工智能, IT 运维
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
AI智能助手:与Supabase存储和Google Drive文件对话
AI智能助手:与Supabase存储和Google Drive文件对话
If
Set
Wait
+20
62 节点Mark Shcherbakov
工程
智能客户支持系统(集成GPT-4o、Gmail、Slack和Drive知识库)
集成GPT-4o、Gmail、Slack和Drive知识库的智能客户支持系统
If
Code
Gmail Tool
+13
19 节点David Olusola
客户支持
基于文档的带记忆聊天机器人,使用 OpenAI、Pinecone 和 Google Drive
基于文档的带记忆聊天机器人,使用 OpenAI、Pinecone 和 Google Drive
Merge
Airtable
Aggregate
+15
22 节点Sally
人工智能
AI驱动的客户支持:邮件、知识库与人工升级自动化
AI邮件支持系统:集成Gmail、Gemini、GPT-4、Slack和Google Sheets的工作流程
Set
Gmail
Slack
+13
26 节点David Olusola
工单管理
与Supabase存储中文件对话的AI智能体
与Supabase存储中文件对话的AI智能体
If
Merge
Switch
+15
33 节点Mark Shcherbakov
工程
基于AI的MIS代理
基于AI的管理信息系统代理
If
Set
Code
+29
129 节点Kumar Shivam
客户支持
工作流信息
难度等级
中级
节点数量12
分类3
节点类型10
作者
David Olusola
@dae221AI automation consultant working with ambitious businesses on their most complex operational challenges. For project inquiries, reach me at david@daexai.com
外部链接
在 n8n.io 查看 →
分享此工作流