AI Study Assistant with RAG - Google Gemini with Drive & Supabase Vector Search
How it works
A complete AI-powered study assistant system that lets you chat naturally with your documents stored in Google Drive:
The system has two connected workflows:
-
Document Indexing Pipeline (Sub-workflow): • Accepts Google Drive folder URLs • Automatically fetches all files from the folder • Converts documents to plain text • Generates 768-dimensional embeddings using Google Gemini • Stores everything in Supabase vector database for semantic search
-
Study Chat Agent (Main workflow): • Provides a conversational chat interface • Automatically detects and processes Google Drive links shared in chat • Searches your indexed documents using semantic similarity • Maintains conversation history across sessions • Includes calculator for math problems • Responds naturally using Google Gemini 2.5 Pro
Use Cases: Students studying for exams, researchers managing papers, professionals building knowledge bases, anyone needing to query large document collections conversationally.
Set up steps
Prerequisites: • Google Drive OAuth2 credentials • Google Gemini API key (free tier available) • Supabase account with Postgres connection • ~15 minutes setup time
Complete Setup:
Part 1: Document Indexing Workflow Add Google Drive OAuth2 credentials to the 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
Part 2: Study Agent Workflow Import the Study Agent workflow Verify the "Folder all file to vector" tool links to the indexing workflow Add Google Gemini API credentials to both Gemini nodes Configure Supabase API credentials in the Vector Store node Add Postgres credentials for Chat Memory Deploy and access the chat via webhook URL
How to Use: Open the chat interface (webhook URL) Paste a Google Drive folder link in the chat Wait for indexing to complete (~1-2 minutes) Start asking questions about your documents The AI will search and answer from your materials
Note: The indexing workflow runs automatically when you share Drive links in chat, or you can run it manually to pre-load documents.
System Components: Main Agent:** Gemini 2.5 Pro with conversational AI Vector Search:** Supabase with pgvector (768-dim embeddings) Memory:** Postgres chat history (10-message context window) Tools:** Document retrieval, Drive indexing, calculator Embedding Model:** Google Gemini text-embedding-004
Related Templates
USDT And TRC20 Wallet Tracker API Workflow for n8n
Overview This n8n workflow is specifically designed to monitor USDT TRC20 transactions within a specified wallet. It u...
Automate Daily Keyword Research with Google Sheets, Suggest API & Custom Search
Who's it for This workflow is perfect for SEO specialists, marketers, bloggers, and content creators who want to automa...
Bulk Automated Google Drive Files Sharing and Direct Download Link Generation
This N8N workflow automates the process of sharing files from Google Drive. It includes OAuth2 authentication, batch pro...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments