# n8n supabase rag agent

> Configure and troubleshoot n8n RAG workflows with Supabase pgvector, Google Gemini, and OpenRouter.

n8n supabase rag agent is a free AI agent skill on Agensi by Nada Ahmed, in Workflow Automation. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Nada Ahmed](https://www.agensi.io/creators/nada-ahmed)
- Category: [Workflow Automation](https://www.agensi.io/skills/workflow-automation)
- Version: 1.0
- Last updated: 2026-11-24
- Security: scan passed (2026-11-24); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/n8n-supabase-rag-agent
- Tags: automation, n8n, supabase, rag, google-gemini, postgresql

## About this skill

Building a reliable RAG system often fails at the seams: mismatched embedding dimensions, broken ingestion pipelines, or hallucinations when retrieval returns empty results. This skill provides the direct technical guidance needed to configure and maintain a production-ready n8n RAG agent using Supabase and Google Gemini.

### What it does
- **Workflow configuration** provides step-by-step setup for n8n ingestion and chat retrieval exports.
- **Database synchronization** ensures Supabase `documents` tables and `match_documents` functions match embedding dimensions.
- **Ingestion management** handles Google Drive triggers, text chunking, and metadata-aware vector inserts.
- **Response grounding** optimizes AI Agent system instructions to cite sources and prevent hallucinations.
- **Troubleshooting** diagnoses common failures in embedding generation, vector retrieval, and chat memory.

### How it works
1. **Environment audit** identifies your n8n version and verifies credentials for Supabase, Gemini, and OpenRouter.
2. **Ingestion setup** configures the pipeline from Google Drive through the Recursive Character Text Splitter to Supabase.
3. **Retrieval tuning** connects the AI Agent to the vector store tool and configures Postgres Chat Memory context.
4. **Validation** runs a multi-step test from single-document ingestion to out-of-scope query handling.

### Frameworks & tools
This skill is built for n8n workflows utilizing Supabase (pgvector), Google Gemini (embeddings), OpenRouter (LLMs), Google Drive, and PostgreSQL.

### Why this beats prompting it yourself
Generic prompts often ignore the specific architectural requirements of n8n node inputs or pgvector function signatures. This skill uses the provided project exports as a source of truth to ensure metadata filters and embedding dimensions are technically aligned.

### Use cases
- Deploy a document Q&A bot that pulls live data from a Google Drive folder.
- Fix embedding-dimension errors when switching between different Gemini models.
- Set up automated document updates that clear old vector rows before re-indexing.
- Implement metadata filtering to isolate chat retrieval to specific files or projects.

### Known limitations
Does not support file types incompatible with the n8n Extract from File node. Requires manual credential setup within the n8n UI as it cannot handle sensitive API keys.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the n8n supabase rag agent skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What specific problems does the n8n Supabase RAG Agent skill solve?

This skill provides specialized technical guidance and pre-configured workflow logic to bridge n8n, Supabase pgvector, and Google Gemini, solving common issues like embedding dimension mismatches and broken document ingestion pipelines.

### Which AI models and database frameworks are compatible with this skill?

It is designed for n8n environments using Supabase (pgvector), Google Gemini for embeddings, and OpenRouter for LLM orchestration, specifically supporting Google Drive as a primary data source.

### What is included in the purchase of this skill?

You will receive a comprehensive implementation guide, n8n workflow export templates for ingestion and retrieval, and the specific SQL schema requirements for your Supabase vector store.

### Does the skill automatically handle the setup of my API credentials?

No, due to security best practices, you must manually input your own API keys for Gemini, OpenRouter, and Supabase within your n8n credentials manager after importing the workflows.

### How does this skill handle errors during the vector retrieval process?

The skill includes specific troubleshooting steps for the Supabase 'match_documents' function to ensure your vector retrieval remains accurate even if you change embedding models or dimensions.

### Can I use this skill to filter searches by specific document categories?

Yes, the skill provides a framework for metadata-aware indexing, allowing you to filter chat responses based on specific folders, projects, or file types stored in your database.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
