8
n8n 中文网amn8n.com

基于AI的WhatsApp支持机器人(Google Sheets工单创建)

高级

这是一个Support Chatbot, Multimodal AI领域的自动化工作流,包含 35 个节点。主要使用 Set, Xml, Code, Html, Wait 等节点。 基于AI的WhatsApp支持机器人(Google Sheets工单创建)

前置要求
  • Google 账号和 Gmail API 凭证
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
  • OpenAI API Key
  • Pinecone API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "nodes": [
    {
      "id": "c5b15d1f-3f07-4075-83d6-e9b393a20a16",
      "name": "当收到聊天消息时",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        1344,
        720
      ],
      "webhookId": "5365fa15-96ef-4437-90f5-8faeb595b03a",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "91546766-7a95-4b59-8d13-e4b970b28e88",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1776,
        720
      ],
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "b4a7917b-a9e6-4076-9aad-efe7cc4d72c5",
      "name": "表单提交时",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        1104,
        -368
      ],
      "webhookId": "8e81bc08-6fc8-4a47-8e45-63fe28046b5b",
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "f8d14cc9-8eb6-4fc6-9ffc-9c916738b09d",
      "name": "XML",
      "type": "n8n-nodes-base.xml",
      "position": [
        1856,
        -368
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a0af59c0-9c5a-4e4a-8654-fd4546224646",
      "name": "HTTP 请求",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1696,
        -368
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "5ebd8d66-9d86-400e-b601-7fa2e0eb40c0",
      "name": "代码",
      "type": "n8n-nodes-base.code",
      "position": [
        2000,
        -368
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "7dd826d4-a44e-4cf0-b85f-d23410d6a84d",
      "name": "获取页面 HTML",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2736,
        -432
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "ed14bf13-5e46-4465-b93b-0cf8b1cbcc16",
      "name": "HTML",
      "type": "n8n-nodes-base.html",
      "position": [
        2736,
        -624
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "add88ee7-7e17-4c34-a539-7b727e57c3a9",
      "name": "循环遍历页面",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2544,
        -528
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "ef4fcd5d-5fa5-4d75-af9c-58c4f559d7a3",
      "name": "等待",
      "type": "n8n-nodes-base.wait",
      "position": [
        2896,
        -432
      ],
      "webhookId": "9d87e60f-9df8-4a13-9c22-e3e5a5bb9c0e",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "fd7d2d87-8f73-4ce8-8788-b7ee3c983a83",
      "name": "拆分页面 URL",
      "type": "n8n-nodes-base.code",
      "position": [
        1696,
        -544
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "81444721-dcc0-41dc-91f0-5c71f04e3033",
      "name": "Pinecone Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        3296,
        -208
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "a986e0b4-c032-4335-9c9b-c56197f9fbf7",
      "name": "默认数据加载器",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        3488,
        0
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "5e9546d6-b63e-4db8-8ccf-1580dd389079",
      "name": "简单记忆",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1840,
        928
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "a79d3e2d-b7c6-401b-a449-9a46a7d65f43",
      "name": "Pinecone(检索信息)",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        2032,
        928
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "3bef0066-c5f8-420a-8064-ed0311b03a97",
      "name": "公司信息",
      "type": "n8n-nodes-base.set",
      "position": [
        1568,
        720
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "40eb17ab-e6cd-4a88-8842-de528839a47e",
      "name": "提取文本",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        2512,
        32
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "51d7cd78-8fb6-43cf-af33-460105ea6185",
      "name": "提取 PDF",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        2512,
        -128
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "673ce2d3-e67b-4d19-9d2b-16817d543b1a",
      "name": "选择文本",
      "type": "n8n-nodes-base.set",
      "position": [
        2704,
        32
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "3f4379fb-1ee1-45a2-8038-41150aa0819d",
      "name": "PDF 或 TXT",
      "type": "n8n-nodes-base.switch",
      "position": [
        2304,
        -48
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "15a0a6a4-302d-45e4-af7c-72b21efc59dc",
      "name": "合并",
      "type": "n8n-nodes-base.merge",
      "position": [
        2192,
        -528
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "9be77a2b-5508-414b-92a1-e4c3178cc160",
      "name": "移除重复项",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        2336,
        -528
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "1ccd6382-e370-47f7-902a-bc9ecf7f1ac6",
      "name": "循环遍历文件",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2080,
        -192
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "c55ec9ad-9cf9-4813-a1cb-5a5bc8844469",
      "name": "开关1",
      "type": "n8n-nodes-base.switch",
      "position": [
        1376,
        -384
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "907ad368-9129-4d81-acbd-ad7d48de0787",
      "name": "拆分_二进制",
      "type": "n8n-nodes-base.code",
      "position": [
        1856,
        -64
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "05ac9943-f6de-43ab-b9bd-470d39e0db3d",
      "name": "获取工单",
      "type": "n8n-nodes-base.googleSheetsTool",
      "position": [
        2384,
        848
      ],
      "parameters": {},
      "typeVersion": 4.6
    },
    {
      "id": "df90fdae-4d8f-43a7-acf9-1c2349b8cf02",
      "name": "创建支持工单",
      "type": "n8n-nodes-base.googleSheetsTool",
      "position": [
        2560,
        784
      ],
      "parameters": {},
      "typeVersion": 4.6
    },
    {
      "id": "05b6a554-0465-4595-821a-eac544c98b51",
      "name": "在 Gmail 中发送消息",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        1856,
        1200
      ],
      "webhookId": "d78e82ae-5289-4213-b1f4-7fb749b83dad",
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "6d27f310-28e3-4698-b09c-d924e5d77b4a",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1664,
        928
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "53eb3e5f-8a73-4e8d-ab6e-840eb196f61d",
      "name": "OpenAI 嵌入",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        2112,
        1120
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "e6a670ff-1815-44f7-ad82-99a4ea356ebb",
      "name": "Embeddings OpenAI1",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        3280,
        16
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "ac031d5a-ed46-4c36-8213-734a08fc2c1f",
      "name": "WhatsApp 触发器",
      "type": "n8n-nodes-base.whatsAppTrigger",
      "position": [
        1344,
        544
      ],
      "webhookId": "64048f32-bac4-473d-9a2a-9193401d3937",
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "77349f3e-1292-432f-822a-4ca1d0b4a20d",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1008,
        -688
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "29fe4f2c-eed7-4e14-9f89-53e7bf689eaf",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1008,
        432
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "0bbf9a71-f76d-49c5-8552-ae7b34dd1798",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        -688
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "XML": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "HTML": {
      "main": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Loop Over Pages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Remove Duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch1": {
      "main": [
        [
          {
            "node": "Split Pages URLs",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Split_Binary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PDF or TXT": {
      "main": [
        [
          {
            "node": "Extract PDF",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Extract Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract PDF": {
      "main": [
        [
          {
            "node": "Select Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get tickets": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Select Text": {
      "main": [
        [
          {
            "node": "Loop Over Files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Company Info": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Text": {
      "main": [
        [
          {
            "node": "Loop Over Files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "XML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split_Binary": {
      "main": [
        [
          {
            "node": "Loop Over Files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Page HTML": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Files": {
      "main": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "PDF or TXT",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Pages": {
      "main": [
        [
          {
            "node": "HTML",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Fetch Page HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Pages URLs": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "WhatsApp Trigger": {
      "main": [
        [
          {
            "node": "Company Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone (Retrieve Info)",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicates": {
      "main": [
        [
          {
            "node": "Loop Over Pages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI1": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Switch1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Create support tickets": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Send a message in Gmail": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Pinecone (Retrieve Info)": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Company Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 客服机器人, 多模态 AI

需要付费吗?

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

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

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

作者
Zain Khan

Zain Khan

@zain

I partner with businesses to streamline processes and accelerate growth through intelligent AI automation and Web/mobile Development. Leveraging deep expertise in GPT-4, LangChain, and n8n, I develop AI-powered agents and sophisticated LLM pipelines.

外部链接
在 n8n.io 查看

分享此工作流