Skip to main content

AI-powered WhatsApp chatbot for text, voice, images, and PDF with RAG

Workflow preview

Workflow preview
100%
AI-powered WhatsApp chatbot for text, voice, images, and PDF with RAG preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Who is this for? This template is designed for internal support teams, product specialists, and knowledge managers in technology companies who want to automate ingestion of product documentation an...

Best for

  • Support Chatbot automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.embeddingsopenai, n8n-nodes-base.manualtrigger, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.vectorstoremongodbatlas, @n8n/n8n-nodes-langchain.documentdefaultdataloader, @n8n/n8n-nodes-langchain.textsplitterrecursivecharactertextsplitter

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by NovaNode.

Original n8n.io source

1.1 Workflow description

Title
AI-powered WhatsApp chatbot for text, voice, images, and PDF with RAG
Workflow name
AI-powered WhatsApp chatbot for text, voice, images, and PDF with RAG

Who is this for?

This template is designed for internal support teams, product specialists, and knowledge managers in technology companies who want to automate ingestion of product documentation and enable AI-driven, retrieval-augmented question answering via WhatsApp.

What problem is this workflow solving?

Support agents often spend too much time manually searching through lengthy documentation, leading to inconsistent or delayed answers. This solution automates importing, chunking, and indexing product manuals, then uses retrieval-augmented generation (RAG) to answer user queries accurately and quickly with AI via WhatsApp messaging.

What these workflows do

Workflow 1: Document Ingestion & Indexing
  • Manually triggered to import product documentation from Google Docs.
  • Automatically splits large documents into chunks for efficient searching.
  • Generates vector embeddings for each chunk using OpenAI embeddings.
  • Inserts the embedded chunks and metadata into a MongoDB Atlas vector store, enabling fast semantic search.
Workflow 2: AI-Powered Query & Response via WhatsApp
  • Listens for incoming WhatsApp user messages, supporting various types:
    • Text messages: Plain text queries from users.
    • Audio messages: Voice notes transcribed into text for processing.
    • Image messages: Photos or screenshots analyzed to provide contextual answers.
    • Document messages: PDFs, spreadsheets, or other files parsed for relevant content.
  • Converts incoming queries to vector embeddings and performs similarity search on the MongoDB vector store.
  • Uses OpenAI’s GPT-4o-mini model with retrieval-augmented generation to produce concise, context-aware answers.
  • Maintains conversation context across multiple turns using a memory buffer node.
  • Routes different message types to appropriate processing nodes to maximize answer quality.

Setup

Setting up vector embeddings
  1. Authenticate Google Docs and connect your Google Docs URL containing the product documentation you want to index.
  2. Authenticate MongoDB Atlas and connect the collection where you want to store the vector embeddings. Create a search index on this collection to support vector similarity queries.
  3. Ensure the index name matches the one configured in n8n (data_index).
  4. See the example MongoDB search index template below for reference.
Setting up chat
  1. Authenticate the WhatsApp node with your Meta account credentials to enable message receiving and sending.
  2. Connect the MongoDB collection containing embedded product documentation to the MongoDB Vector Search node used for similarity queries.
  3. Set up the system prompt in the Knowledge Base Agent node to reflect your company’s tone, answering style, and any business rules, ensuring it references the connected MongoDB collection for context retrieval.

Make sure

Both MongoDB nodes (in ingestion and chat workflows) are connected to the same collection with:

An embedding field storing vector data,

Relevant metadata fields (e.g., document ID, source), and

The same vector index name configured (e.g., data_index).

Search Index Example:

{ "mappings": { "dynamic": false, "fields": { "_id": { "type": "string" }, "text": { "type": "string" }, "embedding": { "type": "knnVector", "dimensions": 1536, "similarity": "cosine" }, "source": { "type": "string" }, "doc_id": { "type": "string" } } } }

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Knowledge Base Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.9

Block 2 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 3 - Embeddings OpenAI

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 4 - When clicking "Execute Workflow"

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 5 - Simple Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 6 - MongoDB Vector Search

Type / Role
@n8n/n8n-nodes-langchain.vectorStoreMongoDBAtlas - vectorStoreMongoDBAtlas
Config choices
Version 1.1

Block 7 - Document Section Loader

Type / Role
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - documentDefaultDataLoader
Config choices
Version 1

Block 8 - Document Chunker

Type / Role
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - textSplitterRecursiveCharacterTextSplitter
Config choices
Version 1

Block 9 - MongoDB Vector Store Inserter

Type / Role
@n8n/n8n-nodes-langchain.vectorStoreMongoDBAtlas - vectorStoreMongoDBAtlas
Config choices
Version 1.1

Block 10 - OpenAI Embeddings Generator

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 11 - Google Docs Importer

Type / Role
n8n-nodes-base.googleDocs - googleDocs
Config choices
Version 2

Block 12 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - WhatsApp Trigger

Type / Role
n8n-nodes-base.whatsAppTrigger - whatsAppTrigger
Config choices
Version 1

Block 16 - OpenAI

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 17 - OpenAI1

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 18 - Extract from PDF

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1

Block 19 - Extract from XLS

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1

Block 20 - Extract from XLSX

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1

Block 21 - Map JSON

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 22 - Map file extensions

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 23 - Map document prompt

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 24 - Map image prompt

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Showing the first 24 of 35 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow AI-powered WhatsApp chatbot for text, voice, images, and PDF with RAG
Complexity advanced
Nodes 35
Categories Support Chatbot, AI RAG
Author NovaNode
Published 09 Jun 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/4827/4827.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does AI-powered WhatsApp chatbot for text, voice, images, and PDF with RAG do?

Who is this for? This template is designed for internal support teams, product specialists, and knowledge managers in technology companies who want to automate ingestion of product documentation an...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Support Chatbot, AI RAG use case.