← All case studies

AI Agents for WhatsApp

AI that chats with customers directly on WhatsApp: answering questions and taking orders automatically.

All 2 case studies in this section follow in full.

Contents

AI Agents for WhatsApp

Case studies in full

WhatsApp Voice & Business Agent with n8n

Turning customer voice notes, photos and text messages on WhatsApp into instant, database-backed answers through an n8n workflow.

Section: n8n Automations, AI Agents for WhatsApp

Overview

This project is a WhatsApp business assistant for an online store. Customers write, speak or send a photo, and the workflow replies on WhatsApp with facts taken from the store’s Supabase product database, answering by voice when the customer used voice. It runs on n8n cloud with OpenAI models and replaces manual answering of repetitive product questions.

The business problem

Store owners answer the same questions all day: is this in stock, what does it cost, how long is delivery. Customers send these as voice notes, typed messages or screenshots of a product, so a simple keyword bot cannot read them. Slow replies lose sales, and a bot that guesses prices or stock damages trust.

The solution

An n8n workflow receives every WhatsApp message and routes it by type. Voice notes are transcribed, photos are described by a vision model, and text goes straight through. All three are normalized into one message and passed to an AI agent that must look up facts in Supabase before answering. The reply goes back as text, or as a voice note when the customer sent audio. Memory keyed on the customer’s phone number keeps the conversation connected.

Project snapshot

ItemDetail
Platformn8n cloud
ChannelWhatsApp Business Cloud API
Input typesVoice note, text, photo
AI modelsOpenAI transcription, GPT-4o-mini vision, GPT-4.1-mini agent, OpenAI speech
Knowledge baseSupabase vector store, products table
Workflow size21 nodes after cleanup (22 in the first export)

How the System Works

Every message passes through six stages, from the customer’s WhatsApp message to the reply, in a single n8n workflow.

StepProcess
1. WhatsApp inputThe customer sends a voice note, a text or a photo. The WhatsApp Trigger node receives it.
2. RoutingA Switch node checks the message type and sends it down the audio, text or image path.
3. Media handlingVoice notes and photos are downloaded through the WhatsApp media API. A voice note is transcribed and a photo is described by a vision model.
4. NormalizingEdit Fields nodes turn each path into the same two fields: the message text and the customer’s phone number as session id.
5. AI agentThe agent looks up facts in the Supabase products table, thinks again, and writes a short reply. It remembers the conversation by phone number.
6. ReplyIf the customer sent audio, the reply is converted to speech and sent as a voice note. Otherwise it is sent as text.

The workflow in n8n

Image: The top branch handles voice notes, the middle branch handles text, and the bottom branch handles photos. All three meet at the AI Agent, which has its model, memory, a Think tool and the Supabase Vector Store attached.

Supporting integrations

Core Workflow Configuration

The workflow is built from a handful of node groups. Each one has a single job and passes the same two fields forward, so the agent never needs to know how the message arrived.

Node groupConfiguration
WhatsApp TriggerListens for message updates from the WhatsApp Business Cloud API.
SwitchThree rules: audio (by mime type), text (by message type) and image (by mime type).
Download media + HTTP RequestGets the media URL from WhatsApp, then downloads the file with the WhatsApp credential. Used for both audio and images.
Transcribe a recordingOpenAI audio transcription of the downloaded voice note.
Analyze imageOpenAI vision (GPT-4o-mini) on the downloaded photo, returned as a text description.
Edit Fields (three)Set userMessage (the text, transcript or image description) and sessionId (the customer’s phone number).
AI AgentGPT-4.1-mini with a system prompt: short WhatsApp-style replies under 80 words, one emoji at most, never guess, answer only from the database, hand complex issues to human support.
Simple MemoryWindow memory keyed on the customer’s phone number.
Supabase Vector StoreRetrieve-as-tool on the products table, with OpenAI embeddings.
ThinkA reasoning tool the agent can use before answering.
IfChecks whether the original message was audio.
Generate audio + Send voice replyTurns the answer into speech and sends it back as an audio message.
Send messageSends the answer as a WhatsApp text message.

Product Experience

These three mockups show how the assistant is meant to feel on the customer’s phone, one for each input type. They are illustrative designs, not screenshots of live conversations. The status messages (“Transcribing…”, “Searching our catalog…”) and the Shopify order lookup and replacement order shown in scenarios 1 and 3 are not in the current workflow and belong to a planned extension.

Scenario 1: voice input

Image: The customer sends a voice note. The workflow transcribes it, the agent finds the answer, and the reply comes back as a voice note because the customer used voice.

Scenario 2: text input

Image: A typed question goes straight to the agent, which checks the product data and answers in two or three short lines, with a follow-up question to move the sale forward.

Scenario 3: image input

Image: A photo is described by the vision model, and that description is handled as the customer’s message. In the current workflow the agent matches it against the product table. Order lookup and replacement orders are future work.

Results & Metrics

The workflow is built and cleaned up, and no live customer data has been measured yet. The figures below describe what was delivered. Response time, accuracy and conversion numbers should be added after a pilot with real conversations.

MetricResult
Production workflows1 main agent workflow
n8n nodes21 after cleanup
Input types supported3: voice note, text, photo
Reply formats2: text and voice note
AI models used4: transcription, vision, agent, speech
Knowledge sourceSupabase products table, searched by the agent as a tool
Workflow defects fixed2 (placeholder Code node, wrong message type)
Live response time and accuracyNot measured yet

Technical Challenges & Solutions

Reviewing the exported workflow turned up problems that would have stopped it from working in production.

Voice reply could not be sent

Challenge

The voice path ended in a Code node that still held the placeholder YOUR_BASE64_STRING_HERE, and the send node used the document message type.

Solution

Removed the Code node, connected “Generate audio” directly to the send node, renamed it “Send voice reply”, and set its message type to audio with the customer’s number as recipient.

Outcome

The voice path is complete from the audio message to the voice reply.

Credentials missing after import

Challenge

After importing the workflow into a new n8n account, every WhatsApp, OpenAI and Supabase node showed a warning.

Solution

Reselect the credentials on each flagged node. For presentations, a demo copy with sample output pinned on the main-path nodes can be used.

Outcome

The nodes can be run green once credentials are set. A demo copy was prepared for the voice path.

AI answers must stay factual

Challenge

A sales assistant that invents prices or stock levels loses customer trust.

Solution

The system prompt requires the agent to retrieve facts from Supabase before answering, to ask when data is missing, and to hand complex issues to human support. Replies are capped at 80 words.

Outcome

Answers stay short and grounded in the product table.

Secrets inside workflow files

Challenge

A related Shopify workflow contains an access token written directly into its HTTP nodes.

Solution

Rotate the token and move it into an n8n credential before sharing or publishing that workflow.

Outcome

Open item, to be done by the store owner.

Key Takeaways & Future Development

Key takeaways

Future development

Page · Plain text

AI-Powered Whatsapp message Assistant

An AI assistant inside WhatsApp that understands text, voice and images and answers from your business knowledge, 24/7.

Section: n8n Automations, AI Agents, AI Agents for WhatsApp

1. The Problem: WhatsApp Customer Support Didn’t Scale

Before this automation, customer support over WhatsApp was fully manual and increasingly difficult to manage:

Staff had to reply to every WhatsApp message manually

Repetitive questions about

For a small business receiving 80–120 WhatsApp messages per day, this meant:

Core challenge

WhatsApp was the main customer channel, but human-only support could not keep up without increasing headcount.

2. Results After Automation

Once the WhatsApp AI Business Assistant was deployed:

Time & Workload Impact

Before automation

After automation

Net savings

This allowed the business to scale WhatsApp support without hiring additional staff.

3. The Solution: An AI Assistant Inside WhatsApp

The system acts as a virtual support agent that lives directly inside WhatsApp:

Customers never feel like they’re talking to a bot, just fast, helpful support.

4. How the System Works

All of this happens automatically in seconds.

5. Business Value

6. Reliability & Safety

This ensures trust, safety, and accuracy at scale.

7. How to Replicate This System

Built using WhatsApp Cloud API + n8n + OpenAI + Supabase Vector Store.

Set Up WhatsApp Cloud API

Configure

Ensure it can

Create WhatsApp Webhook in n8n

Paste this URL into

Meta → WhatsApp → Webhooks configuration

This connects WhatsApp messages to the automation.

Import the JSON file

AI-Powered WhatsApp Assistant.json

Connect AI & Data Services

Configure the following nodes

Enable

Supabase Vector Store

Add Supabase project URL & API key

Confirm vector table contains

This enables accurate AI responses (RAG).

Configure Message Routing

Open the Switch node

Verify routing rules

Text → AI Agent

Voice → Transcription → AI Agent

Image → Image analysis → AI Agent

This keeps processing efficient and cost-effective.

Test the Flow

Send test messages on WhatsApp

Verify

Enable the Workflow

Toggle the workflow to Active

The assistant is now live

Customers can now chat with your AI assistant 24/7 on WhatsApp.

8. Final Outcome

With the WhatsApp AI Business Assistant in production:

The system transformed WhatsApp from a manual support burden into an always-on AI-powered customer assistant.

Page · Plain text