🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

Google Drive + Supabase: searchable docs that stay fresh

Lisa Granqvist Partner Workflow Automation Expert

Your docs change, but your “source of truth” doesn’t. Someone drops a new PDF into Drive, a spreadsheet gets updated, and suddenly the answer your team gives customers is already out of date.

Marketing leads feel it when the latest messaging isn’t searchable. Ops managers get pulled into the same questions on repeat. And founders end up being human search engines. This Drive Supabase docs automation keeps your knowledge base current without you babysitting it.

Below you’ll see how the workflow watches a Google Drive folder, extracts text from common file types, creates embeddings, and stores everything in Supabase so your RAG chatbot can answer with the newest material.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: Google Drive + Supabase: searchable docs that stay fresh

The Problem: Knowledge Bases Go Stale Overnight

Google Drive is where documents go to live. It’s also where “final_v7_really_final.pdf” quietly gets replaced, and nobody updates the FAQ, the internal wiki, or the chatbot prompt. Then the same problems show up again and again: support shares an older policy, sales sends a retired pricing sheet, and marketing answers a partner question with last quarter’s details. You can try to fix it with manual uploads to a database or an internal tool, but it’s boring work, and it gets skipped the moment things get busy.

The friction compounds. Here’s where it breaks down.

  • Someone has to notice a file changed, then remember to “re-index” it somewhere else.
  • PDFs, spreadsheets, Google Docs, and Word files all need different handling, so the process becomes a bunch of little exceptions.
  • Manual copy-paste introduces mistakes, and those mistakes get repeated because the “searchable” version becomes the trusted one.
  • Without reliable ingestion, your RAG chatbot answers confidently with old information, which is honestly worse than saying “I don’t know.”

The Solution: Auto-Index Google Drive Files Into Supabase

This workflow turns a messy, manual “keep the knowledge base updated” job into an automatic pipeline. When a new file appears in a specific Google Drive folder (the template uses a folder called “DOCUMENTS”), n8n grabs it, figures out what type it is, and extracts the content the right way. PDFs get their text pulled directly. Google Docs are downloaded and converted to plain text. Excel files are read, aggregated, and concatenated into one clean text blob. Word docs are converted into Google Docs first (so they’re easy to extract), and then the converted file gets picked up and processed on the next run.

Once text is extracted, the workflow splits it into manageable chunks (about 2,000 characters), attaches useful metadata like file name and created date, generates OpenAI embeddings, and inserts everything into a Supabase vector store. Your RAG agent can then retrieve the right chunks later, using the latest documents that actually exist in Drive.

What You Get: Automation vs. Results

Example: What This Looks Like

Say your team adds 20 new or updated files a week to a shared “DOCUMENTS” folder: PDFs, a couple of spreadsheets, and a handful of Docs. Manually, even a quick process (download, copy text, clean it up, upload to your vector DB) can take about 10 minutes per file, which is roughly 3 hours weekly. With this workflow, the “work” is just dropping the file into Drive. Indexing runs automatically in the background, so you get those hours back and the database stays current.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Google Drive to store and trigger on new docs
  • Supabase to store vectors for semantic search
  • OpenAI API key (get it from the OpenAI API dashboard)

Skill level: Intermediate. You’ll connect accounts, set a folder, and paste a few keys, plus confirm your Supabase table and vector settings.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

A file lands in your Drive folder. The Google Drive Trigger watches a designated folder (like “DOCUMENTS”) and fires as soon as a new file is created.

The workflow identifies the file and grabs the content. n8n downloads the file, assigns identifiers (so chunks can be traced back later), then routes it by MIME type. PDFs go through PDF text extraction, Google Docs and text-like files get converted to plain text, and Excel data is read and combined into a single text block.

Word docs get normalized first. If a .doc or .docx comes in, an HTTP request converts it into a Google Doc. That new Google Doc triggers the workflow again, which keeps extraction consistent. No special “Word parser” babysitting required.

Text becomes searchable in Supabase. Extracted content is split into chunks (around 2,000 characters), enriched with metadata (file_name, creator, created_at), embedded using OpenAI, then inserted into the Supabase vector store for retrieval by your RAG agent.

You can easily modify the watched folder and the chunk size to match your content. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Drive File Trigger

Set up the workflow trigger to watch a specific Google Drive folder for new files.

  1. Add and open Drive File Trigger.
  2. Set Event to fileCreated.
  3. Set Trigger On to specificFolder.
  4. Set Folder To Watch to your folder ID (replace [YOUR_ID]).
  5. Credential Required: Connect your googleDriveOAuth2Api credentials.
⚠️ Common Pitfall: The placeholder [YOUR_ID] must be replaced with a real folder ID or the trigger will never fire.

Step 2: Connect Google Drive for File Identification and Downloading

Capture file metadata, iterate items, and download the file from Drive for processing.

  1. In Assign File Identifiers, keep the assignments that map file_id to {{ $('Drive File Trigger').item.json.id }} and file_type to {{ $('Drive File Trigger').item.json.mimeType }}.
  2. Open Iterate Items Batch and leave defaults to process files one at a time.
  3. Configure Download Drive File with Operation set to download and File ID set to {{ $('Assign File Identifiers').item.json.file_id }}.
  4. Under Google File Conversion, set Docs To Format to text/plain.
  5. Credential Required: Connect your googleDriveOAuth2Api credentials on Download Drive File.

Step 3: Set Up File Routing and Extraction

Use MIME type routing to extract content from PDFs, text documents, and spreadsheets.

  1. Open Route by File Type and verify each rule checks {{ $('Assign File Identifiers').item.json.file_type }} against the expected MIME types.
  2. Set Pull PDF Content to Operation pdf.
  3. Set Read Text Document to Operation text.
  4. Set Read Excel Data to Operation xlsx.
  5. Ensure Read Excel Data connects to Combine Items, and Combine Items connects to Concise Summary.
Tip: MIME type matching is strict. If your uploads vary by source, consider updating the Route by File Type conditions to include additional MIME types.

Step 4: Set Up Summarization, Chunking, and Document Loading

Prepare extracted text for vector storage by summarizing, chunking, and enriching metadata.

  1. In Concise Summary, keep Fields To Summarize set to concatenate the data field.
  2. Configure Recursive Text Chunker with Chunk Size 2000 and Chunk Overlap 200.
  3. In Default Data Loader Plus, set JSON Data to {{ $json.data || $json.text || $json.concatenated_data }} and keep JSON Mode as expressionData.
  4. Verify metadata in Default Data Loader Plus, including {{ $('Assign File Identifiers').item.json.file_id }}, {{ $('Drive File Trigger').item.json.name }}, and {{ $('Drive File Trigger').item.json.mimeType }}.

Step 5: Configure Vector Storage in Supabase

Insert processed document embeddings and metadata into Supabase.

  1. Open Insert into Supabase Store and set Mode to insert.
  2. Set Table Name to documents.
  3. Confirm OpenAI Vector Embedding is connected as the embedding model for Insert into Supabase Store (credentials are applied to OpenAI Vector Embedding, not Insert into Supabase Store).
  4. Credential Required: Connect your supabaseApi credentials on Insert into Supabase Store.
  5. Credential Required: Connect your openAiApi credentials on OpenAI Vector Embedding.

Step 6: Configure Google Doc Creation and Cleanup

Create a Google Doc copy for Word documents and remove the original file after processing.

  1. In Generate Google Doc, set URL to https://www.googleapis.com/drive/v3/files/{{ $('Assign File Identifiers').item.json.file_id }}/copy.
  2. Set Method to POST and enable Send Body.
  3. In Body Parameters, set name to {{ $('Assign File Identifiers').item.json.name }} and mimeType to application/vnd.google-apps.document.
  4. Credential Required: Connect your googleDriveOAuth2Api credentials on Generate Google Doc.
  5. In Remove Drive File, set Operation to deleteFile and File ID to {{ $('Assign File Identifiers').item.json.file_id }}.
  6. Credential Required: Connect your googleDriveOAuth2Api credentials on Remove Drive File.
⚠️ Common Pitfall: This step deletes the original file. Test carefully before enabling deletion in production.

Step 7: Test and Activate Your Workflow

Validate the end-to-end flow before turning it on.

  1. Use Execute Workflow to run a manual test.
  2. Upload a PDF, Google Doc, and XLSX file into the watched Drive folder.
  3. Confirm that Insert into Supabase Store receives documents and embeddings, and that Concise Summary runs for Excel files.
  4. Verify that Word documents are converted by Generate Google Doc and the original file is removed by Remove Drive File.
  5. Toggle the workflow to Active for production use.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • Google Drive credentials can expire or need specific permissions. If things break, check the Google connection in n8n’s Credentials screen first, then confirm the watched folder is still accessible.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.

Frequently Asked Questions

How long does it take to set up this Drive Supabase docs automation?

About an hour if you already have Supabase and OpenAI keys ready.

Do I need coding skills to automate Drive Supabase docs?

No. You’ll connect Google Drive, Supabase, and OpenAI, then paste credentials into the right places.

Is n8n free to use for this Drive Supabase docs workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI API costs, which are usually small per document but depend on how much text you embed.

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I customize this Drive Supabase docs workflow for a different folder and chunk size?

Yes, and you should. Point the Google Drive Trigger to any folder you want, then adjust the Recursive Text Chunker settings to fit your documents (shorter chunks for dense policy docs, larger chunks for lightweight notes). Common tweaks include changing which metadata fields get saved, skipping certain file types in the Switch routing, and storing summaries alongside chunks if your chatbot needs quick previews.

Why is my Google Drive connection failing in this workflow?

Most of the time it’s expired authorization or the Drive account lost access to the watched folder. Reconnect Google Drive in n8n Credentials, then open the trigger node and re-select the folder to confirm it still exists. If failures happen only on Word files, double-check the conversion step (the HTTP Request that creates a Google Doc) has the right permissions and that Drive API access is allowed for that account. Rate limits can also show up when you bulk-upload lots of documents at once, so batching helps.

How many documents can this Drive Supabase docs automation handle?

A lot, but it depends on your execution limits and server size. On n8n Cloud, plan limits cap monthly executions, while self-hosting has no fixed cap (your VPS resources become the limiter). In practice, most teams comfortably ingest dozens of documents a day, especially since this workflow splits processing into batches and chunks text before embedding.

Is this Drive Supabase docs automation better than using Zapier or Make?

For this workflow, n8n is usually the better fit because the logic is more complex than a simple “file uploaded → send somewhere” zap. You’re routing by file type, converting Word docs into Google Docs, chunking text, then generating embeddings and inserting into a vector store. That’s doable elsewhere, but it gets awkward fast, and the cost can climb when every step counts as a billable task. If you only need a lightweight notification when a file is added, Zapier or Make can be fine. If you want reliable ingestion for a RAG system, n8n is the more flexible choice. Talk to an automation expert if you want help picking the right stack.

Once this is running, your Drive folder becomes the intake point and Supabase becomes the searchable brain. The workflow handles the repetitive ingestion work so your team can stop chasing the “latest version.”

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal