8
n8n 中文网amn8n.com

Grok-4客户支持代理[RAG]

中级

这是一个Support Chatbot, AI RAG领域的自动化工作流,包含 10 个节点。主要使用 Telegram, GoogleDocsTool, Agent, TelegramTrigger, LmChatXAiGrok 等节点。 使用Grok-4、Google Docs和Telegram构建客户支持代理[RAG]

前置要求
  • Telegram Bot Token
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "",
  "meta": {},
  "name": "Grok-4 客户支持代理 [RAG]",
  "tags": [],
  "nodes": [
    {
      "id": "c459cd5e-837e-4f32-aef0-af8fd0e2a1e8",
      "name": "Telegram 触发器",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -100,
        0
      ],
      "webhookId": "6f8fe019-91ed-4a74-a811-edbc6f9b1c16",
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "",
          "name": "YOUR_TELEGRAMAPI_CREDENTIAL"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b1ce2d6d-766c-44be-ba05-15af7ad25826",
      "name": "* 可选:缓存近期回答(键 = 标准化查询)",
      "type": "@n8n/n8n-nodes-langchain.lmChatXAiGrok",
      "position": [
        140,
        220
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "xAiApi": {
          "id": "",
          "name": "YOUR_XAIAPI_CREDENTIAL"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "034b4be6-f8a0-449f-b4df-6624c0d5419d",
      "name": "简单记忆",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        340,
        220
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "a9f303d6-f341-4237-ba4a-b871fd98d0e8",
      "name": "Google Docs",
      "type": "n8n-nodes-base.googleDocsTool",
      "position": [
        500,
        220
      ],
      "parameters": {
        "operation": "get",
        "documentURL": "https://docs.google.com/document/d/YOUR_DOC_ID/edit"
      },
      "credentials": {
        "googleDocsOAuth2Api": {
          "id": "",
          "name": "YOUR_GOOGLEDOCSOAUTH2API_CREDENTIAL"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "4ed55e57-7143-4882-bad7-428e56018d54",
      "name": "Grok 4 客户支持代理",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        220,
        0
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "id": "dc23ec70-fb68-4be0-b9ea-cf84209a607a",
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        720,
        0
      ],
      "webhookId": "be0498a1-712c-4efe-af95-c6ed6dc04e60",
      "parameters": {
        "text": "YOUR_RESPONSE_TEXT",
        "chatId": "YOUR_CHAT_ID",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "",
          "name": "YOUR_TELEGRAMAPI_CREDENTIAL"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "e225dc2b-60fb-4892-a752-cd967af3c87d",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -200,
        -140
      ],
      "parameters": {
        "color": 2,
        "height": 540,
        "content": "Telegram 触发器"
      },
      "typeVersion": 1
    },
    {
      "id": "5f23ab98-e24c-4298-90ab-066a1510fea0",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        60,
        -140
      ],
      "parameters": {
        "color": 3,
        "width": 580,
        "height": 540,
        "content": "带预加载文档的 Grok-4 客户支持代理"
      },
      "typeVersion": 1
    },
    {
      "id": "febe1849-3b12-4470-b9a0-78ee90b661c3",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        660,
        -140
      ],
      "parameters": {
        "color": 5,
        "width": 280,
        "height": 540,
        "content": "Telegram 输出"
      },
      "typeVersion": 1
    },
    {
      "id": "9700b7cd-f63e-4573-97de-97f396caa67e",
      "name": "便签 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -800,
        -140
      ],
      "parameters": {
        "width": 580,
        "height": 880,
        "content": "🤖 基于文档智能的 Grok-4 客户支持代理"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "",
  "connections": {
    "Google Docs": {
      "ai_tool": [
        [
          {
            "node": "Grok 4 Customer Support Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Grok 4 Customer Support Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Grok 4 Customer Support Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "xAI Grok Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Grok 4 Customer Support Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Grok 4 Customer Support Agent": {
      "main": [
        [
          {
            "node": "Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

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

需要付费吗?

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

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

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

作者
Automate With Marc

Automate With Marc

@marconi

Automating Start-Up and Business processes. Helping non-techies understand and leverage Agentic AI with easy to understand step-by-step tutorials. Check out my educational content: https://www.youtube.com/@Automatewithmarc

外部链接
在 n8n.io 查看

分享此工作流