Supabase AI Agent with RAG & Multi-Tenant CRUD Version: 1.0.0 n8n Version: 1.88.0+ Author: Koresolucoes License: MIT Description A stateful AI agent workflow powered by Supabase and Retrieval-Augmented Generation (RAG). Enables persistent memory, dynamic CRUD operations, and multi-tenant data isolation for AI-driven applications like customer support, task orchestration, and knowledge management. Key Features: 🧠 RAG Integration: Leverages OpenAI embeddings and Supabase vector search for context-aware responses. 🗃️ Full CRUD: Manage agent_messages, agent_tasks, agent_status, and agent_knowledge in real time. 📤 Multi-Tenant Ready: Supports per-user/organization data isolation via dynamic table names and webhooks. 🔒 Secure: Role-based access control via Supabase Row Level Security (RLS). Use Cases Customer Support Chatbots: Persist conversation history and resolve queries using institutional knowledge. Automated Task Management: Track and update task statuses dynamically. Knowledge Repositories: Store and retrieve domain-specific information for AI agents. Instructions 1. Import Template Go to n8n > Templates > Import from File and upload this workflow. 2.
Tags
Related workflows
See all AI Automation→Ask questions about a PDF using AI
The workflow first populates a Pinecone index with vectors from a Bitcoin whitepaper. Then, it waits for a manual chat message. When received, the chat message is turned into a vector and compared to the vectors in Pinecone. The most similar vectors are retrieved and passed to OpenAI for generating a chat response. Note that to use this template, you need to be on n8n version 1.19.4 or later.
Answer Slack knowledge base questions with Notion, Pinecone, and OpenAI
Quick overview This workflow syncs an internal Notion knowledge base to Pinecone on a daily schedule, then runs a Slack bot that answers questions in a specific channel using Pinecone retrieval and an OpenAI chat model, replying in a thread with citations back to the source Notion pages. How it works Runs on a daily schedule to sync your Notion knowledge base into a Pinecone vector index. Fetches all pages from a specified Notion database and then pulls each page’s full block content (including nested blocks). Combines each page’s blocks into a single document and attaches metadata such as the Notion title, URL, and last edited time. Splits each document into overlapping text chunks, generates OpenAI embeddings, and inserts them into Pinecone while clearing and rebuilding the target namespace. Triggers when a new message is posted in the configured Slack channel and ignores bot/system messages to prevent reply loops. Uses an OpenAI-powered agent that always queries Pinecone for relevant chunks (including source metadata) and generates an answer in the user’s language. Posts the response back to Slack as a threaded reply, including cited Notion sources. Setup Create a Notion interna
Screen resumes and route hiring decisions with Airtable, DeepSeek, and gotoHuman
Quick overview This workflow collects job applications via Gmail, deduplicates candidates in Airtable, extracts resume text with LlamaParse, scores candidates against an Airtable role rubric using a DeepSeek chat model, and routes results to gotoHuman for approve/reject decisions that update the candidate’s stage. How it works Receives a job application submission from Gmail, including the applicant’s name, email, role, and resume file. Searches Airtable Candidates by email to detect duplicates and either creates a new candidate record or updates the existing record. Extracts text from the uploaded resume with LlamaParse and runs a basic quality check to detect likely mis-parsed or incomplete text. If parsing looks poor, updates the candidate in Airtable to “Needs Manual Review” with a “poor” parse quality flag. If parsing looks good, fetches the role-specific scoring rubric from the Airtable Roles table, sanitizes the resume text, and sends both to a DeepSeek chat model (via LangChain) to produce a structured JSON scorecard. Validates and normalizes the AI’s JSON output, saves the score, reasoning, confidence, red flags, and recommendation back to Airtable, and submits the scoreca