Library / Chatbots & Messaging Bots
Chatbots & Messaging Bots
Run WhatsApp AI support bot on Google Drive docs with Telegram handoff
Indexes a Google Drive folder into a data-table knowledge base, answers WhatsApp messages with OpenAI, and hands chats to the team in Telegram when the AI is not confident. Runs on incoming messages.
What it does
## Build a WhatsApp AI support bot that answers from your Google Drive docs and hands over to your team ### How it works This workflow builds a WhatsApp support bot that indexes documents from a configured Google Drive folder, embeds them into an n8n data-table knowledge base, and uses them to answer customer questions. Incoming WhatsApp messages, including voice notes, are stored, checked against chat ownership state, and either answered by AI or forwarded to the team in Telegram. When the AI cannot confidently answer, the workflow hands the chat to a human, alerts the team, logs the handoff, and lets team replies be sent back to the customer through WhatsApp. ### Setup steps - Run the manual setup trigger once to create the chats, messages, and knowledge data tables before enabling the workflow. - Configure the values in the Configuration node: businessName, assistantName, driveFolderId, telegramChatId and handoffSheetUrl. - Connect Google Drive credentials with access to the folder that contains the support documents to index. - Connect OpenAI credentials for embeddings, chat completion, and voice-note transcription requests. - Connect WhatsApp Cloud API credentials for the trigger and message-sending nodes. Use a permanent System User token. - Connect Telegram bot credentials and add the bot to the team group. To answer a customer, reply to the bot's message in the group. Send #bot on as a reply to hand the chat back to the AI. - Connect Google Sheets credentials and add a tab named Handoffs with the headers Date, Phone, Name, Question, Reason, Status. - WhatsApp only allows free-form replies within 24 hours of the customer's last message. Later team replies are not sent, and the team is told why in Telegram. ### Customization Adjust chunk size, supported document types, embedding model, similarity threshold, AI answer prompt, and handoff criteria to match your business knowledge base and support process.
The steps
- Trigger: Set Up Tables Manually
- Create Chats Data Table
- Create Messages Data Table
- Create Knowledge Data Table
- Hourly Schedule Trigger
- Incoming WhatsApp Trigger
- Incoming Telegram Trigger
- Set Configuration Fields
- Route by Message Source
- List Google Drive Files
- Retrieve Indexed Documents
- Identify Changed Files
- Delete Old Document Chunks
- Filter Files to Index
58 steps in total.
Similar automations
Lead Generation & EnrichmentQualify WhatsApp leads with an AI agent via Meta Cloud API and hand off to staff45 stepsChatbots & Messaging BotsAnswer FAQs in a WhatsApp Bot with Postgres22 stepsChatbots & Messaging BotsRun a Quiz Bot on WhatsApp with Postgres30 stepsChatbots & Messaging BotsShow a Product Catalog in a WhatsApp Bot with Postgres16 steps