Company RAG and data queries

WhatsApp product brochure PDF in-memory vector RAG workflow

Short answer

This n8n workflow fetches a product brochure PDF over HTTP, extracts its text and populates an in-memory vector store with OpenAI embeddings. Incoming WhatsApp messages pass through a switch node that turns away non-text formats politely. Valid text enquiries enter an OpenAI sales agent backed by brochure search.

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

Business problem solved

Prospective buyers message WhatsApp expecting fast answers on speaker wattage, inputs and accessories buried inside multi-page PDF brochures. Leaving those enquiries for manual lookup slows down sales teams.

Trigger

A manual trigger loads the PDF brochure; a WhatsApp trigger handles incoming customer messages.

Connected systems

Connected systems

  • WhatsApp Business API
  • OpenAI
  • In-memory vector store
  • HTTP PDF endpoint
  • PDF text extractor
  • 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

    HTTP PDF brochure fetch and extraction

    An HTTP request retrieves the PDF brochure and Extract from File pulls clean text into 2,000-character chunks.

  2. 02

    In-memory vector store setup

    OpenAI embeddings populate the in-memory product catalogue store with clearStore enabled on rebuild.

  3. 03

    WhatsApp message-type switch

    The switch node passes text messages forward and replies politely whenever a sender sends audio, image or video.

  4. 04

    AI sales reply over WhatsApp

    OpenAI gpt-4o reads buffered memory and queries the brochure vector tool before sending the WhatsApp reply.

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; unsupported non-text messages are handled by a dedicated switch branch.

Production layer added by ALTAI

During live deployment, ALTAI upgrades temporary memory to persistent Qdrant or pgvector, adds the 24-hour Meta template check, human handover on quotes and a run log.

Frequently asked

WhatsApp PDF brochure in-memory RAG Frequently asked questions

In-memory vectors clear on restart. For live customer lines we swap in persistent Qdrant or PostgreSQL pgvector.

The switch node catches non-text payloads immediately and replies explaining that only text enquiries are supported in this branch.

Yes. Window buffer memory keys each session by the sender's WhatsApp phone number.

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