Templates / Keep RAG system updated with Google Drive file changes to Supabase vector DB

Keep RAG system updated with Google Drive file changes to Supabase vector DB

Ready for 3.0

by edisantosa · 653 views · created 2025-10-20 · Document Extraction, AI RAG

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 20 nodes and runs on Google Drive events (file updated). Along the way it connects Supabase, Google Drive, Embeddings OpenAI and Supabase Vector Store and 1 more.

How it runs

Trigger: On Google Drive events (file updated).

  1. Set File ID (Edit Fields (Set)): sets 2 fields: file_id, file_type
  2. If: checks a condition and branches into true / false
  3. Delete Old Doc Rows (Supabase): delete
  4. Limit: keeps the first few items
  5. Set Version (OpenAI): uses OpenAI
  6. Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
  7. Switch: routes items into 6 branches
  8. Download File (Google Drive): download
  9. Extract PDF Text (Extract from File): extracts data from a file (pdf)
  10. Extract from Text File (Extract from File): extracts data from a file (text)

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

Services it uses

SupabaseGoogle DriveEmbeddings OpenAISupabase Vector StoreOpenAI

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (17)

From the author

This n8n workflow ensures data freshness in the RAG system by handling modifications to existing files. It complements the "Document Ingestion" workflow by triggering whenever a file in the monitored Google Drive folder is updated. This…

Excerpt from edisantosa'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.