Skip to main content
Community template Uses AIInternal WikiAI RAG

Local chatbot with retrieval augmented generation (RAG) - n8n workflow template

Click here to view the YouTube Tutorial. You can upload as many PDF files as you want to the Qdrant database. The chatbot will use its retrieval tool to fetch the chunks and use them to answer questions. 1. Install n8n + Ollama + Qdrant using the Self-hosted AI starter kit 2.…

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

Starts on
Chat message
Nodes
11 nodes
Level
Intermediate
Setup
About 16 min

Workflow preview

How this workflow runs

  1. 1

    On form submission

    Starts the workflow from a public form submission, capturing the submitted fields.

  2. 2

    When chat message received

    Starts the workflow when a chat message is received through the chat interface.

  3. 3

    Embeddings Ollama

    Generates vector embeddings for semantic search / retrieval.

  4. 4

    Default Data Loader

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

  5. 5

    Recursive Character Text Splitter

    Splits long documents into chunks the AI can process.

  6. 6

    Ollama Chat Model

    Provides the language model used by the AI steps.

  7. 7

    Simple Memory

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

  8. 8

    Qdrant Vector Store1

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

  9. 9

    Embeddings Ollama1

    Generates vector embeddings for semantic search / retrieval.

  10. 10

    Qdrant Vector Store

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

Creator's notes and setup

Written by Thomas Janssen for the original listing.

Build a 100% local RAG with n8n, Ollama and Qdrant. This agent uses a semantic database (Qdrant) to answer questions about PDF files.

Tutorial

[Click here to view the YouTube Tutorial](

How it works

Build a chatbot that answers based on documents you provide it (Retrieval Augmented Generation). You can upload as many PDF files as you want to the Qdrant database. The chatbot will use its retrieval tool to fetch the chunks and use them to answer questions.

Installation

  1. Install n8n + Ollama + Qdrant using the Self-hosted AI starter kit
  2. Make sure to install Llama 3.2 and mxbai-embed-large as embeddings model.

How to use it

  1. First run the "Data Ingestion" part and upload as many PDF files as you want
  2. Run the Chatbot and start asking questions about the documents you uploaded

n8n nodes used (9 types)

What every node does (11)
  • On form submission (Form Trigger)Starts the workflow from a public form submission, capturing the submitted fields.
  • Qdrant Vector Store (Vector Store Qdrant)Stores and retrieves embeddings for retrieval-augmented generation (RAG).
  • Embeddings Ollama (Embeddings Ollama)Generates vector embeddings for semantic search / retrieval.
  • Default Data Loader (Document Default Data Loader)Loads and prepares documents for the AI to read (RAG ingestion).
  • Recursive Character Text Splitter (Text Splitter Recursive Character Text Splitter)Splits long documents into chunks the AI can process.
  • When chat message received (Chat Trigger)Starts the workflow when a chat message is received through the chat interface.
  • AI Agent (Agent)The AI agent that orchestrates the workflow — it reasons over the input and decides which tools to call.
  • Ollama Chat Model (LLM Chat Ollama)Provides the language model used by the AI steps.
  • Simple Memory (Memory Buffer Window)Gives the AI short-term conversational memory of recent messages.
  • Qdrant Vector Store1 (Vector Store Qdrant)Stores and retrieves embeddings for retrieval-augmented generation (RAG).
  • Embeddings Ollama1 (Embeddings Ollama)Generates vector embeddings for semantic search / retrieval.

FAQ

Local chatbot with retrieval augmented generation (RAG): questions

How do I import the "Local chatbot with retrieval augmented generation (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 "Local chatbot with retrieval augmented generation (RAG)" use?

It uses Agent, LLM Chat Ollama, Memory Buffer Window, Text Splitter Recursive Character Text Splitter, Form Trigger and Document Default Data Loader, plus 3 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 "Local chatbot with retrieval augmented generation (RAG)"?

Start by changing the trigger (schedule, webhook or app event) and the destination nodes to match your stack — it is listed under Internal Wiki, 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