WhatsApp AI Assistant — Google Docs-Powered Customer Support
An n8n WhatsApp support bot that answers customer questions from a live Google Doc using Google Gemini, with conversation memory, Google Sheets logging and 24-hour window handling.
Built by Redoan Uzzaman, Full-Stack Developer & AI Engineer.

Overview
This project is a customer-support chatbot for WhatsApp Business that answers questions using a company's own documentation. The knowledge base is simply a Google Doc: there is no model training or re-indexing step, so editing the document updates what the bot knows immediately.
How it works
The n8n workflow starts with a WhatsApp Business Cloud API trigger. For each incoming message it fetches the current content of the knowledge-base Google Doc, builds a prompt combining the current date, the document text and the user's message, and passes it to an AI agent backed by Google Gemini with per-user buffer memory for multi-turn context.
Every exchange is logged to Google Sheets for later review. A code node then cleans the model output — stripping markdown and AI preambles — so replies read naturally in WhatsApp. Finally, the workflow checks whether the user is still inside WhatsApp's 24-hour customer-service window: if so it sends the answer directly, otherwise it sends an approved template message to reopen the conversation.
The design keeps setup simple for non-technical teams while respecting WhatsApp platform rules, and the README documents swapping Gemini for OpenAI or replacing simple memory with PostgreSQL-backed memory for persistence.
Key Features
- Live Google Docs knowledge base, no training required
- Google Gemini AI agent with per-user conversation memory
- Automatic conversation logging to Google Sheets
- Response cleaning for natural WhatsApp formatting
- 24-hour messaging window detection with template fallback
- Built on WhatsApp Business Cloud API
Tech Stack
- n8n
- WhatsApp Business Cloud API
- Google Gemini
- Google Docs API
- Google Sheets API
- JavaScript
Want something like this built?
Redoan Uzzaman takes on AI, automation and full-stack projects for clients worldwide.