Automation library · Customer support

Use OCR and vector search to answer questions with WhatsApp

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

LargeCalls a model: OpenAIRetrieval

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

The flow

Starts it 1Model 20Logic 8Service 6

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

  1. 1WhatsApp TriggerWhats App triggerStarts it
  2. 2Text Chunker1Text Splitter Recursive Character Text SplitterModel
  3. 3Embeddings OpenAI1Embeddings Open AiModel
  4. 4OpenAI Chat ModelLm Chat Open AiModel
  5. 5Window Buffer MemoryMemory Buffer WindowModel
  6. 6Embeddings OpenAI2Embeddings Open AiModel
  7. 7OpenAI Chat Model6Lm Chat Open AiModel
  8. 8Window Buffer Memory6Memory Buffer WindowModel
  9. 9Embeddings OpenAI3Embeddings Open AiModel
  10. 10OpenAI Chat Model5Lm Chat Open AiModel
  11. 11Window Buffer Memory5Memory Buffer WindowModel
  12. 12Set Chunk ConfigSetLogic
  13. 13Route Incoming MessageSwitchLogic
  14. 14Document Loader1Document Default Data LoaderModel
  15. 15Store in Pinecone Vector DB1Vector Store PineconeModel
  16. 16Document-Grounded AI Agent VAgentModel
  17. 17Vector Search (Voice)Vector Store PineconeModel
  18. 18Document-Grounded AI Agent DAgentModel
  19. 19Vector Search (Text)Vector Store PineconeModel
  20. 20Document-Grounded AI Agent AAgentModel
  21. 21Download Incoming FileGoogle DriveService
  22. 22Handle text-based questionsIfLogic
  23. 23Create URLHttp RequestService
  24. 24Format Reply (Voice)CodeLogic
  25. 25Format Reply (Text)CodeLogic
  26. 26Format Reply (Wellness)CodeLogic
  27. 27OCR PDF/ImageMistral AiModel
  28. 28Fetch URLHttp RequestService
  29. 29Send Reply (Voice)Whats AppService
  30. 30Send Reply (Text)Whats AppService
  31. 31Send Reply (Default Text)Whats AppService
  32. 32Clean OCR Text1CodeLogic
  33. 33Transcribe a recordingOpen AiModel
  34. 34Chunk DocumentCodeLogic
  35. 35Query NormalizerOpen AiModel

How it's built

Starts on
An incoming WhatsApp message
Steps
35, with 2 branches
Size
Large: read it before trusting it with anything live
Connects to
Google Drive, 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 Google Drive, 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 35 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 35 steps before you point it at anything that matters.