← Back to All Projects
n8nAI Agent
n8n RAG AI Workflow with Chat Interface
RAGVector DatabaseData Integrationn8nOpenAI API
The Problem
Organizations need to query internal documents (PDFs, Excel, CSV, text) through natural language without manual indexing or switching tools.
Approach
Built an n8n RAG workflow: chat message trigger → AI Agent with Postgres chat memory, list/get document tools, and SQL execution.
Google Drive triggers (file created/updated) run a pipeline: set file ID, delete old doc rows, insert metadata, download file, switch by type (PDF, Excel, CSV, text), extract content, aggregate/insert tabular data where needed, then recursive text splitter → OpenAI embeddings → Supabase vector store.
Database setup nodes create documents table, metadata table, and tabular rows table.
Results
Efficient knowledge retrieval and real-time document search over Drive content; seamless file uploads and DB updates; scalable RAG with Supabase vectors and OpenAI embeddings.
Key result: Real-time document search and AI-driven answers over ingested Drive files
Tools Used
n8nOpenAISupabaseGoogle DrivePostgreSQLEmbeddingsRAG
GitHub - Coming Soon