Automation library · E-commerce

Restaurant order & delivery system for WhatsApp with OpenAI

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

LargeCalls a model: OpenAIRetrieval

42 stepsLarge: read it before trusting it with anything live
5Branches: places the flow splits
1Loop or waits
2Services it connects to

The flow

Starts it 1Model 12Logic 12Service 17

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

  1. 1OpenAI Chat Model2Lm Chat Open AiModel
  2. 2Postgres Chat Memory1Memory Postgres ChatModel
  3. 3Message ReceivedWhats App triggerStarts it
  4. 4Postgres Chat Memory4Memory Postgres ChatModel
  5. 5OpenAI Chat Model6Lm Chat Open AiModel
  6. 6OpenAI Chat Model1Lm Chat Open AiModel
  7. 7Postgres Chat MemoryMemory Postgres ChatModel
  8. 8Structured Output ParserOutput Parser StructuredModel
  9. 9AI Restaurant AgentAgentModel
  10. 10Message TypeSwitchLogic
  11. 11Receipt AnalysisAgentModel
  12. 12Order FormatAgentModel
  13. 13IfIfLogic
  14. 14If1IfLogic
  15. 15If2IfLogic
  16. 16Get Image UrlWhats AppService
  17. 17Get File UrlWhats AppService
  18. 18TextSetLogic
  19. 19Google MapsHttp RequestService
  20. 20Get Audio UrlWhats AppService
  21. 21SwitchSwitchLogic
  22. 22CodeCodeLogic
  23. 23Download fileGoogle DriveService
  24. 24Menu 1Google DriveService
  25. 25Message to Customer2Whats AppService
  26. 26WaitWaitLogic
  27. 27Download ImageHttp RequestService
  28. 28Download FileHttp RequestService
  29. 29LocationSetLogic
  30. 30Download AudioHttp RequestService
  31. 31Message to cashierWhats AppService
  32. 32WhatsApp Business Cloud2Whats AppService
  33. 33WhatsApp Business CloudWhats AppService
  34. 34Response to CustomerWhats AppService
  35. 35OpenAIOpen AiModel
  36. 36Extract from File1Extract From FileService
  37. 37Transcribe AudioOpen AiModel
  38. 38ImageSetLogic
  39. 39Extract PDF Content Using Gemini VisionHttp RequestService
  40. 40AudioSetLogic
  41. 41FileSetLogic
  42. 42Forward receipt to ManagementWhats AppService

How it's built

Starts on
An incoming WhatsApp message
Steps
42, with 5 branches, 1 loop or waits
Size
Large: read it before trusting it with anything live
Connects to
Google Drive, 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 Google Drive and WhatsApp accounts, 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 42 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 42 steps before you point it at anything that matters.