π¬ Create RAG vector database from Google Drive documents using Gemini & Supabase
β‘ 712 views Β· π¬ Document Extraction & Analysis
Description
How it works
This workflow automates the process of converting Google Drive documents into searchable vector embeddings for AI-powered applications:
β’ Takes a Google Drive folder URL as input β’ Initializes a Supabase vector database with pgvector extension β’ Fetches all files from the specified Drive folder β’ Downloads and converts each file to plain text β’ Generates 768-dimensional embeddings using Google Gemini β’ Stores documents with embeddings in Supabase for semantic search
Built for the Study Agent workflow to power document-based Q&A, but also works perfectly for any RAG system, AI chatbot, knowledge base, or semantic search application that needs to query document collections.
Set up steps
Prerequisites: β’ Google Drive OAuth2 credentials β’ Supabase account with Postgres connection details β’ Google Gemini API key (free tier available)
Setup time: ~10 minutes
Steps:
- Add your Google Drive OAuth2 credentials to the Google Drive nodes
- Configure Supabase Postgres credentials in the SQL node
- Add Supabase API credentials to the Vector Store node
- Add Google Gemini API key to the Embeddings node
- Update the input with your Drive folder URL
- Execute the workflow
Note: The SQL query will drop any existing βdocumentsβ table, so backup data if needed. Detailed node-by-node instructions are in the sticky notes within the workflow.
Works with: Study Agent (main use case), custom AI agents, chatbots, documentation search, customer support bots, or any RAG application.
π Nodes Used
Postgres, Google Drive, Execute Workflow Trigger, Supabase Vector Store, Default Data Loader, Embeddings Google Gemini
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File