AutomationFlowsAI & RAG › Build a Knowledge-based Whatsapp Assistant with Rag, Gemini, Supabase &…

Build a Knowledge-based Whatsapp Assistant with Rag, Gemini, Supabase &…

Original n8n title: Build a Knowledge-based Whatsapp Assistant with Rag, Gemini, Supabase & Google Docs

Byiamvaar @iamvaar on n8n.io

Watch Execution Video

Event trigger★★★★☆ complexityAI-powered15 nodesWhatsApp TriggerGoogle DocsHTTP RequestSupabaseGoogle Gemini ChatWhatsAppAgent
AI & RAG Trigger: Event Nodes: 15 Complexity: ★★★★☆ AI nodes: yes Added:

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

This workflow follows the Agent → Google Docs 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": "4472f7d3-fca5-4d88-8afe-11a96316b761",
      "name": "WhatsApp Trigger",
      "type": "n8n-nodes-base.whatsAppTrigger",
      "position": [
        6048,
        -272
      ],
      "parameters": {},
      "executeOnce": true,
      "typeVersion": 1
    },
    {
      "id": "e2af2f35-5830-4e18-a6fa-346e58dd067a",
      "name": "Content for the Training",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        4480,
        -240
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "9823dd18-7d53-49b1-a8f6-478877e9d753",
      "name": "Splitting into Chunks",
      "type": "n8n-nodes-base.code",
      "position": [
        4704,
        -240
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "02970a68-1fdd-4ca0-9346-6e2e25b87af0",
      "name": "Embedding Uploaded document",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4928,
        -240
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "676544e3-80a6-45c3-93a8-05ecd35b019a",
      "name": "Save the embedding in DB",
      "type": "n8n-nodes-base.supabase",
      "position": [
        5136,
        -240
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a27230ed-40be-478e-b383-6c712d980db8",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        6960,
        -256
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "3c9c5b54-8ce7-48b2-a424-6f9bf5886e3a",
      "name": "Search Embeddings",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        6736,
        -256
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "7cfe3ce3-8687-4d81-a3c4-39efa4b5d6db",
      "name": "Embend User Message",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        6512,
        -256
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "a42c6b9e-2c39-433e-b065-e2a0ea479eb9",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3456,
        -432
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "5241c4e5-c630-49a5-bda5-ae5dec630bab",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5456,
        -432
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "c534b0d4-3be9-4e8b-866f-a8718814ca02",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        4224,
        -240
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a9bec279-7d7d-4a44-a221-e236ae1b7703",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        7168,
        -32
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "c07d0fb0-6752-4f1a-832b-7d01163e2293",
      "name": "Send message",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        7504,
        -256
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "090a8f79-2808-476b-a730-caf2da72d31c",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        7168,
        -256
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "719a5691-689d-44a8-855f-9eafb8aac9fd",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        6256,
        -272
      ],
      "parameters": {},
      "typeVersion": 2.2
    }
  ],
  "connections": {
    "If": {
      "main": [
        [],
        [
          {
            "node": "Embend User Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Send message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "WhatsApp Trigger": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Embeddings": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embend User Message": {
      "main": [
        [
          {
            "node": "Search Embeddings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Splitting into Chunks": {
      "main": [
        [
          {
            "node": "Embedding Uploaded document",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Content for the Training": {
      "main": [
        [
          {
            "node": "Splitting into Chunks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Embedding Uploaded document": {
      "main": [
        [
          {
            "node": "Save the embedding in DB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Content for the Training",
            "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

Watch Execution Video

Source: https://n8n.io/workflows/8865/ — 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

Transform your salon/service business with this streamlined WhatsApp automation system featuring Claude integration, zero-setup database management, and intelligent conversation handling. Claude MCP I

WhatsApp Trigger, WhatsApp, Redis +11
AI & RAG

This workflow implements an AI-powered WhatsApp booking assistant for a hair salon. The system allows customers to book, reschedule, or cancel appointments automatically via text or voice messages on

Google Calendar Tool, Google Sheets Tool, Error Trigger +15
AI & RAG

WhatsApp AI Assistant for Clinic Appointment Booking Automate your entire appointment lifecycle with an intelligent AI assistant that lives on WhatsApp. This workflow empowers any clinic or independen

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

kisisel asistan. Uses toolWorkflow, toolHttpRequest, toolCalculator, toolThink. Scheduled trigger; 43 nodes.

Tool Workflow, Tool Http Request, Tool Calculator +15
AI & RAG

Wait Splitout. Uses whatsAppTrigger, whatsApp, httpRequest, memoryBufferWindow. Event-driven trigger; 35 nodes.

WhatsApp Trigger, WhatsApp, HTTP Request +5