RAG Knowledge Assistant
Ask questions in n8n chat and get answers based on documents indexed from Google Drive.
- Platform
- n8n
- Focus
- AI agents
- Evidence available
- Original screenshot
Project overview
This retrieval-augmented generation (RAG) project uses a Gemini-powered n8n agent to retrieve relevant passages from a document collection indexed in Supabase before answering in chat.
Business problem
When information is spread across documents, finding a specific answer can mean opening and searching several files.
Automation solution
Index Google Drive documents with Gemini embeddings in Supabase, then let a chat agent retrieve relevant passages before composing an answer.
Simplified process summary. Explore the architecture below for branches and decision logic.
Workflow evidence
Original image, preserved in full. Enlarge and zoom to read individual nodes.
Workflow architecture
Trigger & input
An incoming chat message starts the question-answering path. Separate Google Drive branches handle document ingestion and index updates.
Processing & output
- The file-creation branch downloads a Google Drive file and passes it to the Supabase Vector Store through the Default Data Loader and Gemini embeddings.
- The file-update branch removes an existing Supabase row before downloading and indexing the file again.
- The chat trigger calls an AI Agent connected to the Gemini Chat Model and a Supabase retrieval tool that uses Gemini embeddings.
Conditional logic
Chat requests query the index separately from document ingestion. The canvas also shows a branch labeled File Deleted that waits before deleting a Supabase row. Its displayed event is fileCreated, so automatic cleanup on Drive deletion remains unverified.
Key features
- Chat interface for questions about indexed documents
- Document indexing from Google Drive
- Vector search in Supabase with Gemini embeddings
Technical challenges
The search index needs to reflect edits to source documents. The visible update path removes a row before reindexing, and the screenshots leave the row-matching rules and failure recovery open.
Business value
Gives users one place to ask questions across a collection of reference documents, such as guides, policies or FAQs.
Project status
Testing & limitations
Test execution shown
The private sample shows two questions answered in chat and a successful n8n execution with Supabase retrieval and Gemini embeddings in the log. Answer accuracy across other questions and the Drive sync branches remain unverified.
Kyle Reynoso supplied the n8n workflow canvas and a private sample chat execution.
Limitations & next steps
What needs verification: resolve these open questions before treating this design as a verified implementation.
- Chunking settings and retrieval thresholds
- Row matching, deletion trigger behavior and recovery when reindexing fails
- Answer accuracy across a broader test set