Skip to main content

Build multi-client agentic RAG document processing pipeline with Supabase Vector DB

Workflow preview

Workflow preview
100%
Build multi-client agentic RAG document processing pipeline with Supabase Vector DB preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Ultimate n8n Agentic RAG Template Author: Cole Medin What is this? This template provides a complete implementation of an Agentic RAG (Retrieval Augmented Gene...

Best for

  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.documentdefaultdataloader, @n8n/n8n-nodes-langchain.embeddingsopenai, n8n-nodes-base.googledrive, n8n-nodes-base.googledrivetrigger, n8n-nodes-base.extractfromfile, n8n-nodes-base.supabase, n8n-nodes-base.set, n8n-nodes-base.aggregate

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Growth AI.

Original n8n.io source

1.1 Workflow description

Title
Build multi-client agentic RAG document processing pipeline with Supabase Vector DB
Workflow name
Build multi-client agentic RAG document processing pipeline with Supabase Vector DB

Ultimate n8n Agentic RAG Template

Author: Cole Medin

What is this?

This template provides a complete implementation of an Agentic RAG (Retrieval Augmented Generation) system in n8n that can be extended easily for your specific use case and knowledge base. Unlike standard RAG which only performs simple lookups, this agent can reason about your knowledge base, self-improve retrieval, and dynamically switch between different tools based on the specific question.

Why Agentic RAG?

Standard RAG has significant limitations:

  • Poor analysis of numerical/tabular data
  • Missing context due to document chunking
  • Inability to connect information across documents
  • No dynamic tool selection based on question type

What makes this template powerful:

  • Intelligent tool selection: Switches between RAG lookups, SQL queries, or full document retrieval based on the question
  • Complete document context: Accesses entire documents when needed instead of just chunks
  • Accurate numerical analysis: Uses SQL for precise calculations on spreadsheet/tabular data
  • Cross-document insights: Connects information across your entire knowledge base
  • Multi-file processing: Handles multiple documents in a single workflow loop
  • Efficient storage: Uses JSONB in Supabase to store tabular data without creating new tables for each CSV

Getting Started

  1. Run the table creation nodes first to set up your database tables in Supabase
  2. Upload your documents through Google Drive (or swap out for a different file storage solution)
  3. The agent will process them automatically (chunking text, storing tabular data in Supabase)
  4. Start asking questions that leverage the agent's multiple reasoning approaches

Customization

This template provides a solid foundation that you can extend by:

  • Tuning the system prompt for your specific use case
  • Adding document metadata like summaries
  • Implementing more advanced RAG techniques
  • Optimizing for larger knowledge bases

I do intend on making a local version of this agent very soon!

1.2 Logical Blocks

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.

2. Block-by-Block Analysis

Block 1 - Default Data Loader

Type / Role
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - documentDefaultDataLoader
Config choices
Version 1

Block 2 - Embeddings OpenAI1

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1

Block 3 - Download File

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 4 - File Created

Type / Role
n8n-nodes-base.googleDriveTrigger - googleDriveTrigger
Config choices
Version 1

Block 5 - File Updated

Type / Role
n8n-nodes-base.googleDriveTrigger - googleDriveTrigger
Config choices
Version 1

Block 6 - Extract Document Text

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1

Block 7 - Delete Old Doc Rows

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 8 - Set File ID

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 9 - Extract PDF Text

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1

Block 10 - Aggregate

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 11 - Character Text Splitter

Type / Role
@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter - textSplitterCharacterTextSplitter
Config choices
Version 1

Block 12 - Summarize

Type / Role
n8n-nodes-base.summarize - summarize
Config choices
Version 1

Block 13 - Switch

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3

Block 14 - Insert into Supabase Vectorstore

Type / Role
@n8n/n8n-nodes-langchain.vectorStoreSupabase - vectorStoreSupabase
Config choices
Version 1

Block 15 - Extract from Excel

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1

Block 16 - Set Schema

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 17 - Extract from CSV

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1

Block 18 - Loop Over Items

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 19 - Delete Old Data Rows

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 20 - Insert Document Metadata

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.5

Block 21 - Insert Table Rows

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.5

Block 22 - Update Schema for Document Metadata

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.5

Block 23 - Create Document Metadata Table1

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.5

Block 24 - Create Document Rows Table (for Tabular Data)1

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.5

Showing the first 24 of 38 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Build multi-client agentic RAG document processing pipeline with Supabase Vector DB
Complexity advanced
Nodes 38
Categories AI RAG
Author Growth AI
Published 25 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8916/8916.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

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.

Frequently asked questions

What does Build multi-client agentic RAG document processing pipeline with Supabase Vector DB do?

Ultimate n8n Agentic RAG Template Author: Cole Medin What is this? This template provides a complete implementation of an Agentic RAG (Retrieval Augmented Gene...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

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 AI RAG use case.