Templates / Build a RAG knowledge base from PDFs with Gemini, Supabase and Google Sheets

Build a RAG knowledge base from PDFs with Gemini, Supabase and Google Sheets

Ready for 3.0

by Salman Mehboob ✓ · 162 views · created 2026-06-11 · Internal Wiki, 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-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This AI workflow has 27 nodes and runs on a schedule (every hour) (plus 1 other trigger). Along the way it connects Google Sheets, Supabase Vector Store, Google Drive and Embeddings Google Gemini and 1 more.

How it runs

Trigger: On a schedule (every hour) (plus 1 other trigger).

  1. Get row(s) in sheet (Google Sheets): uses Google Sheets
  2. SerajUAE RAG Agent (AI Agent): runs an AI agent, with model: Gemini Flash (RAG); 1 tool (SerajUAE Knowledge Base)
  3. Filter: keeps only the items that match a condition
  4. Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
  5. All Done (Edit Fields (Set)): sets or maps fields
  6. Seraj or Drive? (If): checks a condition and branches into true / false
  7. Fetch File Page (HTTP Request): calls an HTTP API
  8. Extract Drive File ID + Title (Code): runs custom JavaScript code
  9. Extract PDF URL + Title (Code): runs custom JavaScript code
  10. Download PDF (Drive) (Google Drive): download

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

Services it uses

Google SheetsSupabase Vector StoreGoogle DriveEmbeddings Google GeminiGoogle Gemini Chat Model

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.

Check at runtime on n8n 3.0
  • Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Informational: a static scan can't see the data, so test these on your own instance. Status above is unchanged.

Nodes used (18)

From the author

Quick Overview This workflow ingests educational PDF URLs from Google Sheets, extracts and chunks their text, generates embeddings with Google Gemini, and stores them in a Supabase pgvector table for retrieval, while also exposing a public chat webhook that…

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