Company RAG and data queries

WhatsApp product brochure advisor with phone-keyed session memory

Short answer

This n8n workflow maintains isolated conversation memory per WhatsApp sender phone number while answering catalogue enquiries from an embedded PDF brochure. A manual branch loads the brochure into an in-memory vector store. When customers message WhatsApp, non-text files receive a polite notice while text prompts receive grounded answers.

Catalogue ID
#1364
Functional nodes
18
Connections
16
Trigger
whatsAppTrigger, manualTrigger
AI layer
AI-assisted
Business problem solved

Business problem solved

Buyers ask follow-up specification questions across multiple WhatsApp messages. Without phone-keyed memory isolation, concurrent customer threads lose product context or force buyers to restate model names repeatedly.

Trigger

A WhatsApp trigger handles live buyer messages while a manual trigger refreshes the brochure vector store.

Connected systems

Connected systems

  • WhatsApp Business API
  • OpenAI
  • Phone-keyed buffer memory
  • In-memory vector store
  • HTTP PDF source
  • Self-hosted n8n

Every workflow is deployed on your own server with documentation, a run log and an error queue.

Workflow architecture

Workflow architecture

  1. 1. WhatsApp Trigger (Trigger) (connects to Handle Message Types)
  2. 2. OpenAI Chat Model (AI layer) (connects to AI Sales Agent)
  3. 3. Window Buffer Memory (AI layer) (connects to AI Sales Agent)
  4. 4. Vector Store Tool (AI layer) (connects to AI Sales Agent)
  5. 5. Embeddings OpenAI (AI layer) (connects to Product Catalogue)
  6. 6. OpenAI Chat Model1 (AI layer) (connects to Vector Store Tool)
  7. 7. When clicking Test workflow (Trigger) (connects to get Product Brochure)
  8. 8. Embeddings OpenAI1 (AI layer) (connects to Create Product Catalogue)
  9. 9. Default Data Loader (AI layer) (connects to Create Product Catalogue)
  10. 10. Recursive Character Text… (AI layer) (connects to Default Data Loader)
  11. 11. Extract from File (Service and data) (connects to Create Product Catalogue)
  12. 12. get Product Brochure (Service and data) (connects to Extract from File)
  13. 13. Reply To User (Service and data)
  14. 14. Reply To User1 (Service and data)
  15. 15. Product Catalogue (AI layer) (connects to Vector Store Tool)
  16. 16. Create Product Catalogue (AI layer)
  17. 17. Handle Message Types (Logic and routing) (connects to AI Sales Agent, Reply To User1)
  18. 18. AI Sales Agent (AI layer) (connects to Reply To User)
  • Trigger
  • AI layer
  • Logic and routing
  • Service and data

Node positions and directed links are generated from the verified catalogue record.

Workflow steps

Workflow steps

  1. 01

    Brochure PDF ingestion and splitting

    Manual execution pulls the PDF brochure via HTTP, extracts text and loads 2,000-character chunks into memory.

  2. 02

    Strict text message gating

    A switch node routes written enquiries to the agent and sends a fallback reply to unsupported media payloads.

  3. 03

    Phone-keyed conversation memory

    Window buffer memory isolates conversation history using the customer's WhatsApp sender number as session key.

  4. 04

    Grounded WhatsApp product reply

    The OpenAI gpt-4o sales agent queries the product brochure tool and posts the reply back to the buyer.

Error queue and human approval

Error queue and human approval

Built-in state in the catalogue workflow

The verified catalogue workflow contains zero node-level error flags, while the switch node isolates non-text WhatsApp messages.

Production layer added by ALTAI

During live deployment, ALTAI upgrades memory to persistent PostgreSQL and Qdrant, adds 24-hour Meta template handling, human handover on pricing and a run log.

Frequently asked

WhatsApp brochure memory advisor RAG Frequently asked questions

No. Memory keys bind directly to each sender's WhatsApp phone number so every customer thread stays isolated.

No. The prompt limits the assistant to catalogue guidance; commercial quotes and orders route to your sales team.

Running the ingestion branch clears the old brochure vectors and replaces them with the updated PDF chunks.

Mert Can Gundogdu
The founder takes the call, not a sales team
Next step

We write the proposal after we have found the problem together

In a thirty-minute call we listen to how you work and talk through where time and customers are slipping away. If you do not need a digital fix, we will tell you that too.

30 minutes · no preparation needed

The call and the week of discovery are both free.Read the terms

Chat on WhatsApp