Build an advanced AI Study Assistant n8n workflow. This n8n template uses Google Gemini, Supabase vector search (RAG), and handles file indexing automatically from Google Drive links.
Download this n8n workflow template and start using it instantly.
This robust n8n workflow solves the problem of information overload by providing an interactive, intelligent study assistant. It combines the power of Google Gemini with a Retrieval-Augmented Generation (RAG) system, ensuring answers are grounded in specific user documents.
Unlike standard chatbots, this advanced n8n template manages a comprehensive RAG pipeline:
When chat message received n8n trigger initializes the process, making the AI interactive.Study Agent intelligently decides whether to use the Supabase Vector Store tool for semantic search or the Calculator tool for math problems, maintaining context via Postgres Chat Memory.This complete n8n solution ensures your study materials are always searchable, providing accurate and contextually relevant responses.
This powerful automation operates in two distinct, interconnected n8n workflows: the Main Chat Agent and the Indexing Sub-Workflow.
When chat message received n8n trigger waits for new messages or inputs.Study Agent receives the message. It is configured with a system message instructing it on behavior, including handling Drive links, general conversation, and searching the vector store.Google Gemini Chat Model (Gemini 2.5 Pro) for reasoning and maintains long-term memory via the Postgres Chat Memory n8n node, ensuring conversation context persists.Supabase Vector Store: Used for RAG retrieval against indexed study documents.Calculator: Used for mathematical queries.Folder all file to vector: If the input contains a Google Drive URL, this toolWorkflow n8n node executes the secondary indexing workflow.Folder all file to vector n8n node in the main agent flow.Code in JavaScript n8n node extracts the necessary Google Drive folder or file ID from the input URL.Execute a SQL query n8n node (Postgres) initializes the database by creating or recreating the documents table, setting up the pgvector extension, and defining the match_documents search function.Search files and folders (Google Drive n8n node) retrieves all files within the specified folder.Loop Over Items.Default Data Loader n8n node.Embeddings Google Gemini4 n8n node generates 768-dimensional vector embeddings, which are then stored alongside the document content in the Supabase documents table using the Insert into Supabase Vectorstore n8n node, completing the RAG setup.To deploy this comprehensive n8n workflow and its associated components, follow these steps:
pgvector extension is enabled in your database.Folder all file to vector n8n node in the main agent flow to reference the specific ID of the indexing workflow.When chat message received) to make the agent endpoint live.This n8n template utilizes a complex network of LangChain and core n8n nodes:
When chat message received (n8n trigger): The starting point of the main n8n workflow. It exposes a public webhook URL to receive chat inputs.
Study Agent (LangChain Agent n8n node): The core intelligence. It orchestrates the flow, routes requests to the correct tools (Supabase Vector Store, Calculator, Folder all file to vector), and handles conversational context.
Google Gemini Chat Model (LangChain LM n8n node): Provides the reasoning capabilities using the models/gemini-2.5-pro model.
Postgres Chat Memory (LangChain Memory n8n node): Stores and retrieves previous messages using a Postgres database, allowing the AI to maintain long conversations based on sessionId.
Supabase Vector Store (LangChain Tool n8n node): Configured for retrieval, this node searches the documents table in Supabase, using vector similarity to find relevant study material.
Embeddings Google Gemini (LangChain Embeddings n8n node): Used by the Supabase Vector Store tool to generate 768-dimensional embeddings for search queries and for document insertion.
Folder all file to vector (LangChain ToolWorkflow n8n node): This crucial custom tool executes a secondary n8n workflow to handle the complex process of indexing Google Drive content.
Code in JavaScript (n8n node): In the indexing workflow, this node uses custom JavaScript to reliably parse Google Drive URLs and extract the necessary file or folder ID.
Execute a SQL query (Postgres n8n node): Initializes the RAG database schema, dropping and recreating the documents table to ensure clean indexing.
Search files and folders (Google Drive n8n node): Retrieves metadata for all relevant documents in the specified Drive location based on the ID extracted by the previous n8n node.
Build a personal AI speech coach using this powerful n8n workflow. It transcribes voice notes, provides detailed feedback via Gemini, and generates polished speech drafts using a sophisticated n8n template.

Use this powerful n8n workflow to automatically generate creative, optimized social media captions using GPT-4o and dynamic Airtable data, ideal for content teams using n8n templates.

Use this advanced n8n workflow to deploy an AI sales assistant (Hassan) that qualifies leads, logs conversations in Google Sheets, checks Google Calendar availability, and automatically books meetings using GPT-4 and Claude models.

Use this powerful n8n workflow template to generate optimized, highly effective AI system prompts using OpenAI, complete with model recommendations. Streamline your AI agent development with this n8n automation.

Use this comprehensive n8n workflow to automate candidate screening. It parses CVs, uses OpenAI models for job fit evaluation, updates Google Sheets, and sends automated email notifications based on approval checks. Find more n8n templates for HR.

Deploy an expert n8n workflow to create a smart Telegram bot. Features article summarization via OpenAI and handles image generation prompts, providing reactive AI services. Excellent n8n templates for conversational AI.

Al Automation Expert || Al Agents || n8n || Python || LangChain || Helping businesses scale revenue and reduce costs with Al driven automation .







































