Automation library · Content

Build a WhatsApp assistant for text, audio & images

Started by another system calling it, and works across Redis. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 43 steps, 3 branches, 4 loops or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAIRetrieval

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

The flow

Starts it 1Model 9Logic 23Service 10

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

  1. 1Receive WhatsAppWebhookStarts it
  2. 2OpenAI Chat ModelLm Chat Open AiModel
  3. 3Postgres Chat MemoryMemory Postgres ChatModel
  4. 4OpenAI Chat Model1Lm Chat Open AiModel
  5. 5Structured Output ParserOutput Parser StructuredModel
  6. 6Parse Message DataSetLogic
  7. 7AI AgentAgentModel
  8. 8Format ResponseChain LlmModel
  9. 9Filter Allowed NumbersFilterLogic
  10. 10Split MessagesSplit OutLogic
  11. 11Wait 2sWaitLogic
  12. 12Loop MessagesSplit In BatchesLogic
  13. 13Mark as ReadEvolution ApiService
  14. 14AggregateAggregateLogic
  15. 15Is Image URL?IfLogic
  16. 16Route by Message TypeSwitchLogic
  17. 17Clear QueueRedisService
  18. 18Send ImageEvolution ApiService
  19. 19Send TextEvolution ApiService
  20. 20Extract TextSetLogic
  21. 21Extract Audio Base64SetLogic
  22. 22Extract Image Base64SetLogic
  23. 23Extract Document Base64SetLogic
  24. 24Send Unsupported MessageEvolution ApiService
  25. 25DoneNo OpLogic
  26. 26Wait Between MessagesWaitLogic
  27. 27Unify InputSetLogic
  28. 28Convert to AudioConvert To FileService
  29. 29Convert to ImageConvert To FileService
  30. 30Convert to DocumentConvert To FileService
  31. 31End UnsupportedNo OpLogic
  32. 32Queue MessageRedisService
  33. 33Transcribe AudioOpen AiModel
  34. 34Analyze ImageOpen AiModel
  35. 35Transcribe DocumentOpen AiModel
  36. 36Wait for More MessagesWaitLogic
  37. 37Format Audio InputSetLogic
  38. 38Format Image InputSetLogic
  39. 39Format Document InputSetLogic
  40. 40Get Queued MessagesRedisService
  41. 41Is Last Message?IfLogic
  42. 42Concatenate MessagesSetLogic
  43. 43Not Last - StopNo OpLogic

How it's built

Starts on
Another system calling it
Steps
43, with 3 branches, 4 loops or waits
Size
Large: read it before trusting it with anything live
Connects to
Redis
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 Redis account, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

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 43 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 43 steps before you point it at anything that matters.