← All projects

RAG Knowledge Assistant

n8nAI agents

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.

Chat questionRetrieve relevant passagesAnswer in chat

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.

The n8n canvas shows chat retrieval above the Google Drive indexing branches.

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

  1. 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.
  2. The file-update branch removes an existing Supabase row before downloading and indexing the file again.
  3. 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

Let’s build
something
smarter.

Have a process that could work better?
Or a team I could contribute to? Let’s connect.

My résumé

A closer look at my background and skills.

Download résumé PDF
kylereynoso.work@gmail.com

Opens your email app with a draft. You review it before sending.

Connect on LinkedIn View my OnlineJobs.ph profile Based in the Philippines

Workflow detail

FitOpen original image

Zoom to read individual nodes. Scroll the image for more detail, or open the original for native browser zoom.