Automation library · Chat assistants

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.

LargeCalls a model: OpenAIRetrieval

30 stepsLarge: read it before trusting it with anything live
4Branches: places the flow splits
0Loops or waits
1Service it connects to

The flow

Starts it 1Model 7Logic 10Service 12

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

  1. 1WhatsApp TriggerWhats App triggerStarts it
  2. 2OpenAI Chat ModelLm Chat Open AiModel
  3. 3Simple MemoryMemory Buffer WindowModel
  4. 4ConfigurationSetLogic
  5. 5AI AssistantAgentModel
  6. 6Input typeSwitchLogic
  7. 7From audio to audio?IfLogic
  8. 8Is image request?IfLogic
  9. 9Get Audio UrlWhats AppService
  10. 10Get Image UrlWhats AppService
  11. 11Only PDF FileIfLogic
  12. 12Not supportedWhats AppService
  13. 13Generate Audio ResponseOpen AiModel
  14. 14Send messageWhats AppService
  15. 15Generate imageOpen AiModel
  16. 16TextSetLogic
  17. 17Download AudioHttp RequestService
  18. 18Download ImageHttp RequestService
  19. 19Get File UrlWhats AppService
  20. 20Incorrect formatWhats AppService
  21. 21Fix mimeType for AudioCodeLogic
  22. 22Send imageWhats AppService
  23. 23Transcribe AudioOpen AiModel
  24. 24Analyze ImageOpen AiModel
  25. 25Download FileHttp RequestService
  26. 26Send audioWhats AppService
  27. 27AudioSetLogic
  28. 28ImageSetLogic
  29. 29Extract from FileExtract From FileService
  30. 30FileSetLogic

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.