Skip to main content

Google Drive to Supabase contextual vector database sync for RAG applications

Workflow preview

Workflow preview
100%
Google Drive to Supabase contextual vector database sync for RAG applications preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Workflow Summary This automation keeps your Supabase vector database synchronized with documents stored in Google Drive, while also making the data contextual and vector based for better retrieval....

Best for

  • Engineering automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.googledrive, n8n-nodes-base.supabase, n8n-nodes-base.switch, n8n-nodes-base.crypto

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Michael Taleb.

Original n8n.io source

1.1 Workflow description

Title
Google Drive to Supabase contextual vector database sync for RAG applications
Workflow name
Google Drive to Supabase contextual vector database sync for RAG applications

Workflow Summary

This automation keeps your Supabase vector database synchronized with documents stored in Google Drive, while also making the data contextual and vector based for better retrieval.

When a file is added or modified, the workflow extracts its text, splits it into smaller chunks, and enriches each chunk with contextual metadata (such as summaries and document details). It then generates embeddings using OpenAI and stores both the vector data and metadata in Supabase. If a file changes, the old records are replaced with updated, contextualized content.

The result is a continuously updated and context-aware vector database, enabling highly accurate hybrid search and retrieval.

To setup

1. Connect Google Drive

• Create a Google Drive folder to watch. • Connect your Google Drive account in n8n and authorize access. • Point the Google Drive Trigger node to this folder (new/modified files trigger the flow).

2. Configure Supabase

• Please refer to the Setting Up Supabase Sticky Note.

3. Connect OpenAI (or your embedding model)

• Add your OpenAI API key in n8n credentials.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2

Block 2 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.1

Block 3 - Simple Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 4 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 5 - Google Drive

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 6 - Search Record Manager

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 7 - Create Row in Record Manager

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 8 - Switch

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 9 - Delete Previous Vectors

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 10 - Generate Hash

Type / Role
n8n-nodes-base.crypto - crypto
Config choices
Version 1

Block 11 - Update Record Manager

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 12 - Aggregate

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 13 - Basic LLM Chain

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.7

Block 14 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 15 - OpenAI Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 16 - Extract from File

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1

Block 17 - Set Text

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 18 - Loop Over Items1

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 19 - Search Record Manager1

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 20 - If1

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 21 - Delete Previous Vectors1

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 22 - Aggregate1

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 23 - Delete Record from Record Manager1

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 24 - Google Drive2

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Showing the first 24 of 76 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Google Drive to Supabase contextual vector database sync for RAG applications
Complexity advanced
Nodes 76
Categories Engineering, AI RAG
Author Michael Taleb
Published 03 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8200/8200.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Google Drive to Supabase contextual vector database sync for RAG applications do?

Workflow Summary This automation keeps your Supabase vector database synchronized with documents stored in Google Drive, while also making the data contextual and vector based for better retrieval....

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Engineering, AI RAG use case.