8
n8n 中文网amn8n.com

使用Google Gemini和PostgreSQL构建GLPI知识库RAG管道

中级

这是一个Internal Wiki, Multimodal AI领域的自动化工作流,包含 9 个节点。主要使用 Agent, ChatTrigger, LmChatGoogleGemini, MemoryBufferWindow, VectorStorePGVector 等节点。 使用Google Gemini和PostgreSQL构建GLPI知识库RAG管道

前置要求
  • Google Gemini API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "98986c4dc0b4b2af9fd0666d254f8b80e6e6b2044e2f3f3eedc76242999f4b5e",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "faa18c92-30d0-481f-b073-0b5efa68fbdf",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        3824,
        992
      ],
      "parameters": {},
      "typeVersion": 1.8
    },
    {
      "id": "dd67e0b2-9986-4506-813e-d9d79b0b9f7b",
      "name": "Google Gemini聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        3392,
        1232
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "0667b08a-42f9-4c74-9560-75f196147468",
      "name": "当收到聊天消息时",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        3488,
        992
      ],
      "webhookId": "8850cfe1-5a35-4bc9-9c02-91ccf4b82c58",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "e828b8eb-b88f-425b-aaca-7081a0145c08",
      "name": "嵌入 Google Gemini1",
      "type": "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini",
      "position": [
        4192,
        1440
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "6f220ede-5bbf-48b7-a5b1-48052fb1dd87",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3488,
        800
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "761568e7-36aa-4dd2-8dc1-a037b0c27218",
      "name": "嵌入 Google Gemini3",
      "type": "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini",
      "position": [
        3904,
        1424
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "e25c8e1e-a871-491e-ad86-fd9575700f96",
      "name": "IT知识库_GLPI",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePGVector",
      "position": [
        4208,
        1280
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "19487e55-30d4-4570-a9e2-6ff9ce92c615",
      "name": "知识库_TI_CONFLUENCE_SGU_GPL",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePGVector",
      "position": [
        3824,
        1264
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "2fe1ca70-36ee-4593-bf7d-33bc1d4ea9f9",
      "name": "简单记忆",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        3648,
        1248
      ],
      "parameters": {},
      "typeVersion": 1.3
    }
  ],
  "pinData": {},
  "connections": {
    "AI Agent": {
      "main": [
        []
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "CONHECIMENTO_TI_GLPI": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Google Gemini1": {
      "ai_embedding": [
        [
          {
            "node": "CONHECIMENTO_TI_GLPI",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Google Gemini3": {
      "ai_embedding": [
        [
          {
            "node": "CONFLUENCE_TI_CONFLUENCE_SGU_GPL",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CONFLUENCE_TI_CONFLUENCE_SGU_GPL": {
      "ai_tool": [
        []
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 内部知识库, 多模态 AI

需要付费吗?

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

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

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
Thiago Vazzoler Loureiro

Thiago Vazzoler Loureiro

@thiagovazzoler

Building Custom Automations with n8n | Node.js Developer | Integration Specialist | Open Source Contributor If you need help with n8n workflows, API integrations, or custom nodes, feel free to connect on LinkedIn: http://linkedin.com/in/thiago-vazzoler-loureiro-24056227

外部链接
在 n8n.io 查看

分享此工作流