Reply to WhatsApp text, audio, image, and video with Google Gemini and Wikipedia
Needs changesNeeds changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.
What to replace before upgrading
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Agent (v1.6) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (12)
- WhatsApp Trigger
n8n-nodes-base.whatsAppTrigger - WhatsApp Business Cloud
n8n-nodes-base.whatsApp - HTTP Request
n8n-nodes-base.httpRequest - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Edit Fields (Set)
n8n-nodes-base.set - Split Out
n8n-nodes-base.splitOut - Wikipedia
@n8n/n8n-nodes-langchain.toolWikipedia - Switch
n8n-nodes-base.switch - Wait
n8n-nodes-base.wait - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - AI Agent
@n8n/n8n-nodes-langchain.agent
What it does
Quick overview This workflow auto-replies to incoming WhatsApp messages (text, audio, video, or images) by downloading any media, converting it to text with Google Gemini, and generating a concise answer with a Gemini-powered agent that can use Wikipedia for factual lookups. How it works 1. Triggers when a new WhatsApp message is received and splits the payload into individual message items. 2. Routes each message by type (audio, video, image, or text) so each format is handled appropriately. 3. For audio, video, and images, retrieves the WhatsApp media URL, downloads the file, and uses Google Gemini to transcribe or describe the content (including visible text in images). 4. For text messages, uses Google Gemini to summarize the user’s message. 5. Normalizes the output into a single record that includes the message type, extracted text/description, sender phone number, and any media caption. 6. Uses a Google Gemini-powered AI agent with per-sender conversation memory and optional Wikipedia tool calls to draft a factual response. 7. Sends the agent’s reply back to the sender via WhatsApp. Setup 1. Connect your WhatsApp Business Platform/Cloud API credentials for the WhatsApp Trigger, media URL retrieval, media downloads (HTTP Request), and the WhatsApp send-message step, and set your phone number ID and recipient mapping. 2. Add a Google Gemini (PaLM/Generative Language API) credential for the Gemini HTTP requests and the Gemini chat models used by the summarizer, image explainer, and agent. 3. Ensure your WhatsApp app is configured to deliver message webhooks to this n8n workflow’s WhatsApp Trigger and that media downloads are permitted for your account. 4. Review the prompts and the session key format for memory (keyed by sender phone number) to match your desired assistant behavior and retention window.