An n8n template that walks through retrieval-augmented generation end to end. Nine nodes split into two halves. The first is a one-time indexing run: crawl every page of the official n8n documentation, split it with a recursive character text splitter, embed each chunk with OpenAI Embeddings, and store the vectors in n8n’s built-in Simple Vector Store. The second is the chat interface: an AI Agent retrieves the most relevant chunks for a question, then passes them to the model with a hard instruction to answer using only that material.
The real value is not a docs bot for n8n — it is that you can point the same skeleton at your own knowledge base. Crawl, chunk, embed, retrieve, constrain: every step is a visible, separate node, and no external database is needed. This is the clearest RAG structure in our collection.
Template page stats: author ayhamjo7, published 2025-07-22, roughly 183 views (collected 2026-07-27); credits Lucas Peyrin.
What it does
- Crawls all pages of the official n8n documentation (HTTP Request plus HTML parsing nodes)
- Splits long documents into retrieval-sized chunks with a recursive character splitter
- Generates embeddings for each chunk via OpenAI and stores them in n8n’s built-in vector store
- Has an AI Agent answer from retrieved chunks under a “use only this information” instruction, reducing invented answers
- Keeps multi-turn context with a Memory node
- Exposes a publicly accessible chat page URL through the Chat Trigger
Prerequisites
- n8n, cloud or self-hosted
- An OpenAI API key (the same credential serves both the chat model and embeddings)
- No external vector database — the template uses the built-in Simple Vector Store
How to use
- Import the template and create a credential with your API key on any one of the OpenAI nodes.
- Apply that credential to the other two OpenAI nodes as well (both chat model and embeddings).
- Find the
Start Indexingmanual trigger at the top left and execute it. Per the template, crawling and embedding the full docs takes roughly 15–20 minutes. - Once indexing finishes, activate the workflow, open the Chat Trigger node at the bottom left, and copy its Public URL.
- Open that URL in a new tab and ask something like “How does the IF node work?” or “What is a sub-workflow?”
- To use your own knowledge base, change the crawl target and parsing rules — the rest of the chain stays as is.
Use cases
- n8n users who want to see what each RAG step actually does
- Prototyping a Q&A bot over internal docs, product manuals, or a help center
- Letting new team members self-serve documentation instead of asking around
- Teaching material for demonstrating how retrieval constraints suppress hallucination
Notes
- The built-in vector store lives in memory and is wiped when the n8n instance restarts, which means re-running the whole index. For anything long-lived, swap Simple Vector Store for Qdrant, Supabase, or similar.
- Indexing takes far longer than setup (roughly 15–20 minutes versus about 2). Leave time for the first run rather than cancelling midway.
- The template description is inconsistent on one point: the prose mentions Gemini for answering, but the actual nodes use an OpenAI chat model and OpenAI embeddings. Trust the nodes.
- Crawling a full documentation site generates a lot of requests — be considerate about request rate.
- The Chat Trigger’s public URL is genuinely public. Do not index sensitive internal material behind it.
- OpenAI is an overseas service; mainland China access typically requires an international network. Both embeddings and chat calls are usage-billed — see the official pricing page for current rates.