💬 Answer product queries via WhatsApp using OpenAI GPT-4o and PDF knowledge base

829 views · 💬 Lead Nurturing & AI Sales Agents

Description

WhatsApp AI Sales Agent using PDF Vector Store

This workflow turns your WhatsApp number into an intelligent AI-powered Sales Agent that answers product queries using real data extracted from a PDF brochure. It loads a product brochure via HTTP Request, converts it into embeddings using OpenAI, stores them in an in-memory vector store and allows the AI Agent to provide factual answers to users via WhatsApp. Non-text messages are filtered and only text queries are processed. This makes the workflow ideal for building a lightweight chatbot that understands your product documentation deeply.

Quick Start: 5-Step Fast Implementation

  1. Insert your WhatsApp credentials in the WhatsApp Trigger and WhatsApp Send nodes.
  2. Add your OpenAI API Key to all OpenAI-powered nodes.
  3. Replace the PDF URL in the HTTP Request node with your own brochure.
  4. Run the Manual Trigger once to build the vector store.
  5. Activate the workflow and start chatting from WhatsApp.

What It Does

This workflow converts a product brochure (PDF) into a searchable knowledgebase using LangChain vector embeddings. Incoming WhatsApp messages are processed and if the message is text, the AI Sales Agent uses OpenAI + the vector store to produce accurate, brochure-based answers.

The AI responds naturally to customer queries, supports conversation memory across the session and retrieves information directly from the brochure when needed. Non-text messages are filtered out to maintain clean conversational flow.

The workflow is fully modular: you can replace the PDF, modify AI prompts, plug into CRM systems or extend it into a broader sales automation pipeline.

Who’s It For

This workflow is ideal for:

Requirements to Use This Workflow

To run this workflow successfully, you need:

Optional:

How It Works & How To Set Up

1. Import the Workflow JSON

Upload the workflow JSON provided.

2. Configure WhatsApp Trigger

3. Configure WhatsApp Response Nodes

The workflow uses two WhatsApp send nodes:

Add your WhatsApp credentials to both.

4. Replace the PDF Brochure

In get Product Brochure (HTTP Request):

5. Run the PDF → Vector Store Setup (One-Time Only)

Use the Manual Trigger (“When clicking ‘Test workflow’”) to:

> You must run this once after importing the workflow.

6. Set OpenAI Credentials

Add your OpenAI API Key to the following nodes:

7. Review the AI Agent Prompt

Inside AI Sales Agent, you can edit the system message to match:

8. Activate the Workflow

Once activated, WhatsApp users can chat with your AI Sales Agent.

How to Customize Nodes?

Here are common customization options:

Customize the PDF / Knowledgebase

Change the URL in get Product Brochure

or

Upload your own file via other nodes.

Customize AI Behavior

Edit the systemMessage inside AI Sales Agent:

Change Supported Message Types

Modify Handle Message Types switch logic to allow:

Modify WhatsApp Message Templates

Inside the textBody of response nodes.

Extend or replace Vector Store

Swap vectorStoreInMemory with:

By updating the vector store node.

Add-Ons (Optional Enhancements)

You can extend this workflow with:

1. Multi-language support

Add OpenAI translation nodes before agent input.

2. CRM Integration

Send user queries and chat logs into:

3. Product Recommendation Engine

Use embeddings similarity to suggest products.

4. Order Placement Workflow

Connect to Stripe or Shopify APIs.

5. Analytics Dashboard

Log chats into Airtable / Postgres for analysis.

Use Case Examples

Here are some practical uses:

  1. Product Inquiry Chatbot Customers ask about specs, pricing, or compatibility.

  2. Digital Catalog Assistant Converts PDF brochures into interactive WhatsApp search.

  3. Sales Support Bot Reduces load on human sales reps by handling common questions.

  4. Internal Knowledge Bot Teams access manuals, training documents, or service guides.

  5. Event/Product Launch Assistant Provides instant details about newly launched items.

And many more similar use cases where an AI-powered WhatsApp assistant is valuable.

Troubleshooting Guide

IssuePossible CauseSolution
WhatsApp messages not triggering workflowWrong webhook URL or inactive workflowEnsure webhook is correct & activate workflow
AI replies are emptyMissing OpenAI credentialsAdd OpenAI API key to all AI nodes
Vector store not populatedManual trigger not executedRun the Test Workflow trigger once
PDF extraction returns blank textPDF is image-basedUse OCR before text splitting
“Unsupported message type” always triggersMessage type filter misconfiguredCheck conditions in Handle Message Types
AI not using brochure dataVectorStore tool not linked properlyCheck connections between Embeddings → VectorStore → AI Agent

Need Help with Support & Extensions?

If you need help setting up, customizing or extending this workflow, feel free to reach out to our n8n automation developers at WeblineIndia. We can help with

🔗 Nodes Used

HTTP Request, WhatsApp Business Cloud, AI Agent, Embeddings OpenAI, OpenAI Chat Model, Simple Memory

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup