Description
Overview
This automation workflow implements a WhatsApp chatbot acting as a Sales AI Agent for Yamaha Powered Loudspeakers 2024, supporting natural language queries on the product brochure. This orchestration pipeline leverages an event-driven analysis triggered by WhatsApp message updates to deliver informed, factual responses based on an in-memory vector store of the product catalog.
Key Benefits
- Enables real-time question answering on product features via WhatsApp messages using no-code integration.
- Filters non-text message types automatically, ensuring consistent input for the AI Sales Agent.
- Maintains session-specific context with a sliding window memory buffer for coherent multi-turn dialogues.
- Utilizes an in-memory vector store to semantically match user queries against the 2024 product brochure.
Product Overview
This automation workflow is structured into two principal segments: building a product brochure knowledge base and managing WhatsApp chatbot interactions. Initially, the workflow downloads the Yamaha Powered Loudspeakers 2024 brochure as a PDF via an HTTP request node. The PDF text is extracted and recursively split into chunks not exceeding 2000 characters to facilitate processing. These text chunks are embedded using OpenAI’s text-embedding-3-small model and stored in an in-memory vector database keyed by “whatsapp-75”.
On the chatbot side, the workflow listens for incoming WhatsApp messages using a WhatsApp Trigger node configured to respond only to message updates. It employs a switch node to accept only text messages, rejecting unsupported types with a predefined text reply. User messages are processed through an AI Sales Agent node powered by OpenAI GPT-4o-2024-08-06, which utilizes session memory to maintain conversational context and queries the vector store tool to retrieve relevant brochure information. The agent’s responses are delivered synchronously back to users via WhatsApp, ensuring deterministic, fact-based interaction.
Features and Outcomes
Core Automation
This orchestration pipeline ingests WhatsApp text messages as input and applies conditional routing to handle unsupported message types before invoking the AI Sales Agent. The agent uses session-specific window buffer memory to retain recent conversational context and applies vector store querying to retrieve brochure data.
- Single-pass evaluation of user input with deterministic handling of text versus non-text messages.
- Context-aware responses enabled by session-based sliding window memory storage.
- Direct integration of vector search results into AI-generated replies for factual accuracy.
Integrations and Intake
The workflow integrates the WhatsApp API via OAuth credentials to receive message updates and send replies. It uses OpenAI API credentials for both embedding generation and chat completion with GPT-4o-2024-08-06. Incoming payloads conform to WhatsApp message update schemas, with text message filtering applied at the switch node.
- WhatsApp Trigger node listens for message updates authenticated via OAuth.
- OpenAI API used for embeddings and chat completion models.
- HTTP Request node downloads product brochure PDF for data ingestion.
Outputs and Consumption
Responses from the AI Sales Agent are returned as plain text messages and sent synchronously to the user’s WhatsApp number. The output structure includes the AI-generated text body derived from vector store search results and session memory context, ensuring relevant and coherent replies.
- Text response messages delivered via WhatsApp node using recipient phone number from trigger.
- AI agent output keyed as “output” for direct message content.
- Synchronous request-response model for immediate user feedback.
Workflow — End-to-End Execution
Step 1: Trigger
The workflow initiates upon receiving WhatsApp message updates through the WhatsApp Trigger node. This node listens exclusively for “messages” update events, authenticated via OAuth credentials. Incoming payloads contain message metadata including sender phone number and message type.
Step 2: Processing
A switch node evaluates the message type field, routing text messages to the AI Sales Agent and non-text messages to a fallback reply node. This ensures only valid text inputs proceed to the core AI logic, while unsupported types receive a predefined explanatory response.
Step 3: Analysis
The AI Sales Agent node processes the user input with a system prompt defining its role to assist with the Yamaha Powered Loudspeakers 2024 catalog. It utilizes a sliding window buffer memory keyed by the user’s WhatsApp number to maintain session context. The agent queries the in-memory vector store via a Vector Store Tool node to retrieve relevant brochure content, incorporating this data into its response generation using OpenAI’s GPT-4o-2024-08-06 model.
Step 4: Delivery
The AI-generated response text is sent directly back to the user through the WhatsApp node. This node uses the recipient phone number extracted from the trigger and sends the message synchronously with preview URLs disabled, ensuring a clean text-only reply.
Use Cases
Scenario 1
A customer wants detailed technical specifications of Yamaha Powered Loudspeakers 2024. The chatbot answers by querying the product brochure vector store and returns structured factual responses within the same WhatsApp conversation, eliminating the need to browse documents manually.
Scenario 2
A user sends an audio message by mistake. The orchestration pipeline detects the unsupported message type and responds with a clear text message requesting only text inputs, maintaining workflow integrity and user clarity.
Scenario 3
A returning user asks follow-up questions about warranty terms. The window buffer memory preserves recent conversation context so the AI Sales Agent provides coherent multi-turn dialogue responses, improving user experience through contextual awareness.
How to use
After deploying this workflow in n8n, first run the manual trigger node to download and process the Yamaha Powered Loudspeakers 2024 brochure PDF. This step builds or updates the in-memory vector store with embedded product data. Next, activate the workflow to listen for WhatsApp message updates. Ensure WhatsApp OAuth credentials are properly configured, and the server is reachable by WhatsApp webhook callbacks. The workflow will automatically process incoming text messages, maintain session memory, and respond with AI-generated answers based on the product catalog. Results appear as WhatsApp text replies containing relevant and factual product information.
Comparison — Manual Process vs. Automation Workflow
| Attribute | Manual/Alternative | This Workflow |
|---|---|---|
| Steps required | Multiple manual lookup steps in brochures and FAQs | Single-step conversational query via WhatsApp chatbot |
| Consistency | Variable accuracy depending on user interpretation | Deterministic vector store retrieval with AI validation |
| Scalability | Limited by human availability and manual effort | Automated handling of unlimited concurrent WhatsApp sessions |
| Maintenance | Frequent manual updates to documents and training | Periodic vector store rebuild via manual trigger only |
Technical Specifications
| Environment | n8n workflow automation platform |
|---|---|
| Tools / APIs | WhatsApp API (OAuth), OpenAI API (GPT-4o-2024-08-06, text-embedding-3-small), HTTP request |
| Execution Model | Synchronous request-response for chatbot replies; manual trigger for vector store build |
| Input Formats | WhatsApp message updates JSON, PDF document for product brochure |
| Output Formats | Plain text WhatsApp replies |
| Data Handling | Transient in-memory vector store; session memory via sliding window buffer |
| Known Constraints | Supports text messages only; non-text filtered with default reply |
| Credentials | WhatsApp OAuth, OpenAI API key |
Implementation Requirements
- Configured WhatsApp OAuth credentials with webhook enabled for message updates.
- OpenAI API credentials with access to GPT-4o-2024-08-06 and text-embedding-3-small models.
- Network access allowing HTTP requests to download the Yamaha Powered Loudspeakers 2024 brochure PDF.
Configuration & Validation
- Run the manual trigger node to initiate PDF download and vector store creation; confirm HTTP request success and text extraction.
- Test WhatsApp Trigger by sending a text message; verify message routing through the switch node to AI Sales Agent.
- Check that AI agent responses reference product brochure data and maintain session context across multiple messages.
Data Provenance
- WhatsApp Trigger node receives message update events authenticated via WhatsApp OAuth credentials.
- Product brochure PDF sourced via HTTP Request node and text extracted with Extract from File node.
- AI Sales Agent node powered by OpenAI GPT-4o-2024-08-06 accesses in-memory vector store keyed “whatsapp-75” for catalog data.
FAQ
How is the WhatsApp chatbot automation workflow triggered?
The workflow triggers on WhatsApp message update events via the WhatsApp Trigger node, activated only by new incoming messages.
Which tools or models does the orchestration pipeline use?
The pipeline uses OpenAI’s GPT-4o-2024-08-06 for conversational AI, text-embedding-3-small for vector embeddings, and an in-memory vector store for semantic search.
What does the response look like for client consumption?
Responses are synchronous plain text messages sent back to the user’s WhatsApp number, containing AI-generated answers based on the product catalog.
Is any data persisted by the workflow?
No persistent storage is used; the vector store resides in-memory and session memory is transient per user interaction.
How are errors handled in this integration flow?
Error handling relies on n8n platform defaults; unsupported message types are filtered and replied to with a standard text message.
Conclusion
This WhatsApp chatbot automation workflow provides a deterministic and context-aware interface for querying the Yamaha Powered Loudspeakers 2024 product brochure via natural language. By combining an event-driven analysis of WhatsApp messages with vector search and AI completion, it eliminates manual document lookup and supports multi-turn conversations. The solution relies on external API availability for WhatsApp and OpenAI services and requires periodic manual updates to rebuild the product catalog vector store. Overall, it delivers precise, factual responses with minimal maintenance overhead.








Reviews
There are no reviews yet.