Day 5 - How to Build an AI Agent RAG System Using n8n and OpenAI Embeddings

If you want to learn:


How do you build an agentic RAG workflow in n8n that can handle thousands of documents?


What's the difference between a simple RAG system and an agentic RAG AI agent?


How do you connect Supabase vector store to n8n for intelligent data retrieval?


Why do you need embeddings when querying a vector database in a RAG system?


How can you create a production-ready RAG AI agent that scales from 60 to 600,000 products?


Then this lecture is for you!



In this hands-on lecture, you'll build a complete agentic RAG workflow in n8n using Supabase vector store. You'll learn how to configure the Supabase vector store as a tool for your AI agent, set up the "Retrieve Documents as Tool for AI Agent" operation, and write effective tool descriptions that guide your agent's behavior. The lecture demonstrates how to select the proper knowledge base table, configure result limits, and integrate OpenAI embeddings (text-embedding-3-small) to vectorize user queries for semantic search. You'll discover why embedding models are essential even after your data is already vectorized—because each user question must be converted to vectors for similarity matching. Through a live demonstration, you'll see the RAG system retrieve relevant product information, with the AI agent intelligently organizing and presenting results with prices and descriptions. This workflow in n8n showcases the true power of retrieval-augmented generation: the ability to scale from dozens to hundreds of thousands of documents without performance degradation. By the end, you'll understand how n8n's visual workflow builder makes creating production-ready agentic RAG workflows remarkably simple, setting the foundation for building more advanced AI-powered automation systems.