Skip to content
NEWMarketplace and your team: sell what you build, and get plans and changes that are tested before you see them. See what is new

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

  1. Trigger: Set Up Tables Manually
  2. Create Chats Data Table
  3. Create Messages Data Table
  4. Create Knowledge Data Table
  5. Hourly Schedule Trigger
  6. Incoming WhatsApp Trigger
  7. Incoming Telegram Trigger
  8. Set Configuration Fields
  9. Route by Message Source
  10. List Google Drive Files
  11. Retrieve Indexed Documents
  12. Identify Changed Files
  13. Delete Old Document Chunks
  14. Filter Files to Index

58 steps in total.

Similar automations