đŸ€– Create a Documentation Expert Bot with RAG, Gemini, and Supabase — n8n Workflow

Hoch KomplexitĂ€t⏰ Geplant25 Knoten✹ AI👁 31,465 Aufrufevon Lucas Peyrin

Übersicht

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—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 o

Verwendete Knoten

HTTP RequestSupabaseHTMLAI AgentSimple MemoryRecursive Character Text SplitterSupabase Vector StoreDefault Data LoaderEmbeddings Google GeminiGoogle Gemini Chat Model

Workflow-Vorschau

Video Tutorial
@youtube
-- Enable the pgvector extension to work with
create extension vector;
-- Create a table to store your documents
create table documents (
id
Part 1: Building the Knowledge Base (The Libr
Goal: To read all n8n documentation, break it into smal
Action: You only need to run this
Tutorial: Build an AI Expert with RAG
Welcome! This workflow teaches you RAG (Retrieval-Augme
The Goal: To create an AI chatbot that is an expert on
Workflow Setup
Step 1.1: Find All the 'Books'
What it does: This node visits the main n8n documentati
Analogy: We're asking the library's front desk for a co
Step 1.2: Read the List of Books
What it does: It takes the HTML from the previous step
Analogy: We're reading the list from the front desk and
Step 1.3: Process One Book at a Time
What it does: It takes the big list of links and turns
Analogy: Instead of trying to read all the b
Step 1.4: Tidy Up the To-Do List
What it does: First, it removes any duplicate links. Th
Step 1.5: The Librarian's Reading Loop
What it does: This is the engine of the indexing proces
Step 1.5.1: Read a Single Page
What it does: This node takes a single URL from the loo
Analogy: The librarian opens one book to the first page
Why Use a Sub-Workflow?
The main reason is memory management.
Processing a single web page, especially creating vecto
Step 1.5.2: Get the Good Stuff
What it does: It extracts only the main text from the a
Analogy:
Step 1.5.3: Avoid Re-reading
What it does: It checks if we have already processed th
Analogy: The
Step 1.5.4: Create & Store the 'Magic Index C
This is the most important step of indexing!
1. `Recursive Character Text Splitter`: The text is br
Part 2: The Chatbot (Talking to the Expert Li
Goal: To provide an interface where a user can ask a qu
The Front Desk: Ask Your Question Here
What it does: This is the public-facing chat interface.
Action:
1. Activate the e
The Brains: The Expert Librarian
What it does: This is the AI agent that orchestrates th
The 'Synthesizer' & 'Strategist'
What it does: This is the Large Language Model (LLM). I
1. The Strategist: Based on your question and the conv
Short-Term Memory
What it does: This node stores the last few messages of
Analogy: This helps the librarian remember what you jus
The Tool: The 'Magic Filing Cabinet' Retrieve
This is the "Retrieval" part of RAG. When the agent get
1. `Gemini Quer
Optional: Keep the Database Awake
What it does: Free Supabase projects "go to sleep" afte
Setup Step 1: Create Your Supabase Project
First, we need to create the "library" where your AI's
Action:
1. Go to supabase.com and sign up
Setup Step 2: Prepare the Database (SQL)
Now we need to build the "shelves" and "card catalog sy
Action:
1. In your Supabase project, go to the SQL Editor.
2. Find
Setup Step 7: Chat with Your Expert!
Congratulations, the library is built! Now it's time to
Action:
1. Activate the entire workflow using the toggle
Setup Step 3: Get Your Supabase Keys
To let n8n access your new library, we need the keys.
Action:
1. Go to Project Settings > API.
2. Find the Project URL. Copy it.
3. Find the
Setup Step 4: Connect Your Credentials
Now, let's save those keys securely in n8n without leav
Action for Supabase:
1. Go to the `Your Supabase Vector Store` node on the
Setup Step 5: Select Credentials for Other No
Your new credentials are now saved. Let's make sure all
Action:
Go to the remaining Supabase and Gemini nodes.
Setup Step 6: Build the Knowledge Base (Index
This is the big one-time step where the "librarian" rea
Action:
1. Find the `Start Indexing` manual trigger node at th
Was this helpful? Let me know!
![clic](https://workflows.ac/form)
I really hope this template helped you. You
memorymodeldocembedembedtool
Simple Memory
Official n8n Documentation
Default Data Loader
Recursive Character Text

R
Remove Duplicate Documen

O
Only Keep Doc Paths
C
Clean Documentation
Gemini 2.5 Flash
Your Supabase Vector Store
Get All n8n Documentatio

Extract Links from HTML
S
Split Out Links
R
Remove Duplicate Links
A
Add Documentation Page t

Get Documentation Page
Extract Documentation Co

Gemini Query Embedding
Gemini Chunk Embedding
Keep Supabase Instance A

⚡
E
Every 6 Days
L
Loop Over Documentation 

n8n Docs AI Agent
⚡
S
Start Indexing
⚡
R
RAG Chatbot
⚡
I
Ingest Web Page
25 nodes22 edges

So funktioniert es

  1. 1

    Auslöser

    Der Workflow startet mit einem geplant-Auslöser, der nach einem definierten Zeitplan lÀuft.

  2. 2

    Verarbeitung

    Die Daten fließen durch 25 Knoten, connecting agent, chattrigger, documentdefaultdataloader.

  3. 3

    Ausgabe

    Der Workflow schließt seine Automatisierung ab und liefert das Ergebnis an das konfigurierte Ziel.

Knotendetails (25)

HT

HTTP Request

httpRequest

#1
SU

Supabase

supabase

#2
HT

HTML

html

#3
AI

AI Agent

n8n-nodes-langchain.agent

#4
SI

Simple Memory

n8n-nodes-langchain.memoryBufferWindow

#5
RE

Recursive Character Text Splitter

n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter

#6
SU

Supabase Vector Store

n8n-nodes-langchain.vectorStoreSupabase

#7
DE

Default Data Loader

n8n-nodes-langchain.documentDefaultDataLoader

#8
EM

Embeddings Google Gemini

n8n-nodes-langchain.embeddingsGoogleGemini

#9
GO

Google Gemini Chat Model

n8n-nodes-langchain.lmChatGoogleGemini

#10

So importieren Sie diesen Workflow

  1. 1Klicken Sie rechts auf die SchaltflÀche JSON herunterladen, um die Workflow-Datei zu speichern.
  2. 2Öffnen Sie Ihre n8n-Instanz. Gehen Sie zu Workflows → Neu → Aus Datei importieren.
  3. 3WĂ€hlen Sie die heruntergeladene Datei create-a-documentation-expert-bot-with-rag-gemini-and-supabase und klicken Sie auf Importieren.
  4. 4Richten Sie Anmeldedaten fĂŒr jeden Dienstknoten ein (API-SchlĂŒssel, OAuth usw.).
  5. 5Klicken Sie auf Workflow testen, um zu ĂŒberprĂŒfen, ob alles funktioniert, und aktivieren Sie es dann.

Oder direkt in n8n → Aus JSON importieren einfĂŒgen:

{ "name": "đŸ€– Create a Documentation Expert Bot with RAG, Gemini, and Supabase", "nodes": [...], ...}

Integrationen

agentchattriggerdocumentdefaultdataloaderembeddingsgooglegeminiexecuteworkflowexecuteworkflowtriggerfilterhtmlhttprequestlmchatgooglegeminimanualtriggermemorybufferwindowremoveduplicatesscheduletriggersetsplitinbatchessplitoutsupabasetextsplitterrecursivecharactertextsplittervectorstoresupabase

Diesen Workflow holen

Herunterladen und mit einem Klick importieren

JSON herunterladenAuf n8n.io ansehen
Knoten25
KomplexitÀthigh
Auslöserscheduled
Aufrufe31,465
KategorieAI

Erstellt von

Lucas Peyrin

Lucas Peyrin

@lucaspeyrin

Tags

agentchattriggerdocumentdefaultdataloaderembeddingsgooglegeminiexecuteworkflowexecuteworkflowtriggerfilterhtmlhttprequestlmchatgooglegemini
⚡

Neu bei n8n?

n8n ist ein kostenloses Open-Source-Workflow-Automatisierungstool. Selbst hosten oder die Cloud-Version nutzen.

n8n kostenlos holen →

Related AI Workflows

AGCOFIGM+10
high

Automate Digital Product Delivery: Stripe to Gmail via n8n

Transform your post-purchase operations with this high-performance n8n workflow designed for digital creators and SaaS founders. Instead of manual fulfillment, this automation acts as a 24/7 digital concierge. It begins by scanning Stripe for successful transactions, cross-referencing buyer data against a centralized Google Sheets inventory to identify the correct digital asset. Utilizing advanced AI via GPT-4o, the system then drafts a personalized onboarding email, including secure access credentials and custom instructions, ensuring a premium customer experience without manual intervention. This flow eliminates the 'human-in-the-middle' delay, significantly reducing support tickets related to missing downloads. By integrating an AI agent, the workflow can intelligently parse complex product variations, making it far more robust than standard linear automations. Whether you are selling automation templates, software licenses, or protected PDF guides, this system provides a scalable infrastructure that grows with your sales volume while maintaining a personal touch through LLM-generated content. **Common Use Cases:** - Scaling a niche digital marketplace for selling specialized code snippets or design assets. - Automating the distribution of unique software license keys and documentation after a SaaS subscription purchase. - Delivering personalized AI-generated consulting reports or audit results based on customer input data.

⏰ Scheduled·25 nodes
AGCHCOEX+10
high

Automated AI Resume Parser & JD Matcher via n8n & GPT-4

Transform your recruitment funnel with this advanced AI-driven candidate evaluation engine. This n8n workflow eliminates manual screening fatigue by autonomously analyzing batches of resumes against specific job descriptions. Using GPT-4 and LangChain's structured output parsers, the system extracts key qualifications, scores them against your criteria, and generates objective alignment reports. The process begins with a custom n8n form for document upload, followed by intelligent text extraction from PDFs. The data is then processed through an LLM chain to ensure unbiased scoring. Results are synchronized directly to Google Sheets for centralized tracking, while high-match alerts are dispatched via Slack and SendGrid to keep hiring managers informed in real-time. This workflow is essential for high-volume recruitment agencies and scaling startups that need to maintain a rigorous, auditable, and data-backed shortlisting process without increasing headcount or sacrificing quality of hire. **Common Use Cases:** - High-volume university recruitment and internship screening - Technical talent sourcing for niche engineering roles - Internal mobility matching for large corporate restructuring

⚡ Trigger·21 nodes
AGCHGMGM+5
medium

AI Gmail Auto-Labeler: Smart Inbox Sorting with GPT-4 & n8n

Stop drowning in a cluttered inbox and regain control of your digital communication. This advanced n8n automation leverages GPT-4's natural language processing to intelligently analyze, categorize, and label incoming Gmail messages in real-time. Unlike basic filter rules that rely on rigid keywords, this workflow understands the context and sentiment of every email, ensuring high-precision organization. The process begins with a Gmail Trigger that captures new messages. It then passes the content through a LangChain LLM chain where OpenAI evaluates the intent—distinguishing between urgent client requests, internal project updates, or low-priority newsletters. Using structured output parsing, the workflow extracts key metadata and applies the appropriate Gmail labels automatically. This eliminates the manual cognitive load of triaging emails, allowing your team to focus on high-value tasks rather than administrative upkeep. Whether you are managing high-volume support tickets or complex sales inquiries, this workflow ensures that critical messages are highlighted and organized without human intervention. **Common Use Cases:** - Automated Customer Support Triage: Instantly tag emails as 'Urgent Support', 'Feature Request', or 'Billing' to speed up response times. - Sales Lead Prioritization: Automatically identify high-intent inquiries and label them for immediate follow-up by account executives. - Project Management Sync: Categorize incoming vendor updates and stakeholder feedback by project name or department for better visibility.

⚡ Trigger·11 nodes
AGGMGOLM+3
medium

AI Dental Lead Follow-up: n8n, OpenAI & Google Sheets Sync

Stop losing high-value patients to delayed responses. This advanced n8n workflow bridges the gap between lead capture and appointment booking by deploying an AI-driven engagement layer. When a prospect submits a query via your website or landing page, the automation immediately triggers, logging the data into Google Sheets for centralized tracking. Instead of sending a generic auto-reply, the integrated LangChain agent utilizes GPT-4/3.5 to analyze the specific treatment interest—be it Invisalign, dental implants, or routine cleaning—and crafts a personalized, empathetic response delivered via Gmail. The workflow includes a strategic 'Wait' node to mimic natural human timing and a 'Memory Buffer' to maintain context if the lead replies. This system is essential for clinics looking to scale their patient acquisition without increasing administrative headcount, ensuring every inquiry is nurtured instantly with professional, clinical-grade communication. By automating the initial touchpoint, your front-desk team can focus on confirmed arrivals rather than chasing cold leads. **Common Use Cases:** - Automated Patient Triage: Categorizing and responding to specific dental treatment inquiries based on urgency and procedure type. - Medical Spa Lead Nurturing: Instantly engaging prospects interested in high-ticket aesthetic treatments to increase conversion rates. - Multi-Location Clinic Sync: Centralizing lead data from various web forms into a single Google Sheet while maintaining personalized local email follow-ups.

⚡ Trigger·8 nodes
AGCOGOHT+8
high

Automate AI UGC Video Production with Google Sheets & Veo

Transform your digital marketing strategy by automating the production of high-converting User-Generated Content (UGC) at scale. This sophisticated n8n workflow eliminates the logistical bottleneck of traditional content creation by orchestrating a seamless pipeline between Google Sheets and advanced AI video models. By leveraging NanoBanana Pro for precise image synthesis and Veo 3.1 for fluid motion, the system takes three distinct visual inputs—your product, a chosen persona, and a target environment—and blends them into hyper-realistic, selfie-style video assets. The automation begins by monitoring a Google Sheet for new campaign parameters, triggers an intelligent AI agent to handle complex image processing, and manages asynchronous API calls to ensure high-fidelity video rendering. This is an enterprise-grade solution for performance marketers who need to refresh creative assets daily without manual intervention. It effectively handles the heavy lifting of prompt engineering and file management, allowing you to focus on strategy while the workflow generates 8-second, platform-ready clips optimized for the TikTok and Instagram algorithms. **Common Use Cases:** - Scaling creative testing for TikTok and Meta Ads by generating hundreds of product variants - Automating personalized influencer-style shoutouts for e-commerce loyalty programs - Rapid prototyping of social media video content for global brand localization

⏰ Scheduled·24 nodes
@BAGCOIF+7
high

Automate AI Twitter Threads via Telegram & n8n (No-Code)

Streamline your social media presence with this enterprise-grade n8n automation that bridges the gap between raw inspiration and professional X (Twitter) publishing. By integrating Telegram as a mobile command center, this workflow allows you to dictate or type thread ideas on the go. The system leverages OpenAI’s LLMs and LangChain agents to draft high-engagement thread structures, which are then sent back to your private Telegram chat for review. Unlike basic automation, this setup features a sophisticated 'human-in-the-loop' approval system. You can interactively refine the AI-generated content, request edits, or finalize the draft. Once you provide the 'Okay' confirmation, the workflow automatically formats and publishes the entire thread to X via the Blotato integration. This eliminates the friction of manual drafting and copy-pasting, ensuring your brand stays active without the constant overhead of social media management. It is the perfect solution for creators and businesses looking to maintain a high-quality digital presence using a voice-to-thread mobile pipeline. **Common Use Cases:** - Thought Leadership: Convert spontaneous voice memos into structured educational threads while commuting. - Event Live-Tweeting: Rapidly draft and approve professional event summaries from a mobile device without opening the X app. - Content Repurposing: Send links or snippets of long-form articles to Telegram to generate 'tweetable' summaries for social distribution.

⚡ Trigger·19 nodes