Automation library · Customer support

AI-powered WhatsApp support bot with OpenAI and Gmail

Started by an incoming WhatsApp message, and works across Gmail, Google Sheets, Pinecone and WhatsApp. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 32 steps, 2 branches, 3 loops or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAIRetrieval

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

The flow

Starts it 3Model 8Logic 14Service 7

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

  1. 1When chat message receivedChat triggerStarts it
  2. 2On form submissionForm triggerStarts it
  3. 3Default Data LoaderDocument Default Data LoaderModel
  4. 4Simple MemoryMemory Buffer WindowModel
  5. 5Get ticketsGoogle Sheets ToolService
  6. 6Create support ticketsGoogle Sheets ToolService
  7. 7Send a message in GmailGmail ToolService
  8. 8OpenAI Chat ModelLm Chat Open AiModel
  9. 9Embeddings OpenAIEmbeddings Open AiModel
  10. 10Embeddings OpenAI1Embeddings Open AiModel
  11. 11WhatsApp TriggerWhats App triggerStarts it
  12. 12Company InfoSetLogic
  13. 13Switch1SwitchLogic
  14. 14Pinecone Vector StoreVector Store PineconeModel
  15. 15AI AgentAgentModel
  16. 16Pinecone (Retrieve Info)Vector Store PineconeModel
  17. 17Split Pages URLsCodeLogic
  18. 18HTTP RequestHttp RequestService
  19. 19Split_BinaryCodeLogic
  20. 20MergeMergeLogic
  21. 21XMLXmlLogic
  22. 22Loop Over FilesSplit In BatchesLogic
  23. 23Remove DuplicatesRemove DuplicatesLogic
  24. 24CodeCodeLogic
  25. 25PDF or TXTSwitchLogic
  26. 26Loop Over PagesSplit In BatchesLogic
  27. 27Extract PDFExtract From FileService
  28. 28Extract TextExtract From FileService
  29. 29HTMLHtmlLogic
  30. 30Fetch Page HTMLHttp RequestService
  31. 31Select TextSetLogic
  32. 32WaitWaitLogic

How it's built

Starts on
An incoming WhatsApp message
Steps
32, with 2 branches, 3 loops or waits
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Google Sheets, Pinecone, 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, Pinecone 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 32 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 32 steps before you point it at anything that matters.