Build a WhatsApp Sales AI Agent with n8n and OpenAI

Solve complex customer queries instantly with this n8n workflow that integrates WhatsApp messaging and a product brochure AI agent using OpenAI. Streamline your sales support by automating intelligent responses from your detailed product catalog.
whatsAppTrigger
agent
whatsApp
+10
Workflow Identifier: 1343
NODES in Use: whatsAppTrigger, lmChatOpenAi, memoryBufferWindow, toolVectorStore, httpRequest, extractFromFile, textSplitterRecursiveCharacterTextSplitter, documentDefaultDataLoader, embeddingsOpenAi, vectorStoreInMemory, whatsApp, switch, agent
Automate WhatsApp sales with n8n and OpenAI

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What this workflow does

This workflow helps answer customer questions on WhatsApp about Yamaha loudspeaker products fast and correct. It reads a product brochure PDF, turns its text into searchable chunks, and uses AI to reply based on the brochure data. This saves time and avoids mistakes when answering buyers.

The goal is to let the sales team reply 24/7 without hiring more people. It listens for texts, looks up info from the brochure, and sends back helpful replies automatically.


Who should use this workflow

This is for sales teams or companies selling Yamaha loudspeakers wanting faster, clearer customer chat replies. It suits businesses that get many questions on WhatsApp and want to avoid manual copy-paste or slow answers.

It also fits users who have n8n and OpenAI accounts and can connect WhatsApp Business API.


Tools and services used


Inputs, processing, and outputs

Inputs

  • PDF file URL of Yamaha loudspeaker product brochure (2024 version).
  • Incoming WhatsApp text messages from customers.

Processing steps

  • Download the PDF brochure using HTTP Request node.
  • Extract readable text from the PDF with Extract from File node.
  • Split extracted text into chunks to avoid AI limits using Recursive Character Text Splitter node.
  • Create vector embeddings for those chunks with OpenAI embedding model.
  • Save vectors in the in-memory vector store with a set key.
  • Listen for WhatsApp messages using WhatsApp Trigger node.
  • Check message type with Switch node, only accept text messages for AI processing.
  • Use an AI Sales Agent powered by GPT-4, referencing vector store to answer customer questions based on brochure content.
  • Keep conversation memory per user via Window Buffer Memory node.
  • Send AI’s answer back to sender using WhatsApp node.

Outputs

  • Accurate, relevant WhatsApp text replies about Yamaha loudspeaker products.
  • Friendly replies when users send unsupported message types (non-text).

Beginner step-by-step: How to use this workflow in n8n

1. Import the workflow

  1. Click the Download button on this page to get the workflow file.
  2. Open the n8n editor and select “Import from File” from the menu.
  3. Choose the downloaded workflow file to load it into n8n.

2. Configure credentials

  1. Add OpenAI API Key credentials in the Embeddings OpenAI node and any other OpenAI nodes.
  2. Set up WhatsApp Business API credentials in WhatsApp Trigger and WhatsApp nodes.
  3. If needed, update IDs or phone numbers used for WhatsApp messages.

3. Update settings if needed

  1. Make sure the HTTP Request node URL points to the Yamaha product brochure PDF.
  2. Confirm vector store memory key set to “whatsapp-75” matches across nodes.

4. Test the workflow

  1. Run the workflow once to download and process the brochure, creating the vector store.
  2. Send a WhatsApp message to the connected number to see if AI replies with brochure info.

5. Activate for production

  1. Enable the workflow in n8n to listen continuously.
  2. Make sure n8n is reachable by WhatsApp webhook URLs; see self-host n8n for hosting tips.

Edge cases and failures

  • PDF download may fail if the URL changes or network is down.
  • Text extraction can be empty if PDF is corrupted or format unsupported.
  • AI answers may be wrong if the vector store is empty or keys mismatch.
  • Non-text WhatsApp messages get automatic replies explaining only text is supported.
  • Webhook connection failures usually come from incorrect URLs or firewall blocking.

Refreshing the brochure ingestion steps fixes vector store data issues.


Customization ideas

  • Change the PDF URL to any other product brochure to support other catalogs.
  • Replace in-memory vector store with scalable databases like Qdrant or Pinecone.
  • Extend the Switch node to handle images or audio messages.
  • Adjust the AI system message prompt to change tone or add more company details.
  • Add typing indicators using WhatsApp API during AI response generation.

Summary of results

✓ Saves hours daily by automating brochure questions on WhatsApp.
✓ Sends quick, accurate answers referencing official brochure text.
✓ Works without extra staff or manual copy-paste errors.
✓ Supports only text messages with polite fallback replies.
✓ Easy to test, customize, and run inside n8n with OpenAI and WhatsApp credentials.


Automate WhatsApp sales with n8n and OpenAI

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

Yes. Update the HTTP Request node URL to the new brochure PDF link and run ingestion again.
It uses embedding and chat completion calls which cost credits. Adjust chunk size or cache data to reduce costs.
WhatsApp messages are end-to-end encrypted. n8n processes messages only inside your environment securely.
For many users, replace the in-memory vector store with scalable vector databases like Qdrant and consider stronger hosting setups.
Author
Written By
Ritu Sanjali

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.