Automation library · Content

Collect WhatsApp questionnaire responses in Postgres

Started by an incoming WhatsApp message, and works across Postgres and WhatsApp. 22 steps, 4 branches: large, and worth reading before you trust it with anything live.

Large

22 stepsLarge: read it before trusting it with anything live
4Branches: places the flow splits
0Loops or waits
2Services it connects to

The flow

Starts it 1Logic 5Service 16

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

  1. 1WhatsApp TriggerWhats App triggerStarts it
  2. 2InitializationSetLogic
  3. 3Get Bot StatusPostgresService
  4. 4Define FlowSwitchLogic
  5. 5StartsWhats AppService
  6. 6CommandsSwitchLogic
  7. 7Get prev AnswerPostgresService
  8. 8Upsert Bot Status on STARTPostgresService
  9. 9Main MenuWhats AppService
  10. 10Starts TestWhats AppService
  11. 11Is Question found? IfLogic
  12. 12Get First QuestionPostgresService
  13. 13Get Available QuestionsPostgresService
  14. 14Add AnswerPostgresService
  15. 15First QuestionWhats AppService
  16. 16Is Questions available?IfLogic
  17. 17Update Bot Status on ANKETAPostgresService
  18. 18QuestionWhats AppService
  19. 19Finish AnketaWhats AppService
  20. 20Add prev Answer PostgresService
  21. 21Add prev AnswerPostgresService
  22. 22Update Bot Status on STARTPostgresService

How it's built

Starts on
An incoming WhatsApp message
Steps
22, with 4 branches
Size
Large: read it before trusting it with anything live
Connects to
Postgres, WhatsApp
Model
None. This is plumbing, not judgement

Questions

What does it need to run?

An n8n account, plus your own Postgres and WhatsApp accounts. 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?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Take your time. At 22 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 22 steps before you point it at anything that matters.