8
n8n 中文网amn8n.com

AI知识库助手与OpenAI、Supabase及Google Drive文档同步

高级

这是一个Internal Wiki, AI RAG领域的自动化工作流,包含 49 个节点。主要使用 Set, Limit, Switch, Supabase, Telegram 等节点。 AI知识库助手与OpenAI、Supabase及Google Drive文档同步

前置要求
  • Supabase URL 和 API Key
  • Telegram Bot Token
  • Google Drive API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "a88d54d0dc140647df8f628579b3d5aae0dedb13c983a1f5c11ee14f54f18774",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "c9437f3c-edbc-431c-be65-bc485d9fd6ad",
      "name": "设置ID",
      "type": "n8n-nodes-base.set",
      "position": [
        860,
        760
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "e556566e-20a1-48b4-b01e-197a402b5a5f",
              "name": "id",
              "type": "string",
              "value": "={{ $json.id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "fc3b2696-d0c1-40e4-a13b-5d274b0b8c69",
      "name": "Supabase 向量存储",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "position": [
        1600,
        760
      ],
      "parameters": {
        "mode": "insert",
        "options": {
          "queryName": "match_documents"
        },
        "tableName": {
          "__rl": true,
          "mode": "list",
          "value": "documents",
          "cachedResultName": "documents"
        }
      },
      "credentials": {
        "supabaseApi": {
          "id": "0xwwr9KuQRNxpYYg",
          "name": "Marketing Ladder"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "71b61728-b87c-40f3-850b-81af6d544b75",
      "name": "默认数据加载器",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        1740,
        980
      ],
      "parameters": {
        "options": {
          "metadata": {
            "metadataValues": [
              {
                "name": "=file_id",
                "value": "={{ $('Set ID').item.json.id }}"
              }
            ]
          }
        }
      },
      "typeVersion": 1
    },
    {
      "id": "36fdd0a5-b95c-4fc3-9427-e67de0f3985f",
      "name": "递归字符文本分割器",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        1840,
        1140
      ],
      "parameters": {
        "options": {},
        "chunkSize": 500,
        "chunkOverlap": 100
      },
      "typeVersion": 1
    },
    {
      "id": "66dd34df-763f-4497-bd73-b2dd78890eb4",
      "name": "OpenAI 嵌入",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        1560,
        980
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "E9waf1c33TsN4RCh",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "3623a178-af67-4f07-b1d6-90ac07857f28",
      "name": "新文件",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        560,
        760
      ],
      "parameters": {
        "event": "fileCreated",
        "options": {},
        "pollTimes": {
          "item": [
            {}
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "mode": "list",
          "value": "1UHQhCrwZg_ZEzBIKv4LR_RWtAyHbxZsg",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1UHQhCrwZg_ZEzBIKv4LR_RWtAyHbxZsg",
          "cachedResultName": "Marketing Ladder Knowledge Base"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "VtotuTJiDPvuSK66",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "5a9c99b2-2876-4fd3-82e1-9212303151ae",
      "name": "下载文件",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1100,
        760
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {
          "googleFileConversion": {
            "conversion": {
              "docsToFormat": "text/plain"
            }
          }
        },
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "VtotuTJiDPvuSK66",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "2493e003-7c9e-4a98-8148-114abd2899ad",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        500,
        560
      ],
      "parameters": {
        "color": 4,
        "width": 820,
        "height": 80,
        "content": "# 上传新文件到知识库"
      },
      "typeVersion": 1
    },
    {
      "id": "3d7f646d-0de0-44da-8cab-568cfa3ead02",
      "name": "从文件提取",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1280,
        760
      ],
      "parameters": {
        "options": {},
        "operation": "text"
      },
      "typeVersion": 1
    },
    {
      "id": "8b949a8f-5dee-4c48-86fa-dc87cdd83198",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        680
      ],
      "parameters": {
        "color": 5,
        "height": 260,
        "content": "## 修复格式"
      },
      "typeVersion": 1
    },
    {
      "id": "2ce675ef-7791-4fe4-86d4-0eeabd827531",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1060,
        680
      ],
      "parameters": {
        "color": 5,
        "width": 420,
        "height": 260,
        "content": "## 提取文件文本"
      },
      "typeVersion": 1
    },
    {
      "id": "1d23677f-e268-4f66-8170-a5c28b4049b5",
      "name": "### 需要帮助?",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1500,
        680
      ],
      "parameters": {
        "color": 5,
        "width": 560,
        "height": 580,
        "content": "## 更新向量数据库"
      },
      "typeVersion": 1
    },
    {
      "id": "f29a335e-e6a5-4a75-8158-0c83e69e25bb",
      "name": "文件已更新",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        560,
        1500
      ],
      "parameters": {
        "event": "fileUpdated",
        "options": {},
        "pollTimes": {
          "item": [
            {}
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "mode": "list",
          "value": "1UHQhCrwZg_ZEzBIKv4LR_RWtAyHbxZsg",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1UHQhCrwZg_ZEzBIKv4LR_RWtAyHbxZsg",
          "cachedResultName": "Marketing Ladder Knowledge Base"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "VtotuTJiDPvuSK66",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ae95c1ce-bcf7-47fb-a3e3-2b6c6d02aa9e",
      "name": "删除行",
      "type": "n8n-nodes-base.supabase",
      "position": [
        840,
        1500
      ],
      "parameters": {
        "tableId": "documents",
        "operation": "delete",
        "filterType": "string",
        "filterString": "=metadata->>file_id=like.*{{ $json.id }}*"
      },
      "credentials": {
        "supabaseApi": {
          "id": "0xwwr9KuQRNxpYYg",
          "name": "Marketing Ladder"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c6f252c0-e81c-48f5-9a7b-6507b467c54d",
      "name": "获取文件ID",
      "type": "n8n-nodes-base.set",
      "position": [
        1120,
        1500
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "b4433ac7-0b70-4405-a564-f3f78f784470",
              "name": "file_id",
              "type": "string",
              "value": "={{ $('File Updated').item.json.id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "4d5bcbf0-fe14-4d24-81f5-72b84712c09d",
      "name": "重新格式化",
      "type": "n8n-nodes-base.limit",
      "position": [
        1320,
        1500
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f55697b5-191d-4865-9970-3462abeb05ef",
      "name": "下载文件1",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1520,
        1500
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Get FIle ID').item.json.file_id }}"
        },
        "options": {
          "googleFileConversion": {
            "conversion": {
              "docsToFormat": "text/plain"
            }
          }
        },
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "VtotuTJiDPvuSK66",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "4fcc245c-e57c-461e-ba04-18122933eacb",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        1280
      ],
      "parameters": {
        "color": 4,
        "width": 640,
        "height": 80,
        "content": "# 更新知识库中的文件"
      },
      "typeVersion": 1
    },
    {
      "id": "78e0be5d-aa5b-49b3-8b52-2fb2db7dd8be",
      "name": "## 试试看!",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        1400
      ],
      "parameters": {
        "color": 5,
        "width": 280,
        "height": 260,
        "content": "## 获取要更新的文件"
      },
      "typeVersion": 1
    },
    {
      "id": "35de9387-b80a-4274-aa57-622d85a60064",
      "name": "GET 模型",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        1400
      ],
      "parameters": {
        "color": 5,
        "width": 400,
        "height": 260,
        "content": "## 修复格式"
      },
      "typeVersion": 1
    },
    {
      "id": "8ffe865f-09ef-426d-9f5c-e7273a13441d",
      "name": "## 1. 创建新的自定义 OpenAI 凭据",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1460,
        1400
      ],
      "parameters": {
        "color": 5,
        "width": 420,
        "height": 260,
        "content": "## 提取文件文本"
      },
      "typeVersion": 1
    },
    {
      "id": "35aecaa8-b327-493f-8526-fbd019bc078d",
      "name": "便签10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1920,
        1400
      ],
      "parameters": {
        "color": 5,
        "width": 600,
        "height": 580,
        "content": "## 更新向量数据库"
      },
      "typeVersion": 1
    },
    {
      "id": "05d5c49a-8eee-4b90-9ec7-2ac6f20cd259",
      "name": "递归字符文本分割器1",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        2320,
        1840
      ],
      "parameters": {
        "options": {},
        "chunkSize": 300,
        "chunkOverlap": 50
      },
      "typeVersion": 1
    },
    {
      "id": "88c403af-3425-4be3-9cc9-c79196df5115",
      "name": "从文件1提取",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1700,
        1500
      ],
      "parameters": {
        "options": {},
        "operation": "text"
      },
      "typeVersion": 1
    },
    {
      "id": "a4c44cc1-54c8-4d32-9d25-6b9b7bedb7a2",
      "name": "OpenAI 嵌入1",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        2040,
        1700
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "E9waf1c33TsN4RCh",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "1784fe6a-6b2e-4fc9-9e28-05284e5f9e15",
      "name": "默认数据加载器1",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        2220,
        1700
      ],
      "parameters": {
        "options": {
          "metadata": {
            "metadataValues": [
              {
                "name": "file_id",
                "value": "={{ $('Reformat').item.json.file_id }}"
              }
            ]
          }
        }
      },
      "typeVersion": 1
    },
    {
      "id": "83950e53-fab5-4f58-af8d-11126c1bfb3f",
      "name": "Supabase 向量存储1",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "position": [
        2060,
        1500
      ],
      "parameters": {
        "mode": "insert",
        "options": {
          "queryName": "match_documents"
        },
        "tableName": {
          "__rl": true,
          "mode": "list",
          "value": "documents",
          "cachedResultName": "documents"
        }
      },
      "credentials": {
        "supabaseApi": {
          "id": "0xwwr9KuQRNxpYYg",
          "name": "Marketing Ladder"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "22c08877-6bb1-4cfa-acda-df2b5814afa0",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        500,
        680
      ],
      "parameters": {
        "color": 5,
        "width": 280,
        "height": 260,
        "content": "## 获取新文件"
      },
      "typeVersion": 1
    },
    {
      "id": "d16c74c1-ccdb-4bc2-b607-c846b56b07d1",
      "name": "便签 11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        760,
        1400
      ],
      "parameters": {
        "color": 5,
        "width": 280,
        "height": 260,
        "content": "## 删除行"
      },
      "typeVersion": 1
    },
    {
      "id": "7d163045-13c3-42d7-9c51-0045c3056a6e",
      "name": "转录",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -1060,
        840
      ],
      "parameters": {
        "options": {},
        "resource": "audio",
        "operation": "transcribe"
      },
      "credentials": {
        "openAiApi": {
          "id": "E9waf1c33TsN4RCh",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.6
    },
    {
      "id": "14ac063c-0f77-4e3d-a603-7cf95d3701c4",
      "name": "文本",
      "type": "n8n-nodes-base.set",
      "position": [
        -1160,
        1040
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "fe7ecc99-e1e8-4a5e-bdd6-6fce9757b234",
              "name": "text",
              "type": "string",
              "value": "={{ $json.message.text }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "dccda445-c531-4009-bb3e-19b927d31d01",
      "name": "语音或文本",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1460,
        980
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "voice",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "281588e5-cab1-47c7-b42a-f75b8e7b659e",
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.message.voice.file_id }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Text",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "8c844924-b2ed-48b0-935c-c66a8fd0c778",
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.message.text }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "4ab95976-d1d8-438f-8112-99395823166c",
      "name": "响应",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -20,
        960
      ],
      "webhookId": "5dced4b9-5066-4036-a4d4-14fc07edd53c",
      "parameters": {
        "text": "={{ $json.output }}",
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "fe6BsXsaL9M04IQi",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "e38d614d-09eb-4f42-9229-6b037ecdc264",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1520,
        800
      ],
      "parameters": {
        "color": 5,
        "width": 680,
        "height": 460,
        "content": "## 转换消息为文本"
      },
      "typeVersion": 1
    },
    {
      "id": "136f7bd7-aa99-4460-b24f-30d65c932cb3",
      "name": "RAG Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -640,
        960
      ],
      "parameters": {
        "text": "={{ $json.text }}",
        "options": {
          "systemMessage": "=# Overview\nYou are a RAG assistant. Your job is to search for queries from a vector database and pass on the search results.\n\n# Tools\n**MarketingLadder**  \n- This is the vector store that you must query to find answers. \n- Use the search findings from the vector store to create an answer to the input query.\n\n## Final Notes\n- If you can't find an answer from the database, then just say you couldn't find an answer. Never use your own knowledge. "
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "5e87da8f-4677-483e-b41c-a79ff11e2750",
      "name": "Telegram 触发器",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -1700,
        980
      ],
      "webhookId": "2e5e253b-982e-4fe3-8048-b64897e77535",
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "fe6BsXsaL9M04IQi",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "2b8470fb-2b8d-4490-8a40-c3479cb0865e",
      "name": "窗口缓冲内存1",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -580,
        1160
      ],
      "parameters": {
        "sessionKey": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "sessionIdType": "customKey"
      },
      "typeVersion": 1.3
    },
    {
      "id": "3e2e080a-62ab-4ab8-889d-d357d250d68d",
      "name": "下载文件2",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -1240,
        840
      ],
      "webhookId": "83bb7385-33f6-4105-8294-1a91c0ebbee5",
      "parameters": {
        "fileId": "={{ $json.message.voice.file_id }}",
        "resource": "file"
      },
      "credentials": {
        "telegramApi": {
          "id": "fe6BsXsaL9M04IQi",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "da9bebc8-452f-493f-aefc-81dcd789f355",
      "name": "Supabase Vector Store3",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "position": [
        -620,
        1340
      ],
      "parameters": {
        "options": {
          "queryName": "match_documents"
        },
        "tableName": {
          "__rl": true,
          "mode": "list",
          "value": "documents",
          "cachedResultName": "documents"
        }
      },
      "credentials": {
        "supabaseApi": {
          "id": "0xwwr9KuQRNxpYYg",
          "name": "Marketing Ladder"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "0360fb6a-ac93-4e83-abb3-b19a5e614a76",
      "name": "OpenAI 聊天模型2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -240,
        1340
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "E9waf1c33TsN4RCh",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "302c2316-d91e-4b57-80d1-8678bcdc718a",
      "name": "便签 12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1800,
        700
      ],
      "parameters": {
        "color": 4,
        "width": 280,
        "height": 80,
        "content": "# RAG聊天机器人"
      },
      "typeVersion": 1
    },
    {
      "id": "9d0d4d0d-ec09-4f0f-bb14-bd6d5ea56c5a",
      "name": "嵌入 OpenAI3",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        -660,
        1520
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "E9waf1c33TsN4RCh",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "ea8349d1-8566-4f67-9e83-3a9b41f94d6b",
      "name": "便利贴13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1820,
        920
      ],
      "parameters": {
        "color": 5,
        "width": 280,
        "height": 260,
        "content": "## 获取新消息"
      },
      "typeVersion": 1
    },
    {
      "id": "d1a77833-3d99-4cc3-80a8-2d9b9c440175",
      "name": "便签14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -820,
        800
      ],
      "parameters": {
        "color": 5,
        "width": 720,
        "height": 860,
        "content": "## RAG系统"
      },
      "typeVersion": 1
    },
    {
      "id": "366a89d0-dd1d-4cd8-9de4-d7caa0433cab",
      "name": "便签15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        900
      ],
      "parameters": {
        "color": 5,
        "width": 320,
        "height": 260,
        "content": "## 将输出作为消息发送"
      },
      "typeVersion": 1
    },
    {
      "id": "11f88e16-7ef0-484f-b7d1-e74e0e639da3",
      "name": "OpenAI Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -760,
        1160
      ],
      "parameters": {
        "model": "gpt-4o",
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "E9waf1c33TsN4RCh",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "5992f547-5327-4091-b4a8-37d6aec6b75e",
      "name": "MarketingLadder",
      "type": "@n8n/n8n-nodes-langchain.toolVectorStore",
      "position": [
        -440,
        1160
      ],
      "parameters": {
        "name": "MarketingLadder",
        "description": "此向量存储包含有关Marketing Ladder机构的信息"
      },
      "typeVersion": 1
    },
    {
      "id": "10baf4fe-5497-4fcc-b624-155b56d17dbe",
      "name": "便签16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2320,
        1900
      ],
      "parameters": {
        "color": 5,
        "width": 440,
        "height": 240,
        "content": "## 你好,我是 Abdul 👋"
      },
      "typeVersion": 1
    },
    {
      "id": "98e8b14c-ea04-4e08-9c3f-3e1510197e03",
      "name": "便签17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2660,
        420
      ],
      "parameters": {
        "width": 780,
        "height": 1420,
        "content": "# 公司RAG知识库代理"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Text": {
      "main": [
        [
          {
            "node": "RAG Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set ID": {
      "main": [
        [
          {
            "node": "Download File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "New File": {
      "main": [
        [
          {
            "node": "Set ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reformat": {
      "main": [
        [
          {
            "node": "Download File1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RAG Agent": {
      "main": [
        [
          {
            "node": "Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transcribe": {
      "main": [
        [
          {
            "node": "RAG Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get FIle ID": {
      "main": [
        [
          {
            "node": "Reformat",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "File Updated": {
      "main": [
        [
          {
            "node": "Delete Row(s)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete Row(s)": {
      "main": [
        [
          {
            "node": "Get FIle ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download File": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Voice or Text": {
      "main": [
        [
          {
            "node": "Download File2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download File1": {
      "main": [
        [
          {
            "node": "Extract from File1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download File2": {
      "main": [
        [
          {
            "node": "Transcribe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MarketingLadder": {
      "ai_tool": [
        [
          {
            "node": "RAG Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Voice or Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Supabase Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "Supabase Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI1": {
      "ai_embedding": [
        [
          {
            "node": "Supabase Vector Store1",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI3": {
      "ai_embedding": [
        [
          {
            "node": "Supabase Vector Store3",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File1": {
      "main": [
        [
          {
            "node": "Supabase Vector Store1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "MarketingLadder",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "RAG Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Supabase Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader1": {
      "ai_document": [
        [
          {
            "node": "Supabase Vector Store1",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Window Buffer Memory1": {
      "ai_memory": [
        [
          {
            "node": "RAG Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Supabase Vector Store3": {
      "ai_vectorStore": [
        [
          {
            "node": "MarketingLadder",
            "type": "ai_vectorStore",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Character Text Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Character Text Splitter1": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader1",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 内部知识库, AI RAG 检索增强

需要付费吗?

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

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

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

作者
Abdul Mir

Abdul Mir

@abdulmir

Hey 👋 I'm Abdul. I build AI-powered systems for marketing agencies and consultants who want to move fast and automate the boring stuff. Think lead gen agents, proposal generators, and content creation systems. I specialize in growth-focused automations and share workflows that save time and land clients.

外部链接
在 n8n.io 查看

分享此工作流