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

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

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

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.


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.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free