Google Drive to Supabase contextual vector database sync for RAG applications
Ready for 3.0What this workflow does
This AI workflow has 46 nodes and runs when a chat message arrives (plus 3 other triggers). Along the way it connects OpenAI Chat Model, Google Drive, Supabase and Supabase Vector Store and 1 more. It also calls api.openai.com over HTTP.
How it runs
Trigger: When a chat message arrives (plus 3 other triggers).
- AI Agent: runs an AI agent, with model: OpenAI Chat Model; 1 tool (Query Vector Store); memory: Simple Memory
- Embedding (HTTP Request): calls api.openai.com (POST)
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- Edge Function (HTTP Request): calls an HTTP API (POST)
- Google Drive: download
- Search Record Manager (Supabase): get many
- Extract from File: extracts data from a file (pdf)
- If: checks a condition and branches into true / false
- Set Text (Edit Fields (Set)): sets 1 field: text
…plus 23 more steps. See the full node list below.
Services it uses
HTTP calls to: api.openai.com
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.
Nodes used (27)
- AI Agent
@n8n/n8n-nodes-langchain.agent - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Google Drive
n8n-nodes-base.googleDrive - Supabase
n8n-nodes-base.supabase - Switch
n8n-nodes-base.switch - Crypto
n8n-nodes-base.crypto - Aggregate
n8n-nodes-base.aggregate - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Extract from File
n8n-nodes-base.extractFromFile - Edit Fields (Set)
n8n-nodes-base.set - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - If
n8n-nodes-base.if - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Call n8n Workflow Tool
@n8n/n8n-nodes-langchain.toolWorkflow - HTTP Request
n8n-nodes-base.httpRequest - Execute Sub-workflow
n8n-nodes-base.executeWorkflow - Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - Code
n8n-nodes-base.code - Split Out
n8n-nodes-base.splitOut - Wait
n8n-nodes-base.wait
From the author
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…