Skip to main content

WhatsApp AI agent that understand text, image , audio

Workflow preview

Workflow preview
100%
WhatsApp AI agent that understand text, image , audio  preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Overview This template is a multimodal WhatsApp assistant that understands text, images, and audio, aggregates media inputs, and returns intelligent replies using Google Gemini. It can fetch kno...

Best for

  • Support Chatbot automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.whatsapptrigger, @n8n/n8n-nodes-langchain.googlegemini, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatgooglegemini, @n8n/n8n-nodes-langchain.memorybufferwindow, n8n-nodes-base.googlesheetstool, n8n-nodes-base.aggregate, n8n-nodes-base.whatsapp

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Tharwat Mohamed.

Original n8n.io source

1.1 Workflow description

Title
WhatsApp AI agent that understand text, image , audio
Workflow name
WhatsApp AI agent that understand text, image , audio

Overview πŸ“Œ

This template is a multimodal WhatsApp assistant that understands text, images, and audio, aggregates media inputs, and returns intelligent replies using Google Gemini. It can fetch knowledge from Google Docs, log conversations into Google Sheets, and respond via WhatsApp β€” all orchestrated inside n8n.

Features ✨

Multimodal input handling: Receives images and audio from WhatsApp, analyzes them, and sends contextual responses. πŸ–ΌοΈπŸŽ§

Audio transcription: Converts voice messages to text for analysis. πŸ”Šβž‘οΈπŸ“

Image analysis: Extracts objects/labels/text from images to inform responses. πŸ–ΌοΈπŸ”

Knowledge fetch: Pulls relevant documents from Google Docs for richer answers. πŸ“„πŸ“š

Conversation logging: Appends each interaction to Google Sheets for auditing or analytics. πŸ“ˆ

Modular design: Clear subflows for media reception, transcription, image analysis, aggregation, and the AI Agent. βš™οΈ

Ready for customization: Swap models, change providers, or extend with a vector store. πŸ”

Requirements βœ…

n8n instance (self-hosted or n8n.cloud) with public webhook access

Google Cloud project with these APIs enabled: Vertex AI (Gemini), Cloud Vision API, Cloud Speech-to-Text, Drive & Docs & Sheets 🧠

Google Service Account JSON key (with permissions for above services) πŸ”

WhatsApp Business API provider credentials (Twilio, 360dialog, or similar) πŸ“ž

(Optional) Pinecone or another vector store if you want embeddings / retrieval augmentation πŸ—‚οΈ

Setup Instructions πŸ”§

Import the workflow

Download the .json from your package and in n8n Editor β†’ Import β†’ From File β†’ select JSON. Save.

Create credentials

Google Service Account: Create service account in GCP, grant Vertex AI, Vision, Speech, Drive, Docs, Sheets roles, download JSON β†’ create n8n Google Service Account credential and upload JSON.

WhatsApp: Add your WhatsApp API credentials (API key/token, phone ID, webhook secret).

(Optional) Vector store: Add Pinecone credentials if using embeddings.

Configure media receiver nodes

WhatsApp Trigger: Ensure webhook URL is set on your WhatsApp provider to forward incoming messages/media to n8n. 🌐

Audio Receiver nodes: point to incoming audio payload path or download URL. 🎧

Image Receiver nodes: point to image URL or attachment field. πŸ–ΌοΈ

Transcription & Image Analysis

Transcribe Audio: Select Google Speech-to-Text via your Google Service Account credential. Confirm language and sampling settings. πŸ—£οΈβž‘οΈπŸ“

Analyze Image: Point to Vision API via same Google credential. Choose required outputs (labels, landmarks, OCR). πŸ”Ž

Aggregate media

Confirm the Aggregate node collects text + transcribed audio + image analysis results into a single payload for the AI Agent. 🧩

AI Agent (Gemini)

Open AI Agent node β†’ choose your Google Gemini/Vertex AI credentials.

Edit System Prompt to include: how to prioritize image/audio text, where to look up knowledge (Docs), and style/tone. Replace placeholders (business name, policies). ✍️

Knowledge Fetch (Google Docs)

Configure Get a document in Google Docs node to point to your knowledge docs folder or specific document IDs. πŸ“‚

Conversation Logging

Configure Google Sheets node to append rows to your chosen spreadsheet (structure below). 🧾

WhatsApp Reply

Map AI Agent output to the WhatsApp Send message node and choose template messaging if needed. πŸ’¬

Test end-to-end

