Skip to main content
Community template Uses AISupport ChatbotAI RAG

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

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. Support agents often…

Template by NovaNode · Original listing (opens in a new tab)

Starts on
App event
Nodes
32 nodes
Level
Advanced
Setup
About 37 min

Workflow preview

How this workflow runs

  1. 1

    When clicking "Execute Workflow"

    Starts the workflow manually when you click 'Execute workflow' — used for testing and manual runs.

  2. 2

    WhatsApp Trigger

    Starts the workflow when the Whats App event occurs.

  3. 3

    OpenAI Chat Model

    Provides the OpenAI chat model (GPT) that powers the AI reasoning in this workflow.

  4. 4

    Embeddings OpenAI

    Turns text into vector embeddings using OpenAI (for semantic search / RAG).

  5. 5

    Simple Memory

    Gives the AI short-term conversational memory of recent messages.

  6. 6

    MongoDB Vector Search

    Stores and retrieves embeddings for retrieval-augmented generation (RAG).

  7. 7

    Document Section Loader

    Loads and prepares documents for the AI to read (RAG ingestion).

  8. 8

    Document Chunker

    Splits long documents into chunks the AI can process.

  9. 9

    OpenAI Embeddings Generator

    Turns text into vector embeddings using OpenAI (for semantic search / RAG).

  10. 10

    Google Docs Importer

    Reads from or writes to a Google Docs document.

Creator's notes and setup

Written by NovaNode for the original listing.

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" } } } }

n8n nodes used (17 types)

What every node does (32)
  • Knowledge Base Agent (Agent)The AI agent that orchestrates the workflow — it reasons over the input and decides which tools to call.
  • OpenAI Chat Model (LLM Chat Open AI)Provides the OpenAI chat model (GPT) that powers the AI reasoning in this workflow.
  • Embeddings OpenAI (Embeddings Open AI)Turns text into vector embeddings using OpenAI (for semantic search / RAG).
  • When clicking "Execute Workflow" (Manual Trigger)Starts the workflow manually when you click 'Execute workflow' — used for testing and manual runs.
  • Simple Memory (Memory Buffer Window)Gives the AI short-term conversational memory of recent messages.
  • MongoDB Vector Search (Vector Store Mongo DBAtlas)Stores and retrieves embeddings for retrieval-augmented generation (RAG).
  • Document Section Loader (Document Default Data Loader)Loads and prepares documents for the AI to read (RAG ingestion).
  • Document Chunker (Text Splitter Recursive Character Text Splitter)Splits long documents into chunks the AI can process.
  • MongoDB Vector Store Inserter (Vector Store Mongo DBAtlas)Stores and retrieves embeddings for retrieval-augmented generation (RAG).
  • OpenAI Embeddings Generator (Embeddings Open AI)Turns text into vector embeddings using OpenAI (for semantic search / RAG).
  • Google Docs Importer (Google Docs)Reads from or writes to a Google Docs document.
  • WhatsApp Trigger (Whats App Trigger)Starts the workflow when the Whats App event occurs.
  • OpenAI (Open AI)Calls the OpenAI API for chat, image, or audio generation.
  • OpenAI1 (Open AI)Calls the OpenAI API for chat, image, or audio generation.
  • Extract from PDF (Extract From File)Handles the Extract From File step in this workflow.
  • Extract from XLS (Extract From File)Handles the Extract From File step in this workflow.
  • Extract from XLSX (Extract From File)Handles the Extract From File step in this workflow.
  • Map JSON (Set)Sets or transforms workflow data — prepares, renames, or injects fields before the next step.
  • Map file extensions (Code)Runs custom JavaScript to transform or manipulate the data flowing through the workflow.
  • Map document prompt (Set)Sets or transforms workflow data — prepares, renames, or injects fields before the next step.
  • Map image prompt (Set)Sets or transforms workflow data — prepares, renames, or injects fields before the next step.
  • Map text prompt (Set)Sets or transforms workflow data — prepares, renames, or injects fields before the next step.
  • Gets WhatsApp Voicemail Source URL (Whats App)Sends or receives WhatsApp messages.
  • Gets WhatsApp Image Source URL (Whats App)Sends or receives WhatsApp messages.
  • Gets WhatsApp Document Source URL (Whats App)Sends or receives WhatsApp messages.
  • Download Voicemail (HTTP Request)Makes an external API call (HTTP request) to send or retrieve data from a third-party service.
  • Download Image (HTTP Request)Makes an external API call (HTTP request) to send or retrieve data from a third-party service.
  • Download Document (HTTP Request)Makes an external API call (HTTP request) to send or retrieve data from a third-party service.
  • Route Types (Switch)Routes the workflow down one of several paths based on a value.
  • Route Document Types (Switch)Routes the workflow down one of several paths based on a value.
  • Send Unsupported Response (Whats App)Sends or receives WhatsApp messages.
  • Send Response (Whats App)Sends or receives WhatsApp messages.

FAQ

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

How do I import the "AI-powered WhatsApp chatbot for text, voice, images, and PDF with RAG" workflow into n8n?

Copy the workflow JSON from this page, open the n8n editor, click on an empty canvas and paste with Ctrl+V (Cmd+V on macOS). You can also download the .json file and choose Import from File in the workflow menu. Save the workflow, then attach credentials before activating it.

Which nodes and credentials does "AI-powered WhatsApp chatbot for text, voice, images, and PDF with RAG" use?

It uses HTTP Request, Set, Switch, Google Docs, Whats App and Code, plus 11 more. Any node that connects to an external service needs your own credential — open each node after import and select or create one. Trigger, logic and transformation nodes usually need no credentials.

Can it run on n8n Cloud and on self-hosted n8n?

The workflow format is the same on both. If a node appears as unknown or outdated after import, update n8n to a recent version or, on self-hosted instances, install the required community node package. Features such as $env access are available on self-hosted instances only.

How can I customise "AI-powered WhatsApp chatbot for text, voice, images, and PDF with RAG"?

Start by changing the trigger (schedule, webhook or app event) and the destination nodes to match your stack — it is listed under Support Chatbot, AI RAG. Edit prompts, field mappings and filters in the relevant nodes, use expressions like {{ $json.field }} to map data, and test with a manual execution before activating.

n8n is a trademark of n8n GmbH. AltFTool is not affiliated with, endorsed by or sponsored by n8n. Community templates are credited to their creators and link to the original listing; AltFTool originals are written and tested by the AltFTool team.

About this page

Free n8n workflow templates to copy and import

The AltFTool n8n library collects free n8n workflow templates for AI agents, Gmail, Google Sheets, Telegram and other apps. Each workflow page shows a preview, the list of nodes and the credentials it needs, and lets you copy or download the JSON to import into your own n8n.

Search the templates by app or task, or browse them by category and by node. The Workflow Inspector checks any workflow JSON for triggers, credentials and hardcoded keys before you share it, and the expressions cheat sheet gives copy-paste n8n expression examples. AltFTool is not affiliated with n8n.

People also search for

  • n8n workflow templates
  • n8n templates
  • n8n automation examples
  • n8n json workflows
  • n8n nodes
  • free n8n workflow templates
  • n8n ai agent template
  • n8n expressions cheat sheet