AutomationFlowsAI & RAG › AI Chatbot with WhatsApp & Google Drive

AI Chatbot with WhatsApp & Google Drive

Original n8n title: Chatbot

Chatbot. Uses googleDrive, vectorStoreSupabase, googleDriveTrigger, documentDefaultDataLoader. Event-driven trigger; 23 nodes.

Event trigger★★★★☆ complexityAI-powered23 nodesGoogle DriveSupabase Vector StoreGoogle Drive TriggerDocument Default Data LoaderMemory Buffer WindowGoogle Sheets ToolGoogle Calendar ToolOpenAI Embeddings
AI & RAG Trigger: Event Nodes: 23 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the Agent → Documentdefaultdataloader 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
{
  "name": "Chatbot",
  "nodes": [
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.body.question }}",
        "needsFallback": true,
        "options": {
          "systemMessage": "Kamu adalah asisten layanan pelanggan untuk produk printer dan tinta Epson.\n\nATURAN KETAT:\n1. Sebelum menjawab, cek panjang pertanyaan user:\n   - Jika pertanyaan kurang dari 4 kata, balas dengan:\n     \"Mohon jelaskan kendala anda lebih detail agar saya dapat membantu dengan lebih baik.\n     Contoh: 'Bagaimana cara membersihkan print head printer Epson L3150?'\"\n   - Jika pertanyaan 4 kata atau lebih, WAJIB gunakan tool search_faq dari Qdrant sebelum menjawab.\n2. Jika pertanyaan mengandung [Hasil analisis gambar], gunakan informasi tersebut sebagai konteks tambahan sebelum mencari ke Qdrant.\n3. Jawab HANYA berdasarkan informasi dari Qdrant. Jika tidak ditemukan, jawab:\n   \"Maaf, saya tidak memiliki informasi mengenai hal tersebut. Silakan hubungi customer service Epson untuk bantuan lebih lanjut.\"\n4. DILARANG menggunakan pengetahuan umum di luar hasil pencarian.\n5. DILARANG mengarang atau menambahkan informasi yang tidak ada di hasil pencarian.\n6. Jawab dalam bahasa yang sama dengan pertanyaan user."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        176,
        496
      ],
      "id": "5a86fb08-f46e-4b9d-b69c-9a5eb705a325",
      "name": "AI Agent",
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "modelName": "models/gemini-3.1-flash-lite",
        "options": {
          "temperature": 0.1
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1.1,
      "position": [
        96,
        832
      ],
      "id": "3b8671e3-9f7f-4447-b13d-16c6ca3bdd10",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "mode": "retrieve-as-tool",
        "toolDescription": "Kamu adalah asisten layanan pelanggan untuk produk printer dan tinta Epson.\n\nATURAN KETAT:\n1. SELALU gunakan tool search_faq sebelum menjawab apapun.\n2. Jawab HANYA berdasarkan informasi yang ditemukan di tool collection vector database qdrant.\n3. Jika tool search_faq tidak menemukan informasi yang relevan, jawab dengan:\n\"Maaf, saya tidak memiliki informasi mengenai hal tersebut. Silakan hubungi customer service Epson untuk bantuan lebih lanjut.\"\n4. DILARANG menggunakan pengetahuan umum di luar hasil pencarian.\n5. DILARANG mengarang atau menambahkan informasi yang tidak ada di hasil pencarian.\n6. Jawab dalam bahasa yang sama dengan pertanyaan user.",
        "qdrantCollection": {
          "__rl": true,
          "mode": "list",
          "value": "knowledge_base_epson"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "typeVersion": 1.3,
      "position": [
        416,
        672
      ],
      "id": "d7c9e24e-c760-4142-ac6a-0ab7dc92e58d",
      "name": "Qdrant Vector Store",
      "credentials": {
        "qdrantApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "modelName": "models/gemini-embedding-2"
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini",
      "typeVersion": 1,
      "position": [
        416,
        832
      ],
      "id": "df874bf6-0993-4a5d-b24e-2bd1a320cb45",
      "name": "Embeddings Google Gemini",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.5,
      "position": [
        816,
        416
      ],
      "id": "5a774c7a-eb4e-4f5f-ac5f-875cc3dfbaa2",
      "name": "Respond to Webhook"
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $json.body.user_id }}",
        "contextWindowLength": 8
      },
      "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
      "typeVersion": 1.4,
      "position": [
        256,
        832
      ],
      "id": "a125e07f-25c5-4118-a16e-49c52fb13a0b",
      "name": "Postgres Chat Memory",
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "rag",
        "responseMode": "responseNode",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        -112,
        496
      ],
      "id": "4f161494-931f-45f2-9541-8ff9d30abfd7",
      "name": "Webhook"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "7b5f0844-38cb-44be-9a5c-f31aaa8122c2",
              "name": "answer",
              "value": "={{ $json.output }}",
              "type": "string"
            },
            {
              "id": "ba8c048b-3c71-41a6-ba91-695b04fac092",
              "name": "is_answered",
              "value": true,
              "type": "boolean"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        608,
        320
      ],
      "id": "57d8777f-d125-4a1f-b24d-7ba24d6172aa",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "2c1a37ab-5f27-4aca-b83b-44ba03516f02",
              "name": "answer",
              "value": "Mohon maaf, chatbot sedang down, silakan coba setelah sesaat",
              "type": "string"
            },
            {
              "id": "5e5b895a-db2b-4333-bf1b-4c383489d0dc",
              "name": "is_answered",
              "value": false,
              "type": "boolean"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        608,
        512
      ],
      "id": "36daba55-72c3-4b86-82a6-4b995686e8bd",
      "name": "Edit Fields1"
    }
  ],
  "connections": {
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Vector Store": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ],
      "main": [
        []
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Google Gemini": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Postgres Chat Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "timeSavedMode": "fixed",
    "timezone": "Asia/Jakarta",
    "callerPolicy": "workflowsFromSameOwner",
    "availableInMCP": false,
    "executionTimeout": 60,
    "timeSavedPerExecution": 2
  },
  "versionId": "2063db0e-83a4-446c-85b4-9a3981dc379d",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodeGroups": [],
  "id": "xu35zxAf766ScoPH",
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

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

How this works

This chatbot workflow delivers instant, intelligent responses to customer queries via WhatsApp, saving time for support teams handling repetitive questions. It suits small businesses or solo entrepreneurs seeking an automated assistant without building from scratch, leveraging integrations like Google Drive for document storage and Google Gemini for natural language processing. The key step involves an AI agent that retrieves relevant information from a Supabase vector store to generate context-aware replies, ensuring conversations feel personalised and efficient.

Use this workflow when you need a simple, event-driven chatbot for WhatsApp interactions, such as answering FAQs from uploaded documents in Google Drive. Avoid it for complex, multi-channel support requiring custom logic or high-volume enterprise needs, where dedicated platforms might be better. Common variations include swapping WhatsApp for Telegram triggers or adding Google Sheets for logging interactions to track query patterns.

About this workflow

Chatbot. Uses googleDrive, vectorStoreSupabase, googleDriveTrigger, documentDefaultDataLoader. Event-driven trigger; 23 nodes.

Source: https://github.com/ChibugoOhanyiri/AI-automation-portfolio/blob/main/ai_agent_chatbot/workflow.json — 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

A lightweight, self-hosted AI assistant built entirely in n8n. Multi-channel messaging (Telegram, WhatsApp, Gmail), persistent memory, task management, and autonomous work — all in a single visual wor

Telegram Trigger, OpenRouter Chat, Data Table +20
AI & RAG

This workflow implements an advanced AI automation agent (OpenClaw Agent) that interacts with users through Telegram and integrates multiple AI models, external tools, and cloud services to automate c

Telegram Trigger, Telegram, OpenAI +21
AI & RAG

📌 Overview

Redis, WhatsApp, OpenAI Chat +12
AI & RAG

Alfred (funcional). Uses gmailTool, googleCalendarTool, gmail, embeddingsOpenAi. Event-driven trigger; 83 nodes.

Gmail Tool, Google Calendar Tool, Gmail +24
AI & RAG

Your AI workforce is ready. Are you?

Google Sheets Tool, Mcp Trigger, Google Drive +29