Activate the workflow, send a text message, an image, and an audio message to your WhatsApp test number. Verify the AI reply and that logs appear in Google Sheets. πŸ§ͺ

Google Sheet: Conversation Log (suggested columns) πŸ—’οΈ Column Type Description Timestamp Date/Time When the message arrived UserID Text WhatsApp user identifier (phone) MessageType Text text / image / audio / mixed MessageText Text Original text or transcribed text ImageAnalysis Text Vision API summary / labels / OCR text AttachmentURL Text Link to image/audio file AIResponse Text Final text reply sent to user Notes Text Any extra flags (e.g., escalation) Customization πŸ”

Swap Gemini with another model provider by changing the AI node credentials and prompt structure. πŸ”„

Add a vector store (Pinecone) to enable retrieval-augmented generation from indexed docs. 🧠

Extend image analysis to OCR for receipts/invoices or barcode detection. πŸ“‘

Add an escalation path (send to human) by adding an β€œIf β†’ Escalate” node when confidence is low. 🚨

Suggested Node Renaming (for clarity) 🏷️

Rename generic nodes to explicit names so reviewers and users instantly understand flow:

WhatsApp Trigger β†’ WhatsApp Trigger (Inbound)

Switch β†’ Message Type Router

audio receiver1/2 β†’ Audio Receiver (Download) / Audio Receiver (Fallback) 🎧

Transcribe a recording β†’ Transcribe Audio (Speech-to-Text) πŸ“

image receiver1/2 β†’ Image Receiver (Download) / Image Receiver (Fallback) πŸ–ΌοΈ

Analyze image β†’ Image Analysis (Vision API) πŸ”

Aggregate β†’ Aggregate Media Inputs 🧩

AI Agent β†’ Multimodal AI Agent (Gemini) πŸ€–

Get a document in Google Docs β†’ Fetch Knowledge Doc πŸ“‚

Code β†’ Format AI Response 🧾

Send message β†’ WhatsApp – Send Reply πŸ’¬

Testing & Going Live πŸš€

Ensure n8n webhook is publicly reachable (use an SSL domain/tunnel). πŸ”’

Test in a sandbox WhatsApp number first. πŸ§ͺ

Monitor n8n Executions and enable an Error Workflow for graceful failure handling. ⚠️

If you expect high media volume, consider storage/retention policy for attachments. πŸ—„οΈ

Support & Notes 🀝

I offer setup assistance and will help troubleshoot credential issues or prompt tuning until your workflow is working perfectly. Include contact info and a short support pledge in your template description to build trust. Feel free to ping me anytimeβ€”even after launch!πŸ‘‰ Contact: [email protected] | +20β€―106β€―180β€―3236

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - WhatsApp Trigger

Type / Role
n8n-nodes-base.whatsAppTrigger - whatsAppTrigger
Config choices
Version 1

Block 2 - Transcribe a recording

Type / Role
@n8n/n8n-nodes-langchain.googleGemini - googleGemini
Config choices
Version 1

Block 3 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 4 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 5 - Simple Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 6 - Append or update row in sheet in Google Sheets

Type / Role
n8n-nodes-base.googleSheetsTool - googleSheetsTool
Config choices
Version 4.7

Block 7 - Aggregate

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 8 - Send message

Type / Role
n8n-nodes-base.whatsApp - whatsApp
Config choices
Version 1

Block 9 - Send message1

Type / Role
n8n-nodes-base.whatsApp - whatsApp
Config choices
Version 1

Block 10 - Analyze image

Type / Role
@n8n/n8n-nodes-langchain.googleGemini - googleGemini
Config choices
Version 1

Block 11 - audio receiver1

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 12 - audio receiver 2

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 13 - image receiver 1

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 14 - image receiver2

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 15 - Get a document in Google Docs

Type / Role
n8n-nodes-base.googleDocsTool - googleDocsTool
Config choices
Version 2

Block 16 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - clean response

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 18 - Switch(route incoming messages based on type)

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

3. Summary Table

Workflow WhatsApp AI agent that understand text, image , audio
Complexity advanced
Nodes 18
Categories Support Chatbot, AI Chatbot
Author Tharwat Mohamed
Published 04 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8251/8251.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does WhatsApp AI agent that understand text, image , audio do?

Overview This template is a multimodal WhatsApp assistant that understands text, images, and audio, aggregates media inputs, and returns intelligent replies using Google Gemini. It can fetch kno...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Support Chatbot, AI Chatbot use case.