{"id":1552,"date":"2026-06-19T02:06:19","date_gmt":"2026-06-19T00:06:19","guid":{"rendered":"https:\/\/pletzenauer.com\/2026\/06\/19\/rag-agent-n8n-supabase\/"},"modified":"2026-06-19T02:11:41","modified_gmt":"2026-06-19T00:11:41","slug":"rag-agent-without-code-n8n-supabase","status":"publish","type":"post","link":"https:\/\/pletzenauer.com\/en\/2026\/06\/19\/rag-agent-without-code-n8n-supabase\/","title":{"rendered":"RAG Agent Without Code: Combining n8n and Supabase for Production"},"content":{"rendered":"<p>Most RAG tutorials online show the same toy example over and over: &#8220;Chat with your PDF.&#8221; What rarely gets mentioned is that these demos are a long way from any production use. As soon as the knowledge base grows, documents get updated, or users ask questions nobody tested for, the problems start. This is exactly where the approach described here comes in.<\/p>\n<p>In his video, Cole Medin shows how to build a RAG AI agent that is closer to real-world practice than many other guides, using two tools: <strong>n8n<\/strong> (workflow automation, comparable to Make.com or Zapier) and <strong>Supabase<\/strong> (a database platform with vector support via PG Vector). The promise: no code, manageable effort, and a setup that grows along with your knowledge base. For decision-makers in mid-sized companies, this is interesting above all because it lets you make internal documents, minutes, or manuals searchable without employing a development team.<\/p>\n<div style=\"background:#FFE6D6;border-left:4px solid #F26A21;padding:16px 20px;border-radius:6px;margin:24px 0;\">\n<strong>Key takeaways<\/strong><\/p>\n<ul>\n<li>RAG (Retrieval Augmented Generation) connects a language model with your own knowledge base, so the agent draws on your documents instead of only its training knowledge.<\/li>\n<li>n8n handles the automation; Supabase serves both as chat memory and as the vector database.<\/li>\n<li>The entire setup works without any programming and, according to the video, is up and running in under 15 minutes.<\/li>\n<li>Two details set this approach apart from superficial tutorials: scalable storage for the chat history, and deleting outdated vectors to avoid duplicates.<\/li>\n<li>The free tier of Supabase is, according to the video, perfectly sufficient to get started.<\/li>\n<\/ul>\n<\/div>\n<figure style=\"margin:28px 0;\"><img decoding=\"async\" src=\"https:\/\/pletzenauer.com\/wp-content\/uploads\/2026\/06\/1486-1.png\" alt=\"Two-column comparison: on the left, typical RAG tutorials with a demo focus and local storage; on the right, the production-ready approach with Supabase memory and deletion of outdated vectors.\" style=\"width:100%;height:auto;border-radius:8px;border:1px solid #E5E2DE;\"\/><figcaption style=\"font-size:0.9em;color:#6b6b6b;margin-top:8px;\">Two often-overlooked details decide whether a RAG agent stays useful as the knowledge base grows.<\/figcaption><\/figure>\n<h2>What the agent does in practice<\/h2>\n<p>The video demonstrates how it works with a simple example. At the start, the knowledge base is empty and the corresponding table in Supabase contains no entries. As you would expect, the agent cannot answer a test question about the action items from a meeting.<\/p>\n<p>Next, a document with meeting notes is placed as a Google Doc in a monitored folder. Within about a minute, an n8n workflow runs in the background, processing the file and adding it to the knowledge base. After that, a new record appears in Supabase containing the page content, the metadata (including the Google Drive file ID), and what is known as the embedding vector. Ask the same question again, and the agent now returns the correct answer from the document. Updates to the file are also detected and pulled in.<\/p>\n<h2>The setup at a glance<\/h2>\n<p>The workflow consists of two parts: the chat agent itself, and a separate track that automatically feeds documents into the knowledge base. According to the video, a ready-made JSON template can be downloaded from a GitHub repository and loaded into your own n8n instance via &#8220;Import from file.&#8221; After that, you only need to add your own credentials and the folder you want to use.<\/p>\n<h3>Preparing Supabase<\/h3>\n<p>Supabase is set up with a GitHub account. Two areas of the project settings provide the credentials you need:<\/p>\n<ul>\n<li><strong>Database:<\/strong> host, database name, port, user, and password for the Postgres connection. These details are used for the chat memory.<\/li>\n<li><strong>API:<\/strong> the project-specific URL and the service role secret. These details are needed for the vector database.<\/li>\n<\/ul>\n<p>For the vector search, n8n provides ready-made SQL code in its documentation. You run this once in the Supabase SQL editor, and it automatically creates the PG Vector extension, the documents table, and the matching function for RAG. No custom code is required for this.<\/p>\n<h3>The chat agent<\/h3>\n<p>The agent is started by a &#8220;When a chat message is received&#8221; trigger. This also provides a chat window directly in n8n, letting you test the agent without any deployment. If needed, the same interface can be embedded on a website using ready-made embed code. Three building blocks are attached to the agent:<\/p>\n<ul>\n<li><strong>Chat model:<\/strong> in the example, GPT-4o mini, connected via the OpenAI API key. Anthropic is also an option.<\/li>\n<li><strong>Chat memory:<\/strong> here, Postgres via Supabase is deliberately used instead of the commonly recommended local window memory. Local storage puts load on the n8n server and scales poorly. n8n creates the required table itself when needed.<\/li>\n<li><strong>RAG tool:<\/strong> the &#8220;retrieve documents&#8221; tool with Supabase as the vector store, configured via table name and query function.<\/li>\n<\/ul>\n<h3>Feeding documents automatically<\/h3>\n<p>The second part of the workflow keeps the knowledge base up to date. A Google Drive trigger regularly checks a specified folder for new or changed files. The rest of the process:<\/p>\n<ul>\n<li>The file ID is extracted and passed to the following steps.<\/li>\n<li>Existing vectors with the same file ID are deleted in Supabase (more on this below).<\/li>\n<li>The file is downloaded; documents are converted to text and Google Sheets to CSV in order to extract the plain text content.<\/li>\n<li>The text is inserted into the vector database. For small files, splitting into sections is skipped; otherwise a simple recursive text splitter is used.<\/li>\n<\/ul>\n<h2>Two details that decide whether it works in practice<\/h2>\n<p>The video highlights two points that are missing from many tutorials and that cause problems precisely when things get serious.<\/p>\n<h3>Scalable chat memory<\/h3>\n<p>A conversation&#8217;s history is often stored locally on the n8n instance because that is the easiest option. That is exactly what overloads the server as usage grows. Moving it out into a Postgres database on Supabase is the step that makes the agent genuinely robust.<\/p>\n<h3>Deleting outdated vectors<\/h3>\n<p>The more important point concerns updates. The vector options in n8n do not work as an &#8220;upsert&#8221;: an existing vector is not replaced when re-inserted, but duplicated, because the file ID is not used as the vector ID. If you update the same file multiple times, duplicates pile up and answer quality suffers. The solution in the workflow: before each insert, all vectors whose metadata carries the file ID of the current Google Drive document are deleted. Only then is the new, updated version inserted. That way, exactly one current record remains per document.<\/p>\n<h2>What this means for decision-makers<\/h2>\n<p>The setup shown is explicitly meant as a solid starting point, not a finished end solution. Extensions such as better semantic search or an additional keyword search are possible, but are deliberately left open. Even so, the approach is viable for a first production-grade knowledge base.<\/p>\n<p>The cost side is notable: according to the video, the free Supabase tier is enough to get started, and switching to the paid plan only pays off once you scale. If you already work with n8n, you can set up the agent with your own documents in a short amount of time, without commissioning external development.<\/p>\n<h2>Conclusion<\/h2>\n<p>The video shows in a sober, easy-to-follow way how to implement a RAG AI agent with n8n and Supabase without any programming. The real value lies not in the quick demo effect, but in two often-overlooked details: scalable chat memory, and consistently removing outdated vectors. These are exactly the points that decide whether an agent stays useful as the knowledge base grows or becomes unreliable over time. If you want to make internal documents searchable, you get a pragmatic blueprint here that you can extend step by step.<\/p>\n<p><strong>Source:<\/strong> Cole Medin, &#8220;This RAG AI Agent with n8n + Supabase is the Real Deal&#8221;, <a href=\"https:\/\/www.youtube.com\/watch?v=PEI_ePNNfJQ\">https:\/\/www.youtube.com\/watch?v=PEI_ePNNfJQ<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So bauen Sie mit n8n und Supabase einen produktionsreifen RAG-KI-Agenten ohne Code: Wissensdatenbank, Vektorsuche und automatische Dokument-Updates erklaert.<\/p>\n","protected":false},"author":1,"featured_media":1506,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[80,17],"tags":[88,102,91,103,104,105,106,107],"class_list":["post-1552","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-80","category-automatisierung","tag-automatisierung","tag-ki-agent","tag-n8n","tag-no-code","tag-rag","tag-supabase","tag-vektordatenbank","tag-wissensdatenbank"],"_links":{"self":[{"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/posts\/1552","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/comments?post=1552"}],"version-history":[{"count":2,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/posts\/1552\/revisions"}],"predecessor-version":[{"id":1573,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/posts\/1552\/revisions\/1573"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/media\/1506"}],"wp:attachment":[{"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/media?parent=1552"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/categories?post=1552"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pletzenauer.com\/en\/wp-json\/wp\/v2\/tags?post=1552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}