# WhatsApp Voice & Business Agent with n8n

> An AI-powered WhatsApp assistant that understands voice notes, text messages, and photos, then answers customer questions using product information stored in Supabase.

Section: n8n Automations, AI Agents for WhatsApp

Page: https://mburhan.com/case/whatsapp-voice-business-agent

## Overview

This project is a WhatsApp business assistant for an online store. Customers can send a voice note, text message, or product photo and receive an answer based on the store’s product database. The system uses n8n to process incoming messages, OpenAI to understand different input types, and Supabase to retrieve product information. When a customer sends a voice note, the assistant can respond with a voice message. Conversation memory also helps maintain context across messages from the same customer.

### The business problem

Online stores receive repeated questions about product availability, prices, and delivery. Customers may ask these questions through text, voice notes, or photos, making them difficult for simple chatbots to handle. Manual replies take time, while inaccurate answers about prices or stock can reduce customer trust.

## How It Works

1. **Receive WhatsApp Messages:** The WhatsApp Business Cloud API receives customer messages, including text, voice notes, and photos.
2. **Identify Message Type:** n8n checks the incoming message and routes it to the correct processing path.
3. **Process Voice and Images:** OpenAI transcribes voice notes and analyzes product photos. Text messages are passed through directly.
4. **Prepare the Message:** n8n converts each input into a common text format and associates it with the customer's phone number.
5. **Retrieve Product Information:** The AI agent uses the Supabase product database to find relevant information before preparing an answer. Conversation memory helps it maintain context.
6. **Send the Response:** Text messages receive text replies. When the customer sends a voice note, the answer is converted into speech and returned as a WhatsApp voice message.

Image (https://mburhan.com/uploads/30dbed1dba656a505c6917ae.png)

## The Result

The completed workflow brings voice, text, and image-based customer enquiries into one WhatsApp assistant. It retrieves product information from Supabase before answering, supports both text and voice replies, and maintains conversation context for each customer.

### Workflow Delivery Metrics

| Metric | Result |
| --- | --- |
| n8n nodes after cleanup | 21 |
| Supported input types | 3 |
| Reply formats | 2 |
| AI models used | 4 |
| Main agent workflows | 1 |
| Workflow defects fixed | 2 |

*Note: These figures describe the delivered workflow. Live customer response time, answer accuracy, and sales conversion have not yet been measured.*

Image (https://mburhan.com/uploads/272f0e7121790fb2c057e5e0.png)

## Tech Stack

- **n8n:** Connects the services and manages the message-processing workflow.
- **WhatsApp Business Cloud API:** Receives customer messages, downloads media, and sends replies.
- **OpenAI:** Transcribes voice notes, analyzes images, generates answers, and converts replies into speech.
- **Supabase:** Stores product information and provides a searchable knowledge source for the AI agent.
- **Shopify:** Relevant to the planned extension for product and order-related functionality; order lookup and replacement-order creation are not part of the current workflow.

## Where This Pattern Applies

- **E-commerce Stores:** Answer product questions about prices, availability, and product details.
- **Retail Businesses:** Help customers identify products through photos and ask questions through voice or text.
- **Customer Support Teams:** Handle common enquiries and pass complex issues to human support.
- **Online Service Providers:** Provide customers with a WhatsApp-based assistant for frequently asked questions.

This pattern is useful for businesses that receive customer enquiries through WhatsApp and want to automate responses while keeping answers connected to reliable business data.
