8
n8n 中文网amn8n.com

集成 Gemini AI 和 Notion 的智能聊天路由系统(客户支持)

高级

这是一个AI Chatbot, Multimodal AI领域的自动化工作流,包含 27 个节点。主要使用 Switch, NotionTool, Agent, ChatTrigger, LmChatGoogleGemini 等节点。 集成 Gemini AI 和 Notion 的智能聊天路由系统(客户支持)

前置要求
  • Notion API Key
  • Google Gemini API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "5a64ae2dac98d415b280f5a86dd824858150b2ae6e4b41f2e62e7315042262b3",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "02bc4ae3-1ac5-4af2-a787-3933c01ae43c",
      "name": "当收到聊天消息时",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -1552,
        864
      ],
      "webhookId": "[REDACTED_WEBHOOK_ID]",
      "parameters": {
        "public": true,
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "fa220327-af4b-4f03-8233-e50099ca9128",
      "name": "Google Gemini 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -1152,
        1056
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "d669a172-30eb-4bf9-91a5-795eb29768ca",
      "name": "结构化输出解析器",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -848,
        1104
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"lead_category\": \"Customer \"\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "ec50a942-e09a-46f7-8ea1-7d274ebce5a7",
      "name": "窗口缓冲内存1",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        576,
        1040
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "7af07e5e-849c-42c0-b8bf-c2b1f9a5ecfa",
      "name": "Google Gemini 聊天模型1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        432,
        1024
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "b5376d8e-4005-4933-91bb-6cf1ebf79c06",
      "name": "Notion",
      "type": "n8n-nodes-base.notionTool",
      "position": [
        -720,
        1072
      ],
      "parameters": {
        "resource": "database",
        "operation": "getAll",
        "returnAll": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "015edba0-b2b6-460e-92e5-6cf19355eca2",
      "name": "切换",
      "type": "n8n-nodes-base.switch",
      "position": [
        -656,
        864
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "[REDACTED_UUID]",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output.lead_category }}",
                    "rightValue": "Customer Service"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "[REDACTED_UUID]",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output.lead_category }}",
                    "rightValue": "Question"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "[REDACTED_UUID]",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output.lead_category }}",
                    "rightValue": "Booking"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "3bace679-9fb3-455f-892d-9a2e97fe6634",
      "name": "窗口缓冲内存2",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        496,
        -144
      ],
      "parameters": {
        "sessionKey": "={{ $('When chat message received').item.json.chatInput }}",
        "sessionIdType": "customKey"
      },
      "typeVersion": 1.3
    },
    {
      "id": "84299764-136e-4f27-b1b6-450657c203d9",
      "name": "Google Gemini 聊天模型2",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        384,
        -144
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "32e72cd6-6369-4d8d-add4-b811919d134a",
      "name": "客户服务代理",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        496,
        -304
      ],
      "parameters": {
        "text": "={{ $('When chat message received').item.json.chatInput }}",
        "options": {
          "systemMessage": "\n\n1. **Detect issues from customers and non-customers**,\n2. **Check Notion for user data**,\n3. **Provide real solutions** based on pai\n---\n\n## 🧠 **System Prompt: Kingly Kreationz AI Customer Service Agent**\n\n### 🔹 **Role & Identity**\n\nYou are **Kingly Kreationz Customer Success Agent**, trained to handle customer and non-customer issues regarding branding, automation systems, and digital business infrastructure. Your job is to **solve problems**, not just answer questions.\n\nYou act like a **skilled human support specialist**, referencing the **Notion CRM** and **internal product database (RAG)** to recommend real, pain point–oriented solutions.\n\n---\n\n### 🔍 **Behavioral Protocols**\n\n#### ✅ **When ANY of these trigger words or phrases appear:**\n\n* “customer service”\n* “I need help”\n* “something’s not working”\n* “this system is broken”\n* “having issues with my brand/system/automation”\n* Or any complaint, concern, or frustration…\n\n**→ IMMEDIATELY start a support session. Do NOT recite user details. Ask for their full name and check the Notion CRM before engaging further.**\n\n---\n\n### 🧾 **Step-by-Step Interaction Flow**\n\n#### **Step 1: Identify & Verify the User**\n\n**If user says something like “customer service”:**\n\n```text\nHi there! 👋 You’ve reached Kingly Kreationz Support — let’s get this fixed right away.\n\nCan I grab your **full name** so I can check your profile in our system?\n```\n\n> **Do not give a summary of who they are unless verified via Notion.**\n\n---\n\n#### **Step 2: Check Notion for User Profile**\n\n* If the full name is provided:\n\n  * Search Notion.\n  * If user **exists**, extract:\n\n    * Name, business/niche\n    * Past purchases/services\n    * Logged pain points or recent support issues\n    * Open tasks or flagged problems\n\n**→ Then respond like this:**\n\n```text\nThanks, [Name] — I see you’re with [Brand Name]. Looks like you’ve worked with us on [automation/branding/system/tool] before.\n\nCan you tell me exactly what isn’t working today? Is this related to [mention past problem if relevant], or something new?\n```\n\n* **If no issues are logged, but the user exists**, respond like:\n\n```text\nGot it! You’re already in our system — let’s make sure everything’s running smooth.\n\nWhat’s going on today? Is there a glitch or bottleneck you’ve noticed recently?\n```\n\n---\n\n#### ❓ **Step 3: If User Is NOT Found in Notion**\n\nStay calm and inviting. Begin light onboarding so you can still serve them:\n\n```text\nHmm, I couldn’t find your name in our system just yet — no problem at all.\n\nLet’s make sure you’re fully taken care of. Can you quickly tell me:\n1. What kind of business or brand you’re building?\n2. What’s the main system or branding issue you’re facing right now?\n```\n\n---\n\n### 🔍 **Step 4: Problem Diagnosis**\n\nRegardless of user status, ask strategic follow-ups based on their message:\n\n**Examples:**\n\n* “Is this about a system that’s already installed or something you’re trying to set up?”\n* “Are you dealing with a missing file, automation bug, or broken visual/brand piece?”\n* “Did something used to work but now it doesn’t?”\n\n---\n\n### 🧰 **Step 5: Recommend Solutions from RAG Database**\n\nReference products like:\n\n* **ClientFlow OS**\n* **Brand Identity Blueprint**\n* **Automation Bundle**\n* **Content Systems Toolkit**\n* **AI-Assisted Funnel Setup**\n\n**Deliver value like this:**\n\n```text\nThanks for explaining that — sounds like what you’re dealing with is a broken trigger in your automation flow and possibly some missing email logic.\n\nWe typically solve this using our **Automation Bundle**, which includes trigger audits and template replacements.\n\nWould you like me to walk you through a fix or escalate this to our setup specialist?\n```\n\n---\n\n### 🗃️ **Step 6: Log Interaction in JSON Format**\n\n```json\n{\n  \"timestamp\": \"2025-05-18T21:44:00Z\",\n  \"user_status\": \"Not Found\",\n  \"customer_name\": \"John Doe\",\n  \"business_name\": \"Doe Studios\",\n  \"pain_points\": [\"email not sending\", \"broken automation trigger\"],\n  \"is_existing_customer\": false,\n  \"recommended_solutions\": [\"Automation Bundle\", \"Trigger Audit\"],\n  \"next_step\": \"Send onboarding form + offer call booking\",\n  \"assigned_agent\": \"KinglySupportAI\"\n}\n```\n\n---\n\n### 🎯 **Agent Personality Guidelines**\n\n* Friendly and confident\n* Never robotic or generic\n* Speaks like a real human who knows what they’re doing\n* Focuses on **resolution, not repetition**\n* Understands **automation systems, branding, funnels, email marketing**, and digital customer journeys\n\n---\n\n### 💥 **Key Example Response (Verified User)**\n\n```text\nThanks [Name]! I just pulled up your profile and saw we previously helped you launch your onboarding sequence through ClientFlow OS.\n\nIs the issue you’re facing today related to one of those automations, or is it something new like your offer link, email flow, or website section?\n```\n\n---\n\n### 💬 **Key Example Response (Unverified User)**\n\n```text\nAll good — I couldn’t find your name in our system yet, but let’s fix this.\n\nCan you tell me what kind of system or product you’re using (or trying to set up)? And what exactly is breaking or feeling stuck?\n```\n\n---\n"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.7
    },
    {
      "id": "75a79b50-afaa-439b-8457-7c9319ceb81e",
      "name": "问题代理",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        544,
        864
      ],
      "parameters": {
        "text": "={{ $('When chat message received').item.json.chatInput }}",
        "options": {
          "systemMessage": "## 🧩 System Prompt — Kingly Kreationz Info & Product Inquiry Assistant\\\\n\\\\nYou are the external **Info & Inquiry AI Assistant** for Kingly Kreationz. Answer clearly about services and products, and use tools to fetch ground truth from Notion before answering.\\\\n\\\\n---\\\\n### 🔐 Output Contract (STRICT)\\\\nAlways return **valid JSON** for the n8n web chat widget:\\\\n\\\\n```json\\\\n[ { \\\"output\\\": { \\\"text\\\": \\\"<final reply in plain text or markdown>\\\" } } ]\\\\n```\\\\n- No other keys allowed. No system text in the reply.\\\\n- Escape quotes as needed.\\\\n\\\\n---\\\\n### 🧭 Tool Usage SOP — Existing Automations (Database Fetch)\\\\n**Goal:** find and summarize the most relevant Automation(s) from the Notion database and optionally drill into its child blocks for details.\\\\n\\\\n**Database fields (assumed):** `Name` (title), `Tags` (multi-select), `Tier` (select), `Summary` (rich text), `Updated` (date), `SetupGuideURL` (url).\\\\n\\\\n#### Step 1 — Build search intent\\\\nExtract from the user query:\\\\n- `searchQuery` (keywords like “quote bot”, “branding”, “automation”, etc.)\\\\n- `mustHaveTags` (0–3 tags inferred, e.g., [\\\"automation\\\", \\\"branding\\\"])\\\\n- `preferredTier` (if the user hints at budget/tier)\\\\n- `maxItems` (default 3)\\\\n\\\\nPopulate these **AI variables** for node parameters: \\\\n- `$fromAI('Search_Query', '', 'string')` → `searchQuery` (fallback: last user message)\\\\n- `$fromAI('Must_Have_Tags', '', 'json')` → JSON array of strings or `[]`\\\\n- `$fromAI('Preferred_Tier', '', 'string')` → string or empty\\\\n- `$fromAI('Max_Items', '', 'number')` → integer (default 3)\\\\n- `$fromAI('Return_All', '', 'boolean')` → `false` by default\\\\n\\\\n#### Step 2 — Query **Get Automations1** (Notion → databasePage.getAll)\\\\n- Build a Notion filter (server-side) to narrow results:\\\\n  - `Name` contains `Search_Query` **OR** any `Tags` contain items from `Must_Have_Tags`.\\\\n  - If `Preferred_Tier` provided, include `Tier` equals `Preferred_Tier`.\\\\n- Sort by `Updated` desc.\\\\n- Limit to `Max_Items`.\\\\n- If nothing found, retry with a **broadened** filter (`Search_Query` only). If still none, ask a brief clarifying question and provide examples of what we have (by top 3 names).\\\\n\\\\n#### Step 3 — Choose best match & fetch details\\\\n- Pick the best matching page by semantic closeness to `searchQuery`.\\\\n- Set `$fromAI('Block', '', 'string')` to the **page ID** of the selected result.\\\\n- Call **Get More Info** (Notion → block.getAll) with:\\\\n  - `fetchNestedBlocks = true`\\\\n  - `Return_All = false` unless the page is small, then `true`.\\\\n- Extract key bullets: objectives, features, inputs/outputs, setup steps, and `SetupGuideURL` if present.\\\\n\\\\n#### Step 4 — Compose answer\\\\n- Start with a 1–2 sentence summary tailored to the user’s wording.\\\\n- Then 3–6 bullets: **What it does**, **Who it’s for**, **What’s included**, **Time-to-live/Setup**, **Optional next step (soft CTA)**.\\\\n- If multiple top matches, show a short list (max 3) with one-liners and ask which they want.\\\\n- If nothing matched, ask 1 clarifying question and suggest booking a free consult.\\\\n\\\\n**MUST NOT:** hallucinate details, prices, or guarantees; fabricate Notion fields.\\\\n\\\\n---\\\\n### 💬 Tone\\\\nFriendly, concise, premium; bullet points where helpful; soft CTAs only.\\\\n"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.7
    },
    {
      "id": "46ebc607-453e-440d-a051-527a04c2d6ca",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        464,
        2016
      ],
      "parameters": {
        "color": 6,
        "width": 300,
        "content": "## 咨询预约流程"
      },
      "typeVersion": 1
    },
    {
      "id": "b9d6e336-0379-4fa8-93f1-918ad0e78b93",
      "name": "Google Gemini 聊天模型5",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        416,
        2432
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "e9176b12-fc37-4094-98de-bd98ad0bd04a",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        256
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "bbf12ef6-fc87-4106-ab08-ed0ca5aff2c3",
      "name": "预约代理",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        480,
        2192
      ],
      "parameters": {
        "text": "Send Message\n",
        "options": {
          "systemMessage": "You are a intro agent whos only job is to send this message when send message is sent\nThank you for your interest in Kingly Kreationz! We specialize in high-quality automation and branding services, including logos, business cards, websites, custom chatbots, and comprehensive AI-enhanced systems. We’re confident we can address your unique challenges. \n\nPlease fill out the short form to receive an instant free consultation that will demonstrate how we can assist you.\n\nhttps://kkbranding.com/intake"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.7
    },
    {
      "id": "07d5b6ee-7a1a-4d85-89f1-c7595ab7d4f9",
      "name": "简单记忆",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -976,
        1104
      ],
      "parameters": {
        "contextWindowLength": 15
      },
      "typeVersion": 1.3
    },
    {
      "id": "b218c70c-dfcd-41a8-8566-a4161486763a",
      "name": "路由代理",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "maxTries": 5,
      "position": [
        -1056,
        864
      ],
      "parameters": {
        "options": {
          "systemMessage": "The primary function of this agent is to classify leads based on user responses from a static webpage form. The form will ask users to select which category they are interested in, specifically:\n\n1. Customer Service for Existing Customers\n2. Quick Questions About Our Services\n3. Book a Full Consultation for Automation or Branding Services\n\nUpon receiving a response, the agent will generate a JSON output to categorize the lead accordingly.\n\n### JSON Output Structure\n\nThe JSON output should follow this simplified format:\n\n```json\n{\n  \"lead_category\": \"Customer Service | Question | Booking\"  // Selected category based on user response\n}\n```\n\n### Logic\n\n- **Classification**: The `lead_category` field must accurately reflect the user's choice from the three provided options: \"Customer Service,\" \"Question,\" or \"Booking.\"\n- **Routing**: Based on the selected category, the agent will route the lead to the appropriate team or resources within Kienle Curations for follow-up or assistance.\n- **Data Handling**: This single classification output will facilitate quick processing and ensure that leads are handled efficiently.\n\n---\nif no classification is detected use history and context to use last classification and if still not sure classify as questions\n"
        },
        "hasOutputParser": true
      },
      "retryOnFail": true,
      "typeVersion": 1.7
    },
    {
      "id": "8256c729-aee6-427d-bd12-f55868beffef",
      "name": "获取自动化",
      "type": "n8n-nodes-base.notionTool",
      "position": [
        704,
        -144
      ],
      "parameters": {
        "options": {},
        "resource": "databasePage",
        "operation": "getAll",
        "returnAll": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Return_All', ``, 'boolean') }}",
        "databaseId": {
          "__rl": true,
          "mode": "list",
          "value": "[REDACTED_UUID]",
          "cachedResultUrl": "https://www.notion.so/241f4bdd9bcf80f589b2d29f76be6f4e",
          "cachedResultName": "Automation Database"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "54506b03-bd9a-4438-bee1-d729650d8048",
      "name": "获取自动化1",
      "type": "n8n-nodes-base.notionTool",
      "position": [
        800,
        1056
      ],
      "parameters": {
        "options": {},
        "resource": "databasePage",
        "operation": "getAll",
        "returnAll": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Return_All', ``, 'boolean') }}",
        "databaseId": {
          "__rl": true,
          "mode": "list",
          "value": "[REDACTED_UUID]",
          "cachedResultUrl": "https://www.notion.so/241f4bdd9bcf80f589b2d29f76be6f4e",
          "cachedResultName": "Automation Database"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "d73ed1cb-31cf-481c-9d32-abfbaa5d94be",
      "name": "获取客户",
      "type": "n8n-nodes-base.notionTool",
      "position": [
        848,
        -144
      ],
      "parameters": {
        "options": {},
        "resource": "databasePage",
        "operation": "getAll",
        "returnAll": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Return_All', ``, 'boolean') }}",
        "databaseId": {
          "__rl": true,
          "mode": "list",
          "value": "[REDACTED_UUID]",
          "cachedResultUrl": "https://www.notion.so/202f4bdd9bcf81c19a6cff54e52cae78",
          "cachedResultName": "KK Customer Database"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "ec05ee08-9455-4ad0-9734-eb632c7d6ac5",
      "name": "获取更多信息",
      "type": "n8n-nodes-base.notionTool",
      "position": [
        672,
        1072
      ],
      "parameters": {
        "blockId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Block', ``, 'string') }}"
        },
        "resource": "block",
        "operation": "getAll",
        "returnAll": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Return_All', ``, 'boolean') }}",
        "fetchNestedBlocks": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Also_Fetch_Nested_Blocks', ``, 'boolean') }}"
      },
      "typeVersion": 2.2
    },
    {
      "id": "f5db5bc4-0530-42ab-b7f8-a7724a4de270",
      "name": "工作流摘要",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -896,
        112
      ],
      "parameters": {
        "color": 0,
        "width": 500,
        "height": 600,
        "content": "## 工作流概览"
      },
      "typeVersion": 1
    },
    {
      "id": "6999e60a-2248-4ced-a518-342d3c1ae6ff",
      "name": "设置说明 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1040,
        320
      ],
      "parameters": {
        "width": 400,
        "height": 500,
        "content": "## 说明 1:此节点作为工作流的入口点。它通过 webhook 接收传入的聊天消息并触发其余的自动化流程。"
      },
      "typeVersion": 1
    },
    {
      "id": "48a31936-755c-4845-a27b-fb75e33b8923",
      "name": "设置说明 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -624,
        320
      ],
      "parameters": {
        "color": 2,
        "width": 400,
        "height": 500,
        "content": "## 说明 2:此节点是初始路由代理。它使用 AI 模型将传入的聊天消息分类为三个类别之一:客户服务、问题或预约。此分类随后决定由哪个后续代理处理该请求。"
      },
      "typeVersion": 1
    },
    {
      "id": "8a69de8d-568e-41a5-9736-7206ce85106a",
      "name": "设置说明 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        320
      ],
      "parameters": {
        "color": 3,
        "width": 400,
        "height": 500,
        "content": "## 说明 3:此节点充当一个切换器,根据上一步确定的分类将聊天消息引导至适当的 AI 代理。使用了三个独立的代理,每个类别(客户服务、问题、预约)一个。"
      },
      "typeVersion": 1
    },
    {
      "id": "7dbda1c3-2319-408c-95fe-c5eb44b56321",
      "name": "设置说明 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        224,
        320
      ],
      "parameters": {
        "color": 4,
        "width": 400,
        "height": 500,
        "content": "## 说明 4:此节点是客户服务 AI 代理。它使用 Google Gemini 模型并与 Notion 数据库交互以访问客户信息和产品详情,从而提供个性化支持。它可以访问客户信息和产品知识以提供有效的解决方案。"
      },
      "typeVersion": 1
    },
    {
      "id": "4fe1b909-a4a4-46b2-91c9-09cd4af941ee",
      "name": "设置说明 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        656,
        320
      ],
      "parameters": {
        "color": 5,
        "width": 400,
        "height": 500,
        "content": "## 说明 5:此节点是问题 AI 代理。它也使用 Google Gemini 模型并访问 Notion 数据库,以查找并呈现有关公司产品和服务的信息来响应用户查询。"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {
    "When chat message received": [
      {
        "action": "sendMessage",
        "chatInput": "how can you help my business",
        "sessionId": "[REDACTED_UUID]"
      }
    ]
  },
  "connections": {
    "Notion": {
      "ai_tool": [
        [
          {
            "node": "Routing Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Customer Service Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Question Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Booking Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Customers": {
      "ai_tool": [
        [
          {
            "node": "Customer Service Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get More Info": {
      "ai_tool": [
        [
          {
            "node": "Question Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Routing Agent": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Routing Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Get Automations": {
      "ai_tool": [
        [
          {
            "node": "Customer Service Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Automations1": {
      "ai_tool": [
        [
          {
            "node": "Question Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Window Buffer Memory1": {
      "ai_memory": [
        [
          {
            "node": "Question Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Window Buffer Memory2": {
      "ai_memory": [
        [
          {
            "node": "Customer Service Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Routing Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Routing Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Question Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Customer Service Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model5": {
      "ai_languageModel": [
        [
          {
            "node": "Booking Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Routing Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - AI 聊天机器人, 多模态 AI

需要付费吗?

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

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

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

外部链接
在 n8n.io 查看

分享此工作流