# WhatsApp AI customer service chatbot – handles text, voice: n8n workflow

> Started by an event in a connected app, and works across Google Drive, Postgres, Redis and Twilio.

Source: https://millionrounds.com/workflow/whatsapp-ai-customer-service-chatbot-handles-text-voice (Millionrounds; every figure on the page links to its filing or article)

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

# WhatsApp AI customer service chatbot – handles text, voice

Started by an event in a connected app, and works across Google Drive, Postgres, Redis and Twilio. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 37 steps, 9 branches, 1 loop or waits: 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%2Fwhatsapp-ai-customer-service-chatbot-handles-text-voice)

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

**9** Branches: places the flow splits

**1** Loop or waits

**4** Services it connects to

## The flow

Starts it 1 Model 3 Logic 15 Service 18

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

- 1 **Twilio Trigger** Twilio trigger *Starts it*
- 2 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 3 **Simple Memory1** Memory Buffer Window *Model*
- 4 **if contains media** If *Logic*
- 5 **Wait 5 seconds** Wait *Logic*
- 6 **AI Agent1** Agent *Model*
- 7 **if contains message with media** If *Logic*
- 8 **if contains audio** If *Logic*
- 9 **Add to Messages Stack** Redis *Service*
- 10 **Get Latest Message Stack** Redis *Service*
- 11 **Get Latest audio Stack2** Redis *Service*
- 12 **Get Latest image_video Stack** Redis *Service*
- 13 **Send Reply** Twilio *Service*
- 14 **Add to audio Stack** Redis *Service*
- 15 **Add to image_video Stack** Redis *Service*
- 16 **Add to Messages Stack1** Redis *Service*
- 17 **Delete Data2** Redis *Service*
- 18 **Should Continue?2** If *Logic*
- 19 **Should Continue?1** If *Logic*
- 20 **Delete Data1** Redis *Service*
- 21 **Delete Data** Redis *Service*
- 22 **Should Continue?** If *Logic*
- 23 **if contains data2** If *Logic*
- 24 **if contains data1** If *Logic*
- 25 **if contains data** If *Logic*
- 26 **No Operation, do nothing** No Op *Logic*
- 27 **set usermessage from text1** Set *Logic*
- 28 **Split Out1** Split Out *Logic*
- 29 **Split Out** Split Out *Logic*
- 30 **Insert rows in a table messages** Postgres *Service*
- 31 **HTTP Request1** Http Request *Service*
- 32 **HTTP Request** Http Request *Service*
- 33 **Transcribe audio or video** Eleven Labs *Service*
- 34 **Upload file** Google Drive *Service*
- 35 **set usermessage from transcript** Set *Logic*
- 36 **Insert rows in a table media** Postgres *Service*
- 37 **Insert rows in a table audio** Postgres *Service*

## How it's built

- **Starts on:** An event in a connected app
- **Steps:** 37, with 9 branches, 1 loop or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Drive, Postgres, Redis, Twilio
- **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 Google Drive, Postgres, Redis and Twilio accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

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 37 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 37 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%2Fwhatsapp-ai-customer-service-chatbot-handles-text-voice)
- **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.

[Google Drive](https://millionrounds.com/workflows?service=Google+Drive#library)[Postgres](https://millionrounds.com/workflows?service=Postgres#library)[Redis](https://millionrounds.com/workflows?service=Redis#library)[Twilio](https://millionrounds.com/workflows?service=Twilio#library)

## Workflows like it

Also customer support, with the same services where possible, closest in size first.

- [**Route WhatsApp support requests with Claude and Supabase** 37 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/route-whatsapp-support-requests-with-claude-and-supabase)
- [**Use OCR and vector search to answer questions with WhatsApp** 35 steps · calls a model · Google Drive, Pinecone](https://millionrounds.com/workflow/use-ocr-and-vector-search-to-answer-questions-with-whatsapp)
- [**Build an AI-powered SMS support system with Twilio and OpenAI** 40 steps · calls a model · Gmail, Postgres](https://millionrounds.com/workflow/build-an-ai-powered-sms-support-system-with-twilio-and-opena)
- [**Answer internal policy questions from Google Drive with OpenAI** 31 steps · calls a model · Google Drive, Qdrant](https://millionrounds.com/workflow/answer-internal-policy-questions-from-google-drive-with-open)
- [**Advanced Telegram bot, ticketing system, liveChat, user** 31 steps · Redis, Telegram](https://millionrounds.com/workflow/advanced-telegram-bot-ticketing-system-livechat-user)
- [**WhatsApp to Chatwoot message forwarder with Postgres and Redis** 31 steps · Postgres, Redis](https://millionrounds.com/workflow/whatsapp-to-chatwoot-message-forwarder-with-postgres-and-red)
