This n8n workflow turns WhatsApp into a sales assistant. It listens for new customer messages and replies with answers drawn from an indexed product brochure PDF. It uses OpenAI and Google Gemini.
The knowledge base is built with a manual run. The workflow downloads the brochure PDF, extracts its text and splits it into chunks. It then generates OpenAI embeddings and indexes them in an in-memory vector store.
When a WhatsApp message arrives, the workflow loads its configuration: models, prompts, WhatsApp phone number ID and vector store key. It handles voice, image, video and text messages. An OpenAI chat model with per-customer memory and a vector-store retrieval tool writes the reply. Unsupported message types get a predefined message.
- Message types
- Text, voice, images and videos
- Voice
- Transcribed with OpenAI
- Images
- Described with OpenAI Vision
- Video
- Described with Google Gemini
- Answering
- OpenAI chat model with per-customer memory and vector-store retrieval
- Knowledge base
- Product brochure PDF, chunked, embedded with OpenAI and stored in an in-memory vector store
- Credentials
- WhatsApp Business Cloud (trigger, sending and access), OpenAI (chat, embeddings, transcription, vision), Google Gemini (video analysis)
- n8n nodes
- Set, Switch, WhatsApp, Sticky Note, HTTP Request, Manual Trigger
- Setup
- Set a public direct URL to the brochure PDF in the knowledge base settings