# Run a multimodal WhatsApp AI assistant with OpenAI: n8n workflow

> Started by an incoming WhatsApp message, and works across WhatsApp. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply...

Source: https://millionrounds.com/workflow/run-a-multimodal-whatsapp-ai-assistant-with-openai (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Chat assistants](https://millionrounds.com/workflows?category=Chat+assistants#library)

# Run a multimodal WhatsApp AI assistant with OpenAI

Started by an incoming WhatsApp message, and works across WhatsApp. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 30 steps, 4 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Frun-a-multimodal-whatsapp-ai-assistant-with-openai)

**30 steps** Large: read it before trusting it with anything live

**4** Branches: places the flow splits

**0** Loops or waits

**1** Service it connects to

## The flow

Starts it 1 Model 7 Logic 10 Service 12

The steps in the order they run, from what starts it.

- 1 **WhatsApp Trigger** Whats App trigger *Starts it*
- 2 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 3 **Simple Memory** Memory Buffer Window *Model*
- 4 **Configuration** Set *Logic*
- 5 **AI Assistant** Agent *Model*
- 6 **Input type** Switch *Logic*
- 7 **From audio to audio?** If *Logic*
- 8 **Is image request?** If *Logic*
- 9 **Get Audio Url** Whats App *Service*
- 10 **Get Image Url** Whats App *Service*
- 11 **Only PDF File** If *Logic*
- 12 **Not supported** Whats App *Service*
- 13 **Generate Audio Response** Open Ai *Model*
- 14 **Send message** Whats App *Service*
- 15 **Generate image** Open Ai *Model*
- 16 **Text** Set *Logic*
- 17 **Download Audio** Http Request *Service*
- 18 **Download Image** Http Request *Service*
- 19 **Get File Url** Whats App *Service*
- 20 **Incorrect format** Whats App *Service*
- 21 **Fix mimeType for Audio** Code *Logic*
- 22 **Send image** Whats App *Service*
- 23 **Transcribe Audio** Open Ai *Model*
- 24 **Analyze Image** Open Ai *Model*
- 25 **Download File** Http Request *Service*
- 26 **Send audio** Whats App *Service*
- 27 **Audio** Set *Logic*
- 28 **Image** Set *Logic*
- 29 **Extract from File** Extract From File *Service*
- 30 **File** Set *Logic*

## How it's built

- **Starts on:** An incoming WhatsApp message
- **Steps:** 30, with 4 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** WhatsApp
- **Model:** OpenAI
- **Retrieval:** Answers are drawn from documents you supply, not from the model alone

## Questions

What does it need to run?

An n8n account, plus your own WhatsApp account, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an incoming WhatsApp message.

Does it use AI?

Yes. It calls OpenAI. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 30 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 30 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Frun-a-multimodal-whatsapp-ai-assistant-with-openai)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[WhatsApp](https://millionrounds.com/workflows?service=WhatsApp#library)

## Workflows like it

Also chat assistants, with the same services where possible, closest in size first.

- [**Debounce and buffer WhatsApp AI replies with Redis and Gemini** 29 steps · calls a model · Redis, WhatsApp](https://millionrounds.com/workflow/debounce-and-buffer-whatsapp-ai-replies-with-redis-and-gemin)
- [**Build RAG-powered WhatsApp chatbots for docs with OpenAI** 32 steps · calls a model · Google Docs, WhatsApp](https://millionrounds.com/workflow/build-rag-powered-whatsapp-chatbots-for-docs-with-openai)
- [**WhatsApp chat agent with Gemini and Supabase** 28 steps · calls a model · Supabase, WhatsApp](https://millionrounds.com/workflow/whatsapp-chat-agent-with-gemini-and-supabase)
- [**AI Restaurant Virtual Waiter Chatbot for WhatsApp & Website** 27 steps · calls a model · Google Sheets, WhatsApp](https://millionrounds.com/workflow/ai-restaurant-virtual-waiter-chatbot-for-whatsapp-and-websit)
- [**AI-powered WhatsApp chatbot for text, voice, images & PDFs** 26 steps · calls a model · WhatsApp](https://millionrounds.com/workflow/ai-powered-whatsapp-chatbot-for-text-voice-images-and-pdfs)
- [**Build an AI WhatsApp chatbot with Gemini and Wikipedia** 24 steps · calls a model · WhatsApp](https://millionrounds.com/workflow/build-an-ai-whatsapp-chatbot-with-gemini-and-wikipedia)
