Templates / AI-Powered RAG Document Processing & Chatbot with Google Drive, Supabase, OpenAI

AI-Powered RAG Document Processing & Chatbot with Google Drive, Supabase, OpenAI

Needs changes

by Billy Christi ✓ · 13,845 views · created 2025-06-01 · Internal Wiki, AI RAG

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 27 nodes and runs when a chat message arrives (plus 1 other trigger). Along the way it connects Google Drive, Google Gemini Chat Model, Embeddings OpenAI and Supabase Vector Store and 1 more.

How it runs

Trigger: When a chat message arrives (plus 1 other trigger).

  1. AI Agent: runs an AI agent, with model: OpenAI Chat Model; 1 tool (Supabase Vector Store); memory: Simple Memory
  2. Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
  3. Set File ID (Edit Fields (Set)): sets 1 field: file_id
  4. Download FIle (Google Drive): download
  5. Switch: routes items into 2 branches
  6. Extract from PDF (Extract from File): extracts data from a file (pdf)
  7. Extract from CSV (Extract from File): extracts data from a file
  8. Document Data (Edit Fields (Set)): sets or maps fields
  9. Create Metadata Title & Description (Basic LLM Chain): sends a prompt to an LLM, with model: Google Gemini Chat Model; output parser: Structured Output Parser
  10. Split into chunks (Code): runs custom JavaScript code

…plus 5 more steps. See the full node list below.

Services it uses

Google DriveGoogle Gemini Chat ModelEmbeddings OpenAISupabase Vector StoreOpenAI Chat Model

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • AI Agent v1 (old agent modes) in AI Agent (v1.8): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Removed in 3.0Replace with
AI Agent v1 (old agent modes)
AI Agent (v1.8)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (21)

From the author

Who is this for? This workflow is perfect for: Businesses and teams who need an automated solution to organize, analyze, and retrieve insights from their internal documents. Researchers who want to quickly analyze and query large collections of research…

Excerpt from Billy Christi's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.