Templates / Process documents with recursive chunking using Google Drive, OpenAI & Gemini RAG

Process documents with recursive chunking using Google Drive, OpenAI & Gemini RAG

Ready for 3.0

by Mohsin Ali · 3,431 views · created 2025-07-01 · 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 23 nodes and runs on Google Drive events (file created) (plus 1 other trigger). Along the way it connects Google Drive, OpenAI Chat Model, Embeddings OpenAI and Supabase Vector Store and 3 more. It also calls etvncxazsxflierkgyge.supabase.co over HTTP.

How it runs

Trigger: On Google Drive events (file created) (plus 1 other trigger).

  1. Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
  2. OpenAI: analyze (image)
  3. File info (Edit Fields (Set)): sets 4 fields: File_id, File_Type, File_url…
  4. AI Agent: runs an AI agent, with model: Google Gemini Chat Model; 1 tool (SupaBase Query)
  5. Google Drive: download
  6. Switch: routes items into 2 branches
  7. Extract from PDF (Extract from File): extracts data from a file (pdf)
  8. Extract from TEXT (Extract from File): extracts data from a file (text)
  9. PDF to DATA (Edit Fields (Set)): sets or maps fields
  10. Document Data (Edit Fields (Set)): sets or maps fields

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

Services it uses

Google DriveOpenAI Chat ModelEmbeddings OpenAISupabase Vector StoreGoogle Gemini Chat ModelOpenAIHTTP Request

HTTP calls to: etvncxazsxflierkgyge.supabase.co

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 (20)

From the author

1. Document Ingestion & Processing Google Drive Trigger monitors for new files → Loop Over Items processes each file → File Info extracts metadata → Google Drive downloads the actual content → Switch routes to appropriate extractors (PDF or TEXT) based on…

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