AutomationFlowsAI & RAG › Smart Chat Routing System with Gemini AI and Notion for Customer Support

Smart Chat Routing System with Gemini AI and Notion for Customer Support

ByYungCEO @mryungceo on n8n.io

Revolutionize your client interactions with this Done‑For‑You AI Customer Service & Lead Routing System. This advanced n8n workflow, powered by Google Gemini and integrated with Notion, is pre-configured and ready to deploy, instantly transforming how you handle inquiries. Stop…

Chat trigger trigger★★★★☆ complexityAI-powered27 nodesChat TriggerGoogle Gemini ChatOutput Parser StructuredMemory Buffer WindowNotion ToolAgent
AI & RAG Trigger: Chat trigger Nodes: 27 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #7524 — we link there as the canonical source.

This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "02bc4ae3-1ac5-4af2-a787-3933c01ae43c",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -1552,
        864
      ],
      "parameters": {
        "public": true,
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "fa220327-af4b-4f03-8233-e50099ca9128",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -1152,
        1056
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "d669a172-30eb-4bf9-91a5-795eb29768ca",
      "name": "Structured Output Parser",
      "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": "Window Buffer Memory1",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        576,
        1040
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "7af07e5e-849c-42c0-b8bf-c2b1f9a5ecfa",
      "name": "Google Gemini Chat Model1",
      "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": "Switch",
      "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": "Window Buffer Memory2",
      "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 Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        384,
        -144
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "32e72cd6-6369-4d8d-add4-b811919d134a",
      "name": "Customer Service Agent",
      "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## \ud83e\udde0 **System Prompt: Kingly Kreationz AI Customer Service Agent**\n\n### \ud83d\udd39 **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\u2013oriented solutions.\n\n---\n\n### \ud83d\udd0d **Behavioral Protocols**\n\n#### \u2705 **When ANY of these trigger words or phrases appear:**\n\n* \u201ccustomer service\u201d\n* \u201cI need help\u201d\n* \u201csomething\u2019s not working\u201d\n* \u201cthis system is broken\u201d\n* \u201chaving issues with my brand/system/automation\u201d\n* Or any complaint, concern, or frustration\u2026\n\n**\u2192 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### \ud83e\uddfe **Step-by-Step Interaction Flow**\n\n#### **Step 1: Identify & Verify the User**\n\n**If user says something like \u201ccustomer service\u201d:**\n\n```text\nHi there! \ud83d\udc4b You\u2019ve reached Kingly Kreationz Support \u2014 let\u2019s 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**\u2192 Then respond like this:**\n\n```text\nThanks, [Name] \u2014 I see you\u2019re with [Brand Name]. Looks like you\u2019ve worked with us on [automation/branding/system/tool] before.\n\nCan you tell me exactly what isn\u2019t 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\u2019re already in our system \u2014 let\u2019s make sure everything\u2019s running smooth.\n\nWhat\u2019s going on today? Is there a glitch or bottleneck you\u2019ve noticed recently?\n```\n\n---\n\n#### \u2753 **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\u2019t find your name in our system just yet \u2014 no problem at all.\n\nLet\u2019s make sure you\u2019re fully taken care of. Can you quickly tell me:\n1. What kind of business or brand you\u2019re building?\n2. What\u2019s the main system or branding issue you\u2019re facing right now?\n```\n\n---\n\n### \ud83d\udd0d **Step 4: Problem Diagnosis**\n\nRegardless of user status, ask strategic follow-ups based on their message:\n\n**Examples:**\n\n* \u201cIs this about a system that\u2019s already installed or something you\u2019re trying to set up?\u201d\n* \u201cAre you dealing with a missing file, automation bug, or broken visual/brand piece?\u201d\n* \u201cDid something used to work but now it doesn\u2019t?\u201d\n\n---\n\n### \ud83e\uddf0 **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 \u2014 sounds like what you\u2019re 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### \ud83d\uddc3\ufe0f **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### \ud83c\udfaf **Agent Personality Guidelines**\n\n* Friendly and confident\n* Never robotic or generic\n* Speaks like a real human who knows what they\u2019re doing\n* Focuses on **resolution, not repetition**\n* Understands **automation systems, branding, funnels, email marketing**, and digital customer journeys\n\n---\n\n### \ud83d\udca5 **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\u2019re 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### \ud83d\udcac **Key Example Response (Unverified User)**\n\n```text\nAll good \u2014 I couldn\u2019t find your name in our system yet, but let\u2019s fix this.\n\nCan you tell me what kind of system or product you\u2019re 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": "Question Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        544,
        864
      ],
      "parameters": {
        "text": "={{ $('When chat message received').item.json.chatInput }}",
        "options": {
          "systemMessage": "## \ud83e\udde9 System Prompt \u2014 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### \ud83d\udd10 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### \ud83e\udded Tool Usage SOP \u2014 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 \u2014 Build search intent\\\\nExtract from the user query:\\\\n- `searchQuery` (keywords like \u201cquote bot\u201d, \u201cbranding\u201d, \u201cautomation\u201d, etc.)\\\\n- `mustHaveTags` (0\u20133 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')` \u2192 `searchQuery` (fallback: last user message)\\\\n- `$fromAI('Must_Have_Tags', '', 'json')` \u2192 JSON array of strings or `[]`\\\\n- `$fromAI('Preferred_Tier', '', 'string')` \u2192 string or empty\\\\n- `$fromAI('Max_Items', '', 'number')` \u2192 integer (default 3)\\\\n- `$fromAI('Return_All', '', 'boolean')` \u2192 `false` by default\\\\n\\\\n#### Step 2 \u2014 Query **Get Automations1** (Notion \u2192 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 \u2014 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 \u2192 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 \u2014 Compose answer\\\\n- Start with a 1\u20132 sentence summary tailored to the user\u2019s wording.\\\\n- Then 3\u20136 bullets: **What it does**, **Who it\u2019s for**, **What\u2019s 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### \ud83d\udcac 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": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        464,
        2016
      ],
      "parameters": {
        "color": 6,
        "width": 300,
        "content": "## CONSULTATION BOOKING FLOW"
      },
      "typeVersion": 1
    },
    {
      "id": "b9d6e336-0379-4fa8-93f1-918ad0e78b93",
      "name": "Google Gemini Chat Model5",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        416,
        2432
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "e9176b12-fc37-4094-98de-bd98ad0bd04a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        256
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "bbf12ef6-fc87-4106-ab08-ed0ca5aff2c3",
      "name": "Booking Agent",
      "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\u2019re 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": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -976,
        1104
      ],
      "parameters": {
        "contextWindowLength": 15
      },
      "typeVersion": 1.3
    },
    {
      "id": "b218c70c-dfcd-41a8-8566-a4161486763a",
      "name": "Routing Agent",
      "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": "Get Automations",
      "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": "Get Automations1",
      "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": "Get Customers",
      "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": "Get More Info",
      "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": "Workflow Summary",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -896,
        112
      ],
      "parameters": {
        "color": 0,
        "width": 500,
        "height": 600,
        "content": "## Workflow Overview\n\nThis workflow is a sophisticated chatbot designed to provide customer support and information.  It routes incoming chat messages based on topic to different AI agents, leverages a knowledge base (Notion), and utilizes a large language model (Google Gemini) for responses.  The workflow includes separate AI agents for handling customer service issues, answering general questions about services, and processing consultation bookings."
      },
      "typeVersion": 1
    },
    {
      "id": "6999e60a-2248-4ced-a518-342d3c1ae6ff",
      "name": "Setup Note 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1040,
        320
      ],
      "parameters": {
        "width": 400,
        "height": 500,
        "content": "## Note 1: Note 1: This node acts as the entry point for the workflow.  It receives incoming chat messages via a webhook and triggers the rest of the automation."
      },
      "typeVersion": 1
    },
    {
      "id": "48a31936-755c-4845-a27b-fb75e33b8923",
      "name": "Setup Note 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -624,
        320
      ],
      "parameters": {
        "color": 2,
        "width": 400,
        "height": 500,
        "content": "## Note 2: Note 2: This node is the initial routing agent. It uses an AI model to classify the incoming chat message into one of three categories: Customer Service, Question, or Booking.  This classification then determines which subsequent agent will handle the request."
      },
      "typeVersion": 1
    },
    {
      "id": "8a69de8d-568e-41a5-9736-7206ce85106a",
      "name": "Setup Note 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        320
      ],
      "parameters": {
        "color": 3,
        "width": 400,
        "height": 500,
        "content": "## Note 3: Note 3: This node acts as a switch, directing the chat message to the appropriate AI agent based on the classification determined in the previous step.  Three separate agents are used, one for each category (Customer Service, Question, Booking)."
      },
      "typeVersion": 1
    },
    {
      "id": "7dbda1c3-2319-408c-95fe-c5eb44b56321",
      "name": "Setup Note 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        224,
        320
      ],
      "parameters": {
        "color": 4,
        "width": 400,
        "height": 500,
        "content": "## Note 4: Note 4: This node is the Customer Service AI agent. It uses a Google Gemini model and interacts with the Notion database to access customer information and product details to provide personalized support. It has access to customer information and product knowledge to provide effective solutions."
      },
      "typeVersion": 1
    },
    {
      "id": "4fe1b909-a4a4-46b2-91c9-09cd4af941ee",
      "name": "Setup Note 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        656,
        320
      ],
      "parameters": {
        "color": 5,
        "width": 400,
        "height": 500,
        "content": "## Note 5: Note 5: This node is the Question AI agent. It also uses a Google Gemini model and accesses the Notion database to find and present information about the company's products and services in response to user inquiries."
      },
      "typeVersion": 1
    }
  ],
  "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
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Revolutionize your client interactions with this Done‑For‑You AI Customer Service & Lead Routing System. This advanced n8n workflow, powered by Google Gemini and integrated with Notion, is pre-configured and ready to deploy, instantly transforming how you handle inquiries. Stop…

Source: https://n8n.io/workflows/7524/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This Chatbot automates the process of discovering job openings and generating tailored job application emails.

Chat Trigger, OpenAI Chat, Mcp Client Tool +12
AI & RAG

ModelRouter. Uses chatTrigger, agent, modelSelector, httpRequest. Chat trigger; 28 nodes.

Chat Trigger, Agent, Model Selector +8
AI & RAG

This workflow creates an AI-powered chatbot that generates custom songs through an interactive conversation, then uploads the results to Google Drive.

Chat Trigger, Google Gemini Chat, Memory Buffer Window +7
AI & RAG

This n8n template turns chat questions into structured financial reports using Gemini and posts them to a Discord channel via webhook. Ask about tickers, sectors, or theses (e.g., “NVDA long‑term outl

Chat Trigger, Memory Buffer Window, Google Gemini Chat +3
AI & RAG

This workflow is designed to intelligently route user queries to the most suitable large language model (LLM) based on the type of request received in a chat environment. It uses structured classifica

Chat Trigger, Agent, Model Selector +7