8
n8n 中文网amn8n.com

基于Ollama LLM和Pinecone RAG的Gmail客服自动回复系统

中级

这是一个Support, AI领域的自动化工作流,包含 11 个节点。主要使用 Gmail, GmailTrigger, Agent, LmOllama, LmChatOllama 等节点,结合人工智能技术实现智能自动化。 基于Ollama LLM和Pinecone RAG的Gmail客服自动回复系统

前置要求
  • Google 账号和 Gmail API 凭证
  • Pinecone API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "473ff4054f1a6c3ed6f17a2b4a2e55676fe5b921cceb87b2256e6c416c158559",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "fcc4f02d-1e29-4079-97ba-c5d79120b3bc",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        80
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "6cdc9627-679f-4450-a16f-6ae1b90b92c0",
      "name": "Gmail 触发器",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -180,
        200
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "be28ff9c-da0b-47e4-bf1b-c0dd7db660cc",
      "name": "文本分类器",
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "position": [
        40,
        200
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "3b9d2f14-730a-48c7-a211-8fa64e9dc869",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        280,
        380
      ],
      "parameters": {},
      "typeVersion": 1.8
    },
    {
      "id": "3145c4bd-e7a0-4da0-ba24-221de1796a77",
      "name": "Pinecone Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        620,
        400
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "8c68df50-e781-4605-9ef7-0cd14e33530a",
      "name": "标签",
      "type": "n8n-nodes-base.gmail",
      "position": [
        580,
        200
      ],
      "webhookId": "c0c7c2b3-31f9-4cd1-8216-b5862601ddc7",
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "4730d2dc-97c7-49a6-a75b-1cdb458277fb",
      "name": "发送",
      "type": "n8n-nodes-base.gmail",
      "position": [
        780,
        200
      ],
      "webhookId": "63fe17a2-3eca-4444-9cea-34b80b57ee49",
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "f51d6efd-d426-470b-994a-e8d33aa4325d",
      "name": "Ollama 模型",
      "type": "@n8n/n8n-nodes-langchain.lmOllama",
      "position": [
        100,
        380
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "9c1f601b-cb58-41d6-aebc-1f7be0b0269a",
      "name": "嵌入 Ollama",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOllama",
      "position": [
        640,
        560
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "1f2a81de-2c6b-4394-a32e-47a49a220f73",
      "name": "Ollama 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "position": [
        280,
        560
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "951189a8-9a0d-4d78-91d9-0ebfa444f0c7",
      "name": "简单记忆",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        80,
        520
      ],
      "parameters": {},
      "typeVersion": 1.3
    }
  ],
  "pinData": {},
  "connections": {
    "Label": {
      "main": [
        [
          {
            "node": "Send",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Label",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ollama Model": {
      "ai_languageModel": [
        [
          {
            "node": "Text Classifier",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "Text Classifier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Text Classifier": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Embeddings Ollama": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Ollama Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Pinecone Vector Store": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 客户支持, 人工智能

需要付费吗?

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

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

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

作者
Aashit Sharma

Aashit Sharma

@aashitsharma

With a strong background in AI agent systems, RAG pipelines, and open-source automation tools like n8n, LangChain, and Ollama, Aashit specializes in crafting end-to-end solutions that merge intelligence with efficiency. He has developed multiple production-ready n8n templates — from personalized interview prep systems and document generators to AI-powered support agents — all designed to empower teams with scalable, low-code automation.

外部链接
在 n8n.io 查看

分享此工作流