8
n8n 中文网amn8n.com

[MW] AI 客户支持助手 - 云版本

高级

这是一个AI领域的自动化工作流,包含 25 个节点。主要使用 If, Set, Gmail, Aggregate, GoogleDrive 等节点,结合人工智能技术实现智能自动化。 使用Gmail、Google表格、ERP数据和GPT-4o AI自动处理客户支持

前置要求
  • Google 账号和 Gmail API 凭证
  • Google Drive API 凭证
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "tMuFNayeeZYimHLR",
  "meta": {
    "instanceId": "88b34e051213082619adc89dcb3c4c6a3611f57a17080c0af86efd3b8840b94f",
    "templateCredsSetupCompleted": true
  },
  "name": "[MW] AI 客户支持助手 - 云版本",
  "tags": [],
  "nodes": [
    {
      "id": "b617607e-61ae-4107-a72e-2a23b5a57c75",
      "name": "📋 工作流概述",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 450,
        "height": 760,
        "content": "# 🌐 AI 客户支持助手 - 云版本"
      },
      "typeVersion": 1
    },
    {
      "id": "918dd7a6-1c69-43ed-872d-052ebf20a396",
      "name": "📧 电子邮件输入",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        500,
        300
      ],
      "parameters": {
        "color": 2,
        "width": 280,
        "height": 320,
        "content": "## 📧 电子邮件触发器"
      },
      "typeVersion": 1
    },
    {
      "id": "cd753c63-7f5f-4e44-901a-d23eca0cb8e9",
      "name": "📧 收到支持电子邮件",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        620,
        660
      ],
      "parameters": {
        "filters": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "I74VnrmPeKRcOolp",
          "name": "Gmail account dummy@mail.com"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "175a7569-f8d5-49b6-95ca-a83026b2aea4",
      "name": "💬 聊天输入",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        1160
      ],
      "parameters": {
        "color": 2,
        "width": 280,
        "height": 320,
        "content": "## 💬 聊天触发器"
      },
      "typeVersion": 1
    },
    {
      "id": "f9f43182-9113-4ba0-b2a9-b82f3f9b5d46",
      "name": "🧠 AI 分析",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        940,
        300
      ],
      "parameters": {
        "color": 3,
        "width": 300,
        "height": 380,
        "content": "## 🧠 AI 信息提取器"
      },
      "typeVersion": 1
    },
    {
      "id": "99ce470b-9c71-4303-a515-d197bfbf2d78",
      "name": "🤖 OpenAI 模型(提取器)",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        960,
        980
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "M0gBX6dGinkN0Qym",
          "name": "OpenAi account (n8n project)"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "e55da351-bb97-49a8-bbe7-f9f5814f7874",
      "name": "📊 上下文数据",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1540,
        300
      ],
      "parameters": {
        "color": 4,
        "width": 300,
        "height": 380,
        "content": "## 📊 历史支持数据"
      },
      "typeVersion": 1
    },
    {
      "id": "aaf740e0-d78b-41d3-ba92-811c32b06f76",
      "name": "📊 历史支持案例",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1540,
        780
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1526853854,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1iiUzIfOoza0czupn_-4oTY6eOmH4vSENwnjSJ6Uxen4/edit#gid=1526853854",
          "cachedResultName": "zeiss_primotech_support"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1iiUzIfOoza0czupn_-4oTY6eOmH4vSENwnjSJ6Uxen4",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1iiUzIfOoza0czupn_-4oTY6eOmH4vSENwnjSJ6Uxen4/edit?usp=drivesdk",
          "cachedResultName": "Zeiss Primotech Demo customer requests"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "cZ8QhseWRie9tDzV",
          "name": "Google Sheets account dummy@mail.com"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "16e63750-b911-458d-b18d-7ced534dbc44",
      "name": "📋 聚合支持数据",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1740,
        780
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "00c1c023-982b-49f7-a422-f02a3aa1c2a7",
      "name": "📚 知识库",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1160,
        980
      ],
      "parameters": {
        "color": 4,
        "width": 300,
        "height": 440,
        "content": "## 📚 产品知识库"
      },
      "typeVersion": 1
    },
    {
      "id": "d4689f32-4c6c-4fab-94ef-4631b7b07632",
      "name": "📚 下载产品手册",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1540,
        1140
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "list",
          "value": "1_MKUQLEw2RS8k-QgAP5rtw-tD49A82lG",
          "cachedResultUrl": "https://drive.google.com/file/d/1_MKUQLEw2RS8k-QgAP5rtw-tD49A82lG/view?usp=drivesdk",
          "cachedResultName": "Primotech_Manual.pdf"
        },
        "options": {},
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "urrYsyCll4whiZup",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "c291af40-8db0-4050-ad29-17774465cdb0",
      "name": "📄 提取 PDF 内容",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1740,
        1140
      ],
      "parameters": {
        "options": {},
        "operation": "pdf"
      },
      "typeVersion": 1
    },
    {
      "id": "e9a2cbd2-07eb-41a3-9333-2a3d4b936fe2",
      "name": "🏢 ERP 集成",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1500,
        1700
      ],
      "parameters": {
        "color": 5,
        "width": 440,
        "height": 360,
        "content": "## 🏢 ERP 系统集成"
      },
      "typeVersion": 1
    },
    {
      "id": "861dd2a5-b3ad-463c-aa19-f79c7b51c424",
      "name": "🏢 检查 ERP 系统",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1560,
        1500
      ],
      "parameters": {
        "url": "https://run.mocky.io/v3/d8892875-55d6-449d-bab3-3cb7a7b419c0",
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "578d7499-4c72-4181-b1c8-89b05d3bdae0",
      "name": "🤖 AI 回复生成",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2000,
        1020
      ],
      "parameters": {
        "color": 3,
        "width": 320,
        "height": 400,
        "content": "## 🤖 回复生成"
      },
      "typeVersion": 1
    },
    {
      "id": "9858ac0e-2f3a-4476-a892-25c51b6dd654",
      "name": "🤖 生成客户回复",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1960,
        1500
      ],
      "parameters": {
        "text": "=This GPT acts as an expert customer support agent designed to draft thoughtful, accurate responses to customer queries. It takes in customer questions and leverages internal product documentation and a history of previously answered queries to prewrite complete and contextually appropriate replies. The GPT uses the full content of \n\n1. the uploaded Primotech Instruction Manual (in German): \n\n2. a CSV dataset of historical customer questions: {{ $('📋 Aggregate Support Data').item.json.data.toJsonString() }}\n\n3. Customer's original query: {{ \n$('Chat Message Received').isExecuted && $('Chat Message Received').last().json.chatInput;\n$('📧 Support Email Received') && $('📧 Support Email Received').item.json.snippet \n$('When clicking ‘Execute workflow’').isExecuted && $('When clicking ‘Execute workflow’').item.json.snippet\n}} \n\nand answers related to ZEISS Primotech microscopes. These sources provide comprehensive technical, usage, troubleshooting, and product-specific guidance.\n\nThe assistant aims to reduce agent workload by anticipating common follow-up questions, referencing appropriate product knowledge, and maintaining a polite, clear, and supportive tone. It is optimized for high response accuracy, minimal ambiguity, and internal efficiency.\n\nThe assistant never performs web searches. When the available context is insufficient to fully answer a query, it does not generate a customer email. Instead, it presents a warning for the human agent and offers any possibly relevant internal context that may assist in formulating a manual response.\n\nIt avoids answering questions that cannot be supported by available documentation and flags those for manual review. When generating responses, it uses complete, customer-facing sentences, structured for easy review and editing by human support agents, and may include links or references when based on internal content. Clarification is only requested when strictly necessary. If required data is missing, the assistant highlights placeholders for agent completion.\n\nAll responses that are complete must follow this structure:\n- Use a proper salutation starting with 'Sehr geehrter Herr' or 'Sehr geehrte Frau' followed by the customer's last name, if available. If no name is provided, use 'Sehr geehrte/r Kunde/in,'.\n- Begin with 'herzlichen Dank für Ihre Nachricht.'\n- Then insert the drafted response body.\n- If the request involves a spare part, the assistant uses the following API response and includes the relevant spare part name and price from the returned JSON: {{ $json.inventory.toJsonString() }}\n- Close with: 'Bei weiteren Fragen stehen wir Ihnen gerne zur Verfügung, gerne können sie auch unsere (HILFE Seite)[http://www.zeiss.de] besuchen.' and 'Ich wünsche Ihnen einen schönen Tag!'\n\nThe assistant uses professional and accessible language, aligned with the tone expected in technical product support, and maintains a helpful and competent demeanor throughout.",
        "promptType": "define"
      },
      "typeVersion": 1.6,
      "alwaysOutputData": false
    },
    {
      "id": "263a08b7-c29a-4556-af0d-2a42c7981f0f",
      "name": "🤖 OpenAI 模型(生成器)",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1980,
        1680
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "M0gBX6dGinkN0Qym",
          "name": "OpenAi account (n8n project)"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "769b302a-63b2-4801-9b0c-bb25d1f3e432",
      "name": "👥 质量控制",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2420,
        900
      ],
      "parameters": {
        "color": 6,
        "width": 320,
        "height": 460,
        "content": "## 👥 人在回路审批"
      },
      "typeVersion": 1
    },
    {
      "id": "33aa86d8-f613-4d9b-921c-781c796b23d1",
      "name": "📧 电子邮件还是聊天?",
      "type": "n8n-nodes-base.if",
      "position": [
        2280,
        1500
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "2473fa5c-8b22-479c-95e7-583d4adb934f",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $('📧 Support Email Received').isExecuted }}",
              "rightValue": "true"
            }
          ]
        }
      },
      "typeVersion": 2.2,
      "alwaysOutputData": false
    },
    {
      "id": "8eee920b-1a44-4a8a-8db9-6ca32d9d0083",
      "name": "📧 请求审批(电子邮件)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2460,
        1400
      ],
      "webhookId": "7e79cf64-9f20-4968-9bca-3f4dca48ec4c",
      "parameters": {
        "sendTo": "dummy@mail.com",
        "message": "=A customer support response has been generated and requires your approval:\n\n**Customer Query**: \n{{ \n$('Chat Message Received').isExecuted ?? $('Chat Message Received').last().json.chatInput\n$('📧 Support Email Received').isExecuted ?? $('📧 Support Email Received').item.json.snippet \n$('When clicking ‘Execute workflow’').isExecuted ?? $('When clicking ‘Execute workflow’').item.json.snippet\n}}\n\n**Generated Response**:\n{{ $json.text }}\n\nPlease review and approve/reject this response.",
        "options": {},
        "subject": "Customer Support Response - Approval Required",
        "operation": "sendAndWait",
        "approvalOptions": {
          "values": {
            "approvalType": "double"
          }
        }
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "I74VnrmPeKRcOolp",
          "name": "Gmail account dummy@mail.com"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "eee108b0-2d0d-4140-b298-ac0a6bb4422e",
      "name": "📤 发送回复给客户",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2680,
        1400
      ],
      "webhookId": "c994c7a5-5edb-4167-81dd-22e33625450a",
      "parameters": {
        "sendTo": "={{ $('📧 Support Email Received').item.json.From }}",
        "message": "={{ $('🤖 Generate Customer Response').item.json.text }}",
        "options": {},
        "subject": "Re: Your Support Request"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "I74VnrmPeKRcOolp",
          "name": "Gmail account dummy@mail.com"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "b6bb5258-6b1b-48b1-994b-9dbed3062559",
      "name": "📝 格式化聊天回复",
      "type": "n8n-nodes-base.set",
      "position": [
        2460,
        1600
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "409c228d-783f-4e7f-aa47-f0271d8409f8",
              "name": "text",
              "type": "string",
              "value": "={{ $json.text }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "3815458b-3b11-472f-9718-f9fd523b3325",
      "name": "收到聊天消息",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        620,
        1020
      ],
      "webhookId": "3ec1feb8-fc70-4e24-9370-debc47defe81",
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "9f6013c5-f25f-4134-b9b3-9eed10e10db8",
      "name": "AI 信息提取器",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        940,
        780
      ],
      "parameters": {
        "text": "={{ $json.chatInput ? $json.chatInput : $json.snippet }}",
        "options": {},
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"required\": [\"category\", \"urgency\", \"sentiment\", \"keywords\", \"productIdentifiers\", \"customerInfo\", \"requiredAction\"],\n  \"properties\": {\n    \"category\": {\n      \"type\": \"string\",\n      \"enum\": [\"technical\", \"billing\", \"sales\", \"returns\", \"general\"],\n      \"description\": \"The primary category of the customer request\"\n    },\n    \"urgency\": {\n      \"type\": \"string\",\n      \"enum\": [\"low\", \"medium\", \"high\", \"critical\"],\n      \"description\": \"How time-sensitive the request is\"\n    },\n    \"sentiment\": {\n      \"type\": \"string\",\n      \"enum\": [\"positive\", \"neutral\", \"negative\", \"very_negative\"],\n      \"description\": \"The emotional tone of the customer's message\"\n    },\n    \"keywords\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"string\"\n      },\n      \"description\": \"Key terms extracted from the request for searching knowledge base and ERP\"\n    },\n    \"productIdentifiers\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"type\": {\n            \"type\": \"string\",\n            \"enum\": [\"model\", \"serial\", \"part\"]\n          },\n          \"value\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"description\": \"Any product numbers, models, or parts mentioned in the request\"\n    },\n    \"customerInfo\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"firstName\": {\n          \"type\": \"string\"\n        },\n        \"lastName\": {\n          \"type\": \"string\"\n        },\n        \"customerId\": {\n          \"type\": \"string\",\n          \"description\": \"CRM Customer Id\"\n        },\n        \"mentionsCompetitor\": {\n          \"type\": \"boolean\",\n          \"description\": \"Customer references a competitor product or service\"\n        }\n      }\n    },\n    \"requiredAction\": {\n      \"type\": \"string\",\n      \"enum\": [\"information\", \"replacement\", \"refund\", \"repair\", \"callback\", \"escalation\"],\n      \"description\": \"The primary action needed to resolve the customer's request\"\n    }\n  }}"
      },
      "typeVersion": 1
    },
    {
      "id": "7fc3e443-9653-4706-a612-413fb6df1e23",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        800
      ],
      "parameters": {
        "color": 7,
        "width": 440,
        "height": 200,
        "content": "## 如何运行演示"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "583ed6b5-00f7-4fbf-8354-5740c8c59376",
  "connections": {
    "📧 Email or Chat?": {
      "main": [
        [
          {
            "node": "📧 Request Approval (Email)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "📝 Format Chat Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Chat Message Received": {
      "main": [
        [
          {
            "node": "AI Information Extractor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🏢 Check ERP System": {
      "main": [
        [
          {
            "node": "🤖 Generate Customer Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Information Extractor": {
      "main": [
        [
          {
            "node": "📊 Historical Support Cases",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📄 Extract PDF Content": {
      "main": [
        [
          {
            "node": "🏢 Check ERP System",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📋 Aggregate Support Data": {
      "main": [
        [
          {
            "node": "📚 Download Product Manual",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📧 Support Email Received": {
      "main": [
        [
          {
            "node": "AI Information Extractor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📚 Download Product Manual": {
      "main": [
        [
          {
            "node": "📄 Extract PDF Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📊 Historical Support Cases": {
      "main": [
        [
          {
            "node": "📋 Aggregate Support Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📧 Request Approval (Email)": {
      "main": [
        [
          {
            "node": "📤 Send Response to Customer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🤖 OpenAI Model (Extractor)": {
      "ai_languageModel": [
        [
          {
            "node": "AI Information Extractor",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "🤖 OpenAI Model (Generator)": {
      "ai_languageModel": [
        [
          {
            "node": "🤖 Generate Customer Response",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "🤖 Generate Customer Response": {
      "main": [
        [
          {
            "node": "📧 Email or Chat?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 人工智能

需要付费吗?

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

工作流信息
难度等级
高级
节点数量25
分类1
节点类型14
难度说明

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

作者
AOE Agent Lab

AOE Agent Lab

@aoepeople

We are AOE’s AI & Automation Team – engineers, architects, and AI specialists. We build production-ready, agent-based automation using n8n, LLMs, vector stores, and secure toolchains. Our focus: ideation, evaluation-driven development, and scalable AI architecture. All workflows are modular, reusable, and built for real-world application – by practitioners

外部链接
在 n8n.io 查看

分享此工作流