Build your first on WhatsApp
Workflow Description
A template integrating an OpenAI-powered AI agent with WhatsApp to enable interactive conversations based on memory and documents. It processes messages intelligently and retrieves information from multiple sources with contextual accuracy.
How it works
- 1.Receive incoming messages from WhatsApp via the dedicated trigger
- 2.Process and split text using recursive character-level tokenization
- 3.Generate intelligent responses through an OpenAI agent while maintaining conversation memory
- 4.Search vector store and retrieve relevant documents matching the query
- 5.Send formatted reply back to the user via WhatsApp
Use cases
- Build a smart customer support assistant that responds to inquiries directly through WhatsApp
- Create a document-based knowledge retrieval agent that answers questions from stored content
Requirements
- Active WhatsApp Business account connected to n8n
- Valid OpenAI API key for natural language processing capabilities
- Collection of documents or text files ready for indexing and retrieval
- OpenAI embedding model to convert text into vector representations
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (28)
WhatsApp Trigger
Whats App Trigger
OpenAI Chat Model
OpenAI
Window Buffer Memory
Memory Buffer Window
Vector Store Tool
Tool Vector Store
Embeddings OpenAI
OpenAI
OpenAI Chat Model1
OpenAI
When clicking ‘Test workflow’
Manual Trigger
Embeddings OpenAI1
OpenAI
Default Data Loader
Document Default Data Loader
Recursive Character Text Splitter
Text Splitter Recursive Character Text Splitter
Extract from File
Extract From File
get Product Brochure
HTTP Request
Reply To User
Whats App
Reply To User1
Whats App
Product Catalogue
Vector Store In Memory
Sticky Note
Sticky Note
Sticky Note1
Sticky Note
Create Product Catalogue
Vector Store In Memory
Sticky Note2
Sticky Note
Sticky Note3
Sticky Note
Sticky Note4
Sticky Note
Sticky Note5
Sticky Note
Sticky Note6
Sticky Note
Sticky Note7
Sticky Note
Handle Message Types
Switch
Sticky Note8
Sticky Note
Sticky Note9
Sticky Note
AI Sales Agent
Agent