Block 1 - Simple Memory
- Type / Role
- @n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
- Config choices
- Version 1.3
This workflow is provided as-is. Please review and test before using in production.
How it works This template is a complete, hands on tutorial for building a RAG (Retrieval Augmented Generation) pipeline. In simple terms, you'll teach an AI to become an expert on a specific topic...
@n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.documentdefaultdataloader, @n8n/n8n-nodes-langchain.textsplitterrecursivecharactertextsplitter, n8n-nodes-base.removeduplicates, n8n-nodes-base.filter, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.httprequest
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Lucas Peyrin.
Original n8n.io sourceThis template is a complete, hands-on tutorial for building a RAG (Retrieval-Augmented Generation) pipeline. In simple terms, you'll teach an AI to become an expert on a specific topic—in this case, the official n8n documentation—and then build a chatbot to ask it questions.
Think of it like this: instead of a general-knowledge AI, you're building an expert librarian.
The workflow is split into two main parts:
Part 1: Indexing the Knowledge (Building the Library) This is a one-time process you run manually. The workflow automatically scrapes all pages of the n8n documentation, breaks them down into small, digestible chunks, and uses an AI model to create a special numerical representation (an "embedding") for each chunk. These embeddings are then stored in n8n's built-in Simple Vector Store. This is like a librarian reading every book and creating a hyper-detailed index card for every paragraph.
Important: This in-memory knowledge base is temporary. It will be erased if you restart your n8n instance, and you will need to run the indexing process again.
Part 2: The AI Agent (The Expert Librarian) This is the chat interface. When you ask a question, the AI agent doesn't guess the answer. Instead, it uses your question to find the most relevant "index cards" (chunks) from the knowledge base it just built. It then feeds these specific, relevant chunks to a powerful language model (Gemini) with a strict instruction: "Answer the user's question using ONLY this information." This ensures the answers are accurate, factual, and grounded in your provided documents.
Setup time: ~2 minutes (plus ~15-20 minutes for indexing)
This template uses n8n's built-in tools, removing the need for an external database. Follow these simple steps to get started.
Configure Google AI Credentials:
Gemini nodes (e.g., Gemini 2.5 Flash).+ Create New Credential.Apply Credentials to All Nodes:
Gemini nodes (Gemini Chunk Embedding and Gemini Query Embedding) and select your newly created credential from the dropdown list.Build the Knowledge Base:
Start Indexing manual trigger node at the top-left of the workflow.Chat with Your Expert Agent:
RAG Chatbot chat trigger node (bottom-left) and copy its Public URL.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.
Showing the first 24 of 48 workflow blocks. Download the JSON for the full node graph.
| Workflow | 🤖 Build a Documentation Expert Chatbot with Gemini RAG Pipeline |
|---|---|
| Complexity | advanced |
| Nodes | 48 |
| Categories | Internal Wiki, AI RAG |
| Author | Lucas Peyrin |
| Published | 18 Jul 2025 |
Use the JSON export at /data/workflows/6137/6137.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
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.
How it works This template is a complete, hands on tutorial for building a RAG (Retrieval Augmented Generation) pipeline. In simple terms, you'll teach an AI to become an expert on a specific topic...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
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 Internal Wiki, AI RAG use case.