Automation library · Customer support

AI-powered WhatsApp customer service with OpenAI and Gmail

Started by an incoming WhatsApp message, and works across Gmail, Google Sheets, Supabase and WhatsApp. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 37 steps, 1 branch: 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
1Branch: places the flow splits
0Loops or waits
4Services it connects to

The flow

Starts it 1Model 18Logic 8Service 10

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

  1. 1OpenAI Chat Model8Lm Chat Open AiModel
  2. 2OpenAI Chat Model10Lm Chat Open AiModel
  3. 3OpenAI Chat Model11Lm Chat Open AiModel
  4. 4Think1Tool ThinkModel
  5. 5Structured Output ParserOutput Parser StructuredModel
  6. 6Structured Output Parser1Output Parser StructuredModel
  7. 7Postgres Chat MemoryMemory Postgres ChatModel
  8. 8Structured Output Parser2Output Parser StructuredModel
  9. 9Knowledge baseGoogle Docs ToolService
  10. 10orders databaseGoogle Sheets ToolService
  11. 11OpenAI Chat ModelLm Chat Open AiModel
  12. 12OpenAI Chat Model1Lm Chat Open AiModel
  13. 13OpenAI Chat Model2Lm Chat Open AiModel
  14. 14Supabase1Supabase ToolService
  15. 15WhatsApp TriggerWhats App triggerStarts it
  16. 16privacy classifierChain LlmModel
  17. 17intent classifierChain LlmModel
  18. 18sentiment classifierChain LlmModel
  19. 19Customer service AGENTAgentModel
  20. 20Human interventionText ClassifierModel
  21. 21Generate conv contextAgentModel
  22. 22Voice or TextSwitchLogic
  23. 23Merge3MergeLogic
  24. 24Merge4MergeLogic
  25. 25Historial Chat and feedbackGoogle SheetsService
  26. 26Aliment context for next messagesSupabaseService
  27. 27Send messageWhats AppService
  28. 28Owner escalationGmailService
  29. 29Human request.GmailService
  30. 30Critical complaint.GmailService
  31. 31Normal path / successNo OpLogic
  32. 32Download mediaWhats AppService
  33. 33TextSetLogic
  34. 34Aggregate3AggregateLogic
  35. 35AggregateAggregateLogic
  36. 36Transcribe1Open AiModel
  37. 37MergeMergeLogic

How it's built

Starts on
An incoming WhatsApp message
Steps
37, with 1 branch
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Google Sheets, Supabase, 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 Gmail, Google Sheets, Supabase 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 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.