Animated data flow diagram

AI-Powered WhatsApp Sales Agent for Product Catalog Queries

Version: 1.0.0 | Last Updated: 2025-05-16

Integrates with:

OpenAI WhatsApp Langchain

Overview

Unlock Automated Product Support with this AI Sales Agent

This n8n workflow transforms your WhatsApp channel into an intelligent AI Sales Agent. It's designed to field customer inquiries about your products by instantly accessing and understanding information from your product brochure. First, it processes your product brochure (PDF), creating a searchable knowledge base (vector store). Then, when a customer messages on WhatsApp, the AI Agent, powered by OpenAI's GPT-4o, comprehends the query, consults the knowledge base, and provides an informed response. It even remembers past interactions with each user for a more seamless conversation.

Key Features & Benefits

  • AI-Driven Product Expertise: Acts as an AI Sales Agent with deep knowledge of your product catalog, accessible 24/7 via WhatsApp. Its core abilities include natural language understanding, product information retrieval, and conversational responses.
  • Automated Brochure Ingestion: Automatically downloads a product brochure PDF, extracts text, and builds an AI-ready vector store using OpenAI embeddings. This keeps your agent's knowledge up-to-date with minimal effort.
  • Advanced Conversational AI: Utilizes OpenAI's GPT-4o model for sophisticated language understanding and human-like response generation.
  • Contextual Memory: Employs Langchain's Window Buffer Memory to remember conversation history with each user, leading to more relevant and personalized follow-ups.
  • Targeted Information Retrieval: Uses a Langchain Vector Store Tool, allowing the AI Agent to precisely query the product brochure knowledge base for accurate answers.
  • Handles Text-Only Input: Intelligently filters for text messages, politely informing users if non-text messages are received, ensuring smooth operation.
  • Reduces Manual Support Load: Frees up human agents by autonomously handling common product questions, allowing your team to focus on complex issues.
  • Scalable Customer Interaction: Efficiently manages multiple customer conversations simultaneously, improving response times and customer satisfaction.

Use Cases

  • B2C E-commerce: Provide instant answers to product feature questions, availability, and specifications directly on WhatsApp, improving customer satisfaction and reducing inquiry response times.
  • B2B SaaS: Offer immediate, first-level support for product documentation queries via WhatsApp, guiding users to relevant features or setup steps and enhancing user onboarding.
  • Automate responses to frequently asked questions (FAQs) about services or products across various industries, significantly reducing support agent workload and operational costs.
  • Act as an initial point of contact for sales inquiries on WhatsApp, qualifying leads by answering product-related questions before seamlessly handing off complex cases to a human sales representative.

Prerequisites

  • An n8n instance (Cloud or self-hosted).
  • OpenAI API Key with access to a powerful model (e.g., GPT-4o) and an embedding model (e.g., text-embedding-3-small).
  • WhatsApp Business API access and credentials configured in n8n (for both the Trigger and Send Message nodes).
  • A product brochure in PDF format accessible via a public URL (for the HTTP Request node to download it for knowledge base creation).

Setup Instructions

  1. Download the n8n workflow JSON file.
  2. Import the workflow into your n8n instance.
  3. Configure OpenAI Credentials: In all relevant OpenAI nodes ('OpenAI Chat Model', 'OpenAI Chat Model1', 'Embeddings OpenAI', 'Embeddings OpenAI1'), configure your OpenAI API Key. Ensure the selected models (e.g., gpt-4o-2024-08-06, text-embedding-3-small) are appropriate for your API key access.
  4. Part 1: Create Product Catalog Knowledge Base (Run Manually Once or to Update) a. In the 'get Product Brochure' HTTP Request node, update the URL parameter to point to your product brochure PDF. b. If your workflow is not active, activate it temporarily. c. Manually execute the 'When clicking ‘Test workflow’' node. This will run the branch that downloads the PDF, extracts its text, creates embeddings, and populates the 'Create Product Catalogue' (In-Memory Vector Store). Verify this branch runs successfully by checking the output of the 'Create Product Catalogue' node.
  5. Part 2: Configure and Activate the WhatsApp AI Sales Agent a. Configure the 'WhatsApp Trigger' node: Select your WhatsApp credential and ensure 'messages' is selected under the 'Updates' parameter. b. Configure the 'AI Sales Agent' node: Review and customize the System Message to define the agent's persona, goals, and any specific instructions (e.g., how to handle sales inquiries, what information to provide or withhold). c. Configure the 'Window Buffer Memory' node: Ensure the Session Key is set to a unique identifier per user. The default whatsapp-75-{{ $json.messages[0].from }} dynamically uses the sender's WhatsApp number and is generally suitable. d. Configure the 'Vector Store Tool' node: The Name (e.g., query_product_brochure) and Description (e.g., Call this tool to query the product brochure. Valid for the year 2024.) are crucial for the AI Agent to decide when to use this tool. Adjust them if needed to better reflect your brochure's content. e. Configure the 'Reply To User' and 'Reply To User1' WhatsApp nodes: Select your WhatsApp credential and the correct Phone Number ID from which the agent will send messages.
  6. Ensure the workflow is active. Your AI Sales Agent is now ready to respond to customer messages on WhatsApp.

Tags:

AI AgentWhatsApp AutomationOpenAICustomer SupportSales AutomationNLPVector StoreLangchainPDF Processing

Want your own unique AI agent?

Talk to us - we know how to build custom AI agents for your specific needs.

Schedule a Consultation