8
n8n 中文网amn8n.com

使用RAG的客户常见问题解答

高级

这是一个Support Chatbot, AI RAG领域的自动化工作流,包含 20 个节点。主要使用 Set, Webhook, GoogleDrive, SplitInBatches, ExtractFromFile 等节点。 使用 Google Drive PDF 和 Azure GPT-4o-mini 的 RAG 客户常见问题解答机器人

前置要求
  • HTTP Webhook 端点(n8n 会自动生成)
  • Google Drive API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "KnDPqmOImxWj0wpJ",
  "meta": {
    "instanceId": "8443f10082278c46aa5cf3acf8ff0f70061a2c58bce76efac814b16290845177",
    "templateCredsSetupCompleted": true
  },
  "name": "使用RAG的客户常见问题解答",
  "tags": [],
  "nodes": [
    {
      "id": "eecd2895-7c90-4c39-aea0-df1bee0c5ea1",
      "name": "下载文件",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        192,
        -208
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "652148d1-e9f2-4c11-a7af-b8be79fc05f4",
      "name": "返回答案",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1488,
        -208
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "22daac0f-0b08-4278-9b30-e860ce13d081",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -480,
        -208
      ],
      "webhookId": "f7b61aa4-937f-4deb-adca-9842956ec0b2",
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "2e48c8de-b4aa-411f-a941-2ca27478d92a",
      "name": "搜索文件和文件夹",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -32,
        -208
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "8c1b6c1d-3867-4de9-a3f7-4da349ad0680",
      "name": "基础 LLM 链",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1088,
        -208
      ],
      "parameters": {},
      "typeVersion": 1.7
    },
    {
      "id": "99f0ca75-788d-4842-a3d5-c3fb8d33926b",
      "name": "Azure OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        1216,
        -16
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "204e7e1d-ca20-4244-97e8-274ff50730a1",
      "name": "获取简报",
      "type": "n8n-nodes-base.set",
      "position": [
        -256,
        -208
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "a7fee491-3849-4f6a-973e-8a3316ad675e",
      "name": "从文件提取",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        640,
        -208
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d4f816ed-f0bf-4ddd-93c6-1faeca103d67",
      "name": "编辑字段1",
      "type": "n8n-nodes-base.set",
      "position": [
        864,
        -208
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "70ca3288-578b-448d-8c91-4db21f90f1b7",
      "name": "遍历项目",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        416,
        -208
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "0b85ed52-433a-41c8-b59c-7ce571a60058",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -624,
        -448
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "53e32f3b-daac-4162-b5c5-2f03f27deb33",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -336,
        -48
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "05b81c89-7025-4391-a9d2-04694cea55a9",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        -528
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "0732aea4-13db-4b15-a23a-90f944fae5f4",
      "name": "便签 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        -32
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "e1b04004-a6c4-49bc-afdc-54595d1aad5f",
      "name": "便签 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        -528
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "b188aeee-b9eb-4f5a-b69c-50d222f36f7e",
      "name": "便签 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        -32
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "1679efb1-ce04-4615-8370-88f080f453ac",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        -560
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "35d57883-2c17-4efa-8962-5885d9864664",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        -560
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "9a9fa02f-082e-46df-b02e-c6fa8970b4bf",
      "name": "便签8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        944,
        0
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "68615f2a-ad06-40c4-a951-14252cb44798",
      "name": "### 替换 Airtable 连接",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1472,
        -528
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "cc50129c-88a8-4116-b3a3-39640cabb090",
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Search files and folders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download File": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain": {
      "main": [
        [
          {
            "node": "Return Answer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Search files and folders": {
      "main": [
        [
          {
            "node": "Download File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 客服机器人, AI RAG 检索增强

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量20
分类2
节点类型9
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
Rahul Joshi

Rahul Joshi

@rahul08

Rahul Joshi is a seasoned technology leader specializing in the n8n automation tool and AI-driven workflow automation. With deep expertise in building open-source workflow automation and self-hosted automation platforms, he helps organizations eliminate manual processes through intelligent n8n ai agent automation solutions.

外部链接
在 n8n.io 查看

分享此工作流