Automation library · Customer support

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.

LargeCalls a model: OpenAIRetrieval

37 stepsLarge: read it before trusting it with anything live
9Branches: places the flow splits
1Loop or waits
4Services it connects to

The flow

Starts it 1Model 3Logic 15Service 18

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

  1. 1Twilio TriggerTwilio triggerStarts it
  2. 2OpenAI Chat ModelLm Chat Open AiModel
  3. 3Simple Memory1Memory Buffer WindowModel
  4. 4if contains mediaIfLogic
  5. 5Wait 5 secondsWaitLogic
  6. 6AI Agent1AgentModel
  7. 7if contains message with mediaIfLogic
  8. 8if contains audioIfLogic
  9. 9Add to Messages StackRedisService
  10. 10Get Latest Message StackRedisService
  11. 11Get Latest audio Stack2RedisService
  12. 12Get Latest image_video StackRedisService
  13. 13Send ReplyTwilioService
  14. 14Add to audio StackRedisService
  15. 15Add to image_video StackRedisService
  16. 16Add to Messages Stack1RedisService
  17. 17Delete Data2RedisService
  18. 18Should Continue?2IfLogic
  19. 19Should Continue?1IfLogic
  20. 20Delete Data1RedisService
  21. 21Delete DataRedisService
  22. 22Should Continue?IfLogic
  23. 23if contains data2IfLogic
  24. 24if contains data1IfLogic
  25. 25if contains dataIfLogic
  26. 26No Operation, do nothingNo OpLogic
  27. 27set usermessage from text1SetLogic
  28. 28Split Out1Split OutLogic
  29. 29Split OutSplit OutLogic
  30. 30Insert rows in a table messagesPostgresService
  31. 31HTTP Request1Http RequestService
  32. 32HTTP RequestHttp RequestService
  33. 33Transcribe audio or videoEleven LabsService
  34. 34Upload fileGoogle DriveService
  35. 35set usermessage from transcriptSetLogic
  36. 36Insert rows in a table mediaPostgresService
  37. 37Insert rows in a table audioPostgresService

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.