WhatsApp Chatbot Automation with n8n & AI Integration

This workflow uses n8n to automate intelligent WhatsApp message processing with AI-powered transcription, analysis, and response generation. It solves the problem of manual customer interaction by handling various message types automatically.
whatsAppTrigger
whatsApp
httpRequest
+6
Workflow Identifier: 1329
NODES in Use: WhatsApp Trigger, WhatsApp, HTTP Request, Split Out, Switch, Set, Wait, LangChain AI Agent, Window Buffer Memory

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Automation Does

This workflow listens to WhatsApp messages coming in, then handles each message by type.
It can understand audio, video, images, and text messages automatically.
Audio and videos get transcribed or described through Google Gemini AI.
Images get explained by GPT-4o AI.
Text messages are summarized.
The workflow then replies to the sender with a smart, clear answer based on these insights.
This helps customer support save many hours by replying fast without manual work.


Who Should Use This Workflow

Any business receiving many WhatsApp messages daily.
Especially those with mixed message types like voice notes, videos, or photos.
Teams wanting to respond quickly but without hiring more staff.
Users looking to automate message understanding and replies easily.


Tools and Services Used


Inputs, Processing Steps, and Output

Inputs

  • WhatsApp messages of types text, audio, video, or image.
  • Message media IDs for fetching files.

Processing Steps

  • Trigger on new WhatsApp messages via WhatsApp Trigger.
  • Split multiple messages with Split Out.
  • Detect each message type in a Switch node.
  • For audio/video: Fetch URL with WhatsApp node, download with HTTP Request, then send binary data to Google Gemini API for transcription/description.
  • For images: Fetch and download, then analyze using GPT-4o LangChain AI node.
  • For text: Summarize message using LangChain AI summarizer node.
  • Gather all processed info with a Set node.
  • Use Window Buffer Memory node for conversation context keyed by phone number.
  • Run AI Agent node to generate replies based on all data and memory.
  • Send reply back with WhatsApp Send node.

Output

  • AI-generated, context-aware text replies sent to WhatsApp users automatically.

Beginner Step-by-Step: How to Use This Workflow in n8n Production

Step 1: Download and Import

  1. Download the workflow file using the Download button on this page.
  2. In your n8n editor, click “Import from File” and select the downloaded workflow file.

Step 2: Add Credentials

  1. Open the imported workflow, add your WhatsApp API OAuth credentials to the WhatsApp Trigger and WhatsApp Send nodes.
  2. Enter your Google Gemini API Key in the relevant HTTP Request nodes for audio and video processing.
  3. Set your GPT-4o API credentials in the AI chain nodes for image analysis and text summarization.

Step 3: Update IDs and Variables

  1. If needed, update phone numbers, message type field names, or any custom IDs in the Set or Switch nodes.
  2. Check all prompts in AI nodes and copy-paste if instructions need changes for user tone or style.

Step 4: Testing

  1. Send test WhatsApp messages of different types (text, audio, video, image) to confirm the workflow triggers and processes correctly.
  2. Watch n8n execution history for any errors or failed nodes.

Step 5: Activate for Production

  1. When testing passes, activate the workflow toggling it ON inside your n8n environment.
  2. Ensure the WhatsApp webhook URL is updated in WhatsApp Business API to point to your running n8n instance.
  3. If using self-host n8n, make sure the server is reachable publicly with valid HTTPS.

Customization Ideas

  • Replace Google Gemini with other AI APIs in HTTP Request nodes.
  • Have the bot send images or audio back by enabling multimedia responses in WhatsApp Send node.
  • Change summarizer node prompts for different styles, like formal or casual tones.
  • Adjust conversation memory session keys in Window Buffer Memory to organize chats differently.
  • Expand message type handling by adding new conditions and nodes for documents or location messages.

Troubleshooting

  • Problem: “Webhook doesn’t get WhatsApp messages.”
    Cause: WhatsApp is not set to send messages to the webhook URL.
    Fix: Register the WhatsApp Trigger webhook URL inside WhatsApp API settings. Check credentials.
  • Problem: “Google Gemini API calls fail or error.”
    Cause: Wrong HTTP request format or bad API key.
    Fix: Check POST body JSON structure and headers. Confirm API Key is valid and permissioned.
  • Problem: “AI Agent outputs wrong or blank answers.”
    Cause: Missing or incorrect data in Set node input or memory.
    Fix: Verify all expected variables are assigned properly and memory is linked.

Pre-Production Checklist

  • Confirm WhatsApp API credentials are correct and webhook status is active.
  • Test each kind of message on WhatsApp to see the workflow handle it right.
  • Check Google Gemini API Keys and enough quota remains.
  • Review AI Agent node prompt and memory setup for correct context handling.
  • Test reply sending via WhatsApp Send node on real numbers.
  • Backup workflow file and credential settings before enabling live.

Deployment Guide

After activating the workflow inside n8n, it will start handling WhatsApp messages automatically.
If self-hosting n8n, ensure your server is public and webhook URL is accessible.
Watch execution logs and output texts in n8n for smooth running.
Update API keys and tokens often to avoid downtime.


Conclusion

This WhatsApp chatbot workflow in n8n copies and understands many message types fast.
It uses AI to make short summaries and transcriptions, so responses come quick without extra staff.
This automation saves time, reduces errors, and keeps customers happy.
Next you can add CRM links, booking tools, or document checks with AI to make the bot more helpful.

You can change or grow this workflow to fit your own business needs.
Use it to get WhatsApp chats managed smartly and easily.


Summary

✓ Saves hours daily by handling WhatsApp multimedia messages automatically.
✓ Uses Google Gemini AI to transcribe audio and describe videos.
✓ Uses GPT-4o AI for image reading and text summarizing.
✓ Sends smart replies back without manual typing.
✓ Keeps chat memory to answer better next messages.
✓ Easy for beginners to set up by importing the workflow in n8n.
✓ Can be customized for different AI models and response styles.


Frequently Asked Questions

The workflow uses the WhatsApp Trigger node in n8n which listens for new messages forwarded from WhatsApp Business API to the webhook URL.
It uses Google Gemini API for transcribing audio and describing videos, and GPT-4o AI to analyze images and summarize text.
Yes, the workflow splits incoming WhatsApp messages and uses a Switch node to route each message by type (audio, video, image, text) for separate processing.
Download the workflow file, import into n8n editor, add required API credentials, update any IDs, test with sample messages, then activate the workflow and confirm webhook registration with WhatsApp.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free