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
-
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).
-
Configure Supabase • Please refer to the Setting Up Supabase Sticky Note.
-
Connect OpenAI (or your embedding model) • Add your OpenAI API key in n8n credentials.
Related Templates
Convert JSON Objects to Base64 Strings with File Processing
Encode JSON to Base64 String in n8n This example workflow demonstrates how to convert a JSON object into a base64-encod...
AI Agent with Ollama for current weather and wiki
This workflow template demonstrates how to create an AI-powered agent that provides users with current weather informati...
Automate Daily YouTrack Task Summaries to Discord by Assignee
Daily YouTrack In-Progress Tasks Summary to Discord by Assignee Keep your team in sync with a daily summary of tasks cu...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments