Back to Integrations
integrationSupabase node
integrationPostgres node

Supabase and Postgres integration

Save yourself the work of writing custom integrations for Supabase and Postgres and use n8n instead. Build adaptable and scalable Data & Storage, and Development workflows that work with your technology stack. All within a building experience you will love.

How to connect Supabase and Postgres

  • Step 1: Create a new workflow
  • Step 2: Add and configure nodes
  • Step 3: Connect
  • Step 4: Customize and extend your integration
  • Step 5: Test and activate your workflow

Step 1: Create a new workflow and add the first step

In n8n, click the "Add workflow" button in the Workflows tab to create a new workflow. Add the starting point – a trigger on when your workflow should run: an app event, a schedule, a webhook call, another workflow, an AI chat, or a manual trigger. Sometimes, the HTTP Request node might already serve as your starting point.

Supabase and Postgres integration: Create a new workflow and add the first step

Step 2: Add and configure Supabase and Postgres nodes

You can find Supabase and Postgres in the nodes panel. Drag them onto your workflow canvas, selecting their actions. Click each node, choose a credential, and authenticate to grant n8n access. Configure Supabase and Postgres nodes one by one: input data on the left, parameters in the middle, and output data on the right.

Supabase and Postgres integration: Add and configure Supabase and Postgres nodes

Step 3: Connect Supabase and Postgres

A connection establishes a link between Supabase and Postgres (or vice versa) to route data through the workflow. Data flows from the output of one node to the input of another. You can have single or multiple connections for each node.

Supabase and Postgres integration: Connect Supabase and Postgres

Step 4: Customize and extend your Supabase and Postgres integration

Use n8n's core nodes such as If, Split Out, Merge, and others to transform and manipulate data. Write custom JavaScript or Python in the Code node and run it as a step in your workflow. Connect Supabase and Postgres with any of n8n’s 1000+ integrations, and incorporate advanced AI logic into your workflows.

Supabase and Postgres integration: Customize and extend your Supabase and Postgres integration

Step 5: Test and activate your Supabase and Postgres workflow

Save and run the workflow to see if everything works as expected. Based on your configuration, data should flow from Supabase to Postgres or vice versa. Easily debug your workflow: you can check past executions to isolate and fix the mistake. Once you've tested everything, make sure to save your workflow and activate it.

Supabase and Postgres integration: Test and activate your Supabase and Postgres workflow

AI agent for realtime insights on meetings

Video Guide

I prepared a detailed guide explaining how to build an AI-powered meeting assistant that provides real-time transcription and insights during virtual meetings.

Youtube Link

Who is this for?
This workflow is ideal for business professionals, project managers, and team leaders who require effective transcription of meetings for improved documentation and note-taking. It's particularly beneficial for those who conduct frequent virtual meetings across various platforms like Zoom and Google Meet.

What problem does this workflow solve?
Transcribing meetings manually can be tedious and prone to error. This workflow automates the transcription process in real-time, ensuring that key discussions and decisions are accurately captured and easily accessible for later review, thus enhancing productivity and clarity in communications.

What this workflow does
The workflow employs an AI-powered assistant to join virtual meetings and capture discussions through real-time transcription. Key functionalities include:
Automatic joining of meetings on platforms like Zoom, Google Meet, and others with the ability to provide real-time transcription.
Integration with transcription APIs (e.g., AssemblyAI) to deliver seamless and accurate capture of dialogue.
Structuring and storing transcriptions efficiently in a database for easy retrieval and analysis.

Real-Time Transcription: The assistant captures audio during meetings and transcribes it in real-time, allowing participants to focus on discussions.
Keyword Recognition: Key phrases can trigger specific actions, such as noting important points or making prompts to the assistant.
Structured Data Management: The assistant maintains a database of transcriptions linked to meeting details for organized storage and quick access later.

Setup

Preparation

Create Recall.ai API key
Setup Supabase account and table
create table
public.data (
id uuid not null default gen_random_uuid (),
date_created timestamp with time zone not null default (now() at time zone 'utc'::text),
input jsonb null,
output jsonb null,
constraint data_pkey primary key (id),
) tablespace pg_default;

Create OpenAI API key

Development

Bot Creation:
Use a node to create the bot that will join meetings. Provide the meeting URL and set transcription options within the API request.

Authentication:
Configure authentication settings via a Bearer token for interacting with your transcription service.

Webhook Setup:
Create a webhook to receive real-time transcription updates, ensuring timely data capture during meetings.

Join Meeting:
Set the bot to join the specified meeting and actively listen to capture conversations.

Transcription Handling:
Combine transcription fragments into cohesive sentences and manage dialog arrays for coherence.

Trigger Actions on Keywords:
Set up keyword recognition that can initiate requests to the OpenAI API for additional interactions based on captured dialogue.

Output and Summary Generation:
Produce insights and summary notes from the transcriptions that can be stored back into the database for future reference.

Nodes used in this workflow

Popular Supabase and Postgres workflows

+4

AI-Powered Lead Generation with Apollo, GPT-4, and Telegram to Database

AI-Powered Lead Generation with Apollo, GPT-4, and Telegram to Database Overview This intelligent lead generation workflow transforms voice commands or text input into verified prospect lists through automated Apollo.io scraping. The system processes natural language requests, extracts search parameters using AI, and delivers clean, verified contact data directly to your database. Key Features 🎤 Voice & Text Input Processing Voice Recognition**: Converts audio messages to text using OpenAI's transcription API Natural Language Processing**: AI agent interprets requests and extracts search criteria Flexible Input**: Supports both voice commands and text messages 🔍 Smart Lead Scraping Apollo.io Integration**: Automated scraping using official Apollo.io API Dynamic URL Generation**: Builds search URLs based on extracted parameters Intelligent Parsing**: Processes location, industry, and job title criteria ✅ Email Verification & Filtering Verified Emails Only**: Filters results to include only verified email addresses Duplicate Prevention**: Compares against existing database to avoid duplicates Data Quality Control**: Ensures high-quality prospect data 📊 Automated Data Management Database Integration**: Automatic storage in PostgreSQL/Supabase Structured Data**: Organizes contacts with complete profile information Real-time Updates**: Instant database updates with new prospects How It Works Input Processing: Receive voice message or text command AI Analysis: Extract search parameters (location, industry, job titles) URL Construction: Build Apollo.io search URL with extracted criteria Data Scraping: Retrieve prospect data via Apollo.io API Email Verification: Filter for verified email addresses only Duplicate Check: Compare against existing database records Data Storage: Save new prospects to database Confirmation: Send success notification with count of new leads Supported Search Parameters Location**: City, state, country combinations Industry**: Business sectors and verticals Job Titles**: Executive roles, departments, seniority levels Company Size**: Organization scale and employee count Data Fields Extracted Contact Information First Name & Last Name Email Address (verified only) LinkedIn Profile URL Phone Number (when available) Professional Details Current Job Title Company Name Industry Seniority Level Employment History Location Data City & State Country Full Location String Company Information Website URL Business Industry Organization Details Technical Architecture Core Components n8n Workflow Engine**: Orchestrates the entire process OpenAI Integration**: Powers voice transcription and AI analysis Apollo.io API**: Source for prospect data PostgreSQL/Supabase**: Database storage and management API Integrations OpenAI Whisper API for voice transcription OpenAI GPT for natural language processing Apollo.io API for lead data retrieval Supabase API for database operations Use Cases Sales Teams Quickly build prospect lists for outreach campaigns Target specific industries or job roles Maintain clean, verified contact databases Marketing Professionals Generate targeted lead lists for campaigns Research prospects in specific markets Build comprehensive contact databases Business Development Identify potential partners or clients Research competitive landscapes Generate contact lists for networking Recruitment Find candidates in specific locations Target particular job roles or industries Build talent pipeline databases Benefits ⚡ Speed & Efficiency Voice commands for instant lead generation Automated processing eliminates manual work Batch processing for large prospect lists 🎯 Precision Targeting AI-powered parameter extraction Flexible search criteria combinations Industry and role-specific filtering 📈 Data Quality Verified email addresses only Duplicate prevention Structured, consistent data format 🔄 Automation End-to-end automated workflow Real-time database updates Instant confirmation notifications Setup Requirements Prerequisites n8n workflow platform OpenAI API access Apollo.io API credentials PostgreSQL or Supabase database Messaging platform integration Configuration Steps Import workflow into n8n Configure API credentials Set up database connections Customize search parameters Test with sample voice/text input Customization Options Search Parameters Modify location formats Add custom industry categories Adjust job title variations Set result limits Data Processing Customize field mappings Add data validation rules Implement additional filters Configure output formats Integration Options Connect to CRM systems Add email marketing tools Integrate with sales platforms Export to various formats Success Metrics Processing Speed**: Voice-to-database in under 30 seconds Data Accuracy**: 95%+ verified email addresses Automation Level**: 100% hands-free operation Scalability**: Process 500+ leads per request Transform your lead generation process with intelligent automation that understands natural language and delivers verified prospects directly to your database.
+7

Automated US Stock Portfolio Analysis with Telegram, Perplexity AI & PDF Reports

System Architecture Two integrated N8N workflows providing automated US stock portfolio management through Telegram: FLOW 1: Conversational Portfolio Manager Telegram bot for interactive portfolio management PDF upload & analysis via LlamaIndex Cloud API Natural language portfolio updates via GPT-4.1-mini Real-time user registration and data management FLOW 2: Automated Weekly Reports Schedule-triggered weekly analysis (every 7 days) Perplexity AI sonar-deep-research for market analysis Professional PDF report generation via PDFco Automatic Telegram delivery to all registered users
+6

Interactive Knowledge Base Chat with Supabase RAG using AI 📚💬

Google Drive File Ingestion to Supabase for Knowledge Base 📂💾 Overview 🌟 This n8n workflow automates the process of ingesting files from Google Drive into a Supabase database, preparing them for a knowledge base system. It supports text-based files (PDF, DOCX, TXT, etc.) and tabular data (XLSX, CSV, Google Sheets), extracting content, generating embeddings, and storing data in structured tables. This is a foundational workflow for building a company knowledge base that can be queried via a chat interface (e.g., using a RAG workflow). 🚀 Problem Solved 🎯 Manually managing a knowledge base with files from Google Drive is time-consuming and error-prone. This workflow solves that by: Automatically ingesting files from Google Drive as they are created or updated. Extracting content** from various file types (text and tabular). Generating embeddings for text-based files to enable vector search. Storing data in Supabase for efficient retrieval. Handling duplicates and errors to ensure data consistency. Target Audience: Knowledge Managers**: Build a centralized knowledge base from company files. Data Teams**: Automate the ingestion of spreadsheets and documents. Developers**: Integrate with other workflows (e.g., RAG for querying the knowledge base). Workflow Description 🔍 This workflow listens for new or updated files in Google Drive, processes them based on their type, and stores the extracted data in Supabase tables for later retrieval. Here’s how it works: File Detection: Triggers when a file is created or updated in Google Drive. File Processing: Loops through each file, extracts metadata, and validates the file type. Duplicate Check: Ensures the file hasn’t been processed before. Content Extraction: Text-based Files: Downloads the file, extracts text, splits it into chunks, generates embeddings, and stores the chunks in Supabase. Tabular Files: Extracts data from spreadsheets and stores it as rows in Supabase. Metadata Storage: Stores file metadata and basic info in Supabase tables. Error Handling: Logs errors for unsupported formats or duplicates. Nodes Breakdown 🛠️ Detect New File 🔔 Type**: Google Drive Trigger Purpose**: Triggers the workflow when a new file is created in Google Drive. Configuration**: Credential: Google Drive OAuth2 Event: File Created Customization**: Specify a folder to monitor specific directories. Detect Updated File 🔔 Type**: Google Drive Trigger Purpose**: Triggers the workflow when a file is updated in Google Drive. Configuration**: Credential: Google Drive OAuth2 Event: File Updated Customization**: Currently disconnected; reconnect if updates need to be processed. Process Each File 🔄 Type**: Loop Over Items Purpose**: Processes each file individually from the Google Drive trigger. Configuration**: Input: {{ $json.files }} Customization**: Adjust the batch size if processing multiple files at once. Extract File Metadata 🆔 Type**: Set Purpose**: Extracts metadata like file_id, file_name, mime_type, and web_view_link. Configuration**: Fields: file_id: {{ $json.id }} file_name: {{ $json.name }} mime_type: {{ $json.mimeType }} web_view_link: {{ $json.webViewLink }} Customization**: Add more metadata fields if needed (e.g., size, createdTime). Check File Type ✅ Type**: IF Purpose**: Validates the file type by checking the MIME type. Configuration**: Condition: mime_type contains supported types (e.g., application/pdf, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet). Customization**: Add more supported MIME types as needed. Find Duplicates 🔍 Type**: Supabase Purpose**: Checks if the file has already been processed by querying knowledge_base. Configuration**: Operation: Select Table: knowledge_base Filter: file_id = {{ $node['Extract File Metadata'].json.file_id }} Customization**: Add additional duplicate checks (e.g., by file name). Handle Duplicates 🔄 Type**: IF Purpose**: Routes the workflow based on whether a duplicate is found. Configuration**: Condition: {{ $node['Find Duplicates'].json.length > 0 }} Customization**: Add notifications for duplicates if desired. Remove Old Text Data 🗑️ Type**: Supabase Purpose**: Deletes old text data from documents if the file is a duplicate. Configuration**: Operation: Delete Table: documents Filter: metadata->>'file_id' = {{ $node['Extract File Metadata'].json.file_id }} Customization**: Add logging before deletion. Remove Old Data 🗑️ Type**: Supabase Purpose**: Deletes old tabular data from document_rows if the file is a duplicate. Configuration**: Operation: Delete Table: document_rows Filter: dataset_id = {{ $node['Extract File Metadata'].json.file_id }} Customization**: Add logging before deletion. Route by File Type 🔀 Type**: Switch Purpose**: Routes the workflow based on the file’s MIME type (text-based or tabular). Configuration**: Rules: Based on mime_type (e.g., application/pdf for text, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet for tabular). Customization**: Add more routes for additional file types. Download File Content 📥 Type**: Google Drive Purpose**: Downloads the file content for text-based files. Configuration**: Credential: Google Drive OAuth2 File ID: {{ $node['Extract File Metadata'].json.file_id }} Customization**: Add error handling for download failures. Extract PDF Text 📜 Type**: Extract from File (PDF) Purpose**: Extracts text from PDF files. Configuration**: File Content: {{ $node['Download File Content'].binary.data }} Customization**: Adjust extraction settings for better accuracy. Extract DOCX Text 📜 Type**: Extract from File (DOCX) Purpose**: Extracts text from DOCX files. Configuration**: File Content: {{ $node['Download File Content'].binary.data }} Customization**: Add support for other text formats (e.g., TXT, RTF). Extract XLSX Data 📊 Type**: Extract from File (XLSX) Purpose**: Extracts tabular data from XLSX files. Configuration**: File ID: {{ $node['Extract File Metadata'].json.file_id }} Customization**: Add support for CSV or Google Sheets. Split Text into Chunks ✂️ Type**: Text Splitter Purpose**: Splits extracted text into manageable chunks for embedding. Configuration**: Chunk Size: 1000 Chunk Overlap: 200 Customization**: Adjust chunk size and overlap based on document length. Generate Text Embeddings 🌐 Type**: OpenAI Purpose**: Generates embeddings for text chunks using OpenAI. Configuration**: Credential: OpenAI API key Operation: Embedding Model: text-embedding-ada-002 Customization**: Switch to a different embedding model if needed. Store Text in Supabase 💾 Type**: Supabase Vector Store Purpose**: Stores text chunks and embeddings in the documents table. Configuration**: Credential: Supabase credentials Operation: Insert Documents Table Name: documents Customization**: Add metadata fields to store additional context. Store Tabular Data 💾 Type**: Supabase Purpose**: Stores tabular data in the document_rows table. Configuration**: Operation: Insert Table: document_rows Columns: dataset_id, row_data Customization**: Add validation for tabular data structure. Store File Metadata 📋 Type**: Supabase Purpose**: Stores file metadata in the document_metadata table. Configuration**: Operation: Insert Table: document_metadata Columns: file_id, file_name, file_type, file_url Customization**: Add more metadata fields as needed. Record in Knowledge Base 📚 Type**: Supabase Purpose**: Stores basic file info in the knowledge_base table. Configuration**: Operation: Insert Table: knowledge_base Columns: file_id, file_name, file_type, file_url, upload_date Customization**: Add indexes for faster lookups. Log File Errors ⚠️ Type**: Supabase Purpose**: Logs errors for unsupported file types. Configuration**: Operation: Insert Table: error_log Columns: error_type, error_message Customization**: Add notifications for errors. Log Duplicate Errors ⚠️ Type**: Supabase Purpose**: Logs errors for duplicate files. Configuration**: Operation: Insert Table: error_log Columns: error_type, error_message Customization**: Add notifications for duplicates. Interactive Knowledge Base Chat with Supabase RAG using GPT-4o-mini 📚💬 Introduction 🌟 This n8n workflow creates an interactive chat interface that allows users to query a company knowledge base using Retrieval-Augmented Generation (RAG). It retrieves relevant information from text documents and tabular data stored in Supabase, then generates natural language responses using OpenAI’s GPT-4o-mini model. Designed for teams managing internal knowledge, this workflow enables users to ask questions like “What’s the remote work policy?” or “Show me the latest budget data” and receive accurate, context-aware responses in a conversational format. 🚀 Problem Statement 🎯 Managing a company knowledge base can be a daunting task—employees often struggle to find specific information buried in documents or spreadsheets, leading to wasted time and inefficiencies. Traditional search methods may not understand natural language queries or provide contextually relevant results. This workflow solves these issues by: Offering a chat-based interface for natural language queries, making it easy for users to ask questions in their own words. Leveraging RAG to retrieve relevant text and tabular data from Supabase, ensuring responses are accurate and context-aware. Supporting diverse file types, including text-based files (e.g., PDFs, DOCX) and tabular data (e.g., XLSX, CSV), for comprehensive knowledge access. Maintaining conversation history to provide context during interactions, improving the user experience. Target Audience 👥 This workflow is ideal for: HR Teams**: Quickly access company policies, employee handbooks, or benefits documents. Finance Teams**: Retrieve budget data, expense reports, or financial summaries from spreadsheets. Knowledge Managers**: Build a centralized assistant for internal documentation, streamlining information access. Developers**: Extend the workflow with additional tools or integrations for custom use cases. Workflow Description 🔍 This workflow consists of a chat interface powered by n8n’s Chat Trigger node, an AI Agent node for RAG, and several tools to retrieve data from Supabase. Here’s how it works step-by-step: User Initiates a Chat: The user interacts with a chat interface, sending queries like “Summarize our remote work policy” or “Show budget data for Q1 2025.” Query Processing with RAG: The AI Agent processes the query using RAG, retrieving relevant data from Supabase tables and generating a response with OpenAI’s GPT-4o-mini model. Data Retrieval and Response Generation: The workflow uses multiple tools to fetch data: Retrieves text chunks from the documents table using vector search. Fetches tabular data from the document_rows table based on file IDs. Extracts full document text or lists available files as needed. Generates a natural language response combining the retrieved data. Conversation History Management: Stores the conversation history in Supabase to maintain context for follow-up questions. Response Delivery: Formats and sends the response back to the chat interface for the user to view. Nodes Breakdown 🛠️ Start Chat Interface 💬 Type**: Chat Trigger Purpose**: Provides the interactive chat interface for users to input queries and receive responses. Configuration**: Chat Title: Company Knowledge Base Assistant Chat Subtitle: Ask me anything about company documents! Welcome Message: Hello! I’m your Company Knowledge Base Assistant. How can I help you today? Suggestions: What is the company policy on remote work?, Show me the latest budget data., List all policy documents. Output Chat Session ID: true Output User Message: true Customization**: Update the title and welcome message to align with your company branding (e.g., HR Knowledge Assistant). Add more suggestions relevant to your use case (e.g., What are the company benefits?). Process Query with RAG 🧠 Type**: AI Agent Purpose**: Orchestrates the RAG process by retrieving relevant data using tools and generating responses with OpenAI’s GPT-4o-mini. Configuration**: Credential: OpenAI API key Model: gpt-4o-mini System Prompt: You are a helpful assistant for a company knowledge base. Use the provided tools to retrieve relevant information from documents and tabular data. If the query involves tabular data, format it clearly in your response. If no relevant data is found, respond with "I couldn’t find any relevant information. Can you provide more details?" Input Field: {{ $node['Start Chat Interface'].json.message }} Customization**: Switch to a different model (e.g., gpt-3.5-turbo) to adjust cost or performance. Modify the system prompt to change the tone (e.g., more formal for HR use cases). Retrieve Text Chunks 📄 Type**: Supabase Vector Store (Tool) Purpose**: Retrieves relevant text chunks from the documents table using vector search. Configuration**: Credential: Supabase credentials Operation Mode: Retrieve Documents (As Tool for AI Agent) Table Name: documents Embedding Field: embedding Content Field: content_text Metadata Field: metadata Embedding Model: OpenAI text-embedding-ada-002 Top K: 10 Customization**: Adjust Top K to retrieve more or fewer results (e.g., 5 for faster responses). Ensure the match_documents function (see prerequisites) is defined in Supabase. Fetch Tabular Data 📊 Type**: Supabase (Tool, Execute Query) Purpose**: Retrieves tabular data from the document_rows table based on a file ID. Configuration**: Credential: Supabase credentials Operation: Execute Query Query: SELECT row_data FROM document_rows WHERE dataset_id = $1 LIMIT 10 Tool Description: Run a SQL query - use this to query from the document_rows table once you know the file ID you are querying. dataset_id is the file_id and you are always using the row_data for filtering, which is a jsonb field that has all the keys from the file schema given in the document_metadata table. Customization**: Modify the query to filter specific columns or add conditions (e.g., WHERE dataset_id = $1 AND row_data->>'year' = '2025'). Increase the LIMIT for larger datasets. Extract Full Document Text 📜 Type**: Supabase (Tool, Execute Query) Purpose**: Fetches the full text of a document by concatenating all text chunks for a given file_id. Configuration**: Credential: Supabase credentials Operation: Execute Query Query: SELECT string_agg(content_text, ' ') as document_text FROM documents WHERE metadata->>'file_id' = $1 GROUP BY metadata->>'file_id' Tool Description: Given file id fetch the text from the documents Customization**: Add filters to the query if needed (e.g., limit to specific metadata fields). List Available Files 📋 Type**: Supabase (Tool, Select) Purpose**: Lists all files in the knowledge base from the document_metadata table. Configuration**: Credential: Supabase credentials Operation: Select Schema: public Table: document_metadata Tool Description: Use this tool to fetch all documents including the table schema if the file is csv, excel or xlsx Customization**: Add filters to list specific file types (e.g., WHERE file_type = 'application/pdf'). Modify the columns selected to include additional metadata (e.g., file_size). Manage Chat History 💾 Type**: Postgres Chat Memory (Tool) Purpose**: Stores and retrieves conversation history to maintain context. Configuration**: Credential: Supabase credentials (Postgres-compatible) Table Name: n8n_chat_history Session ID Field: session_id Session ID Value: {{ $node['Start Chat Interface'].json.sessionId }} Message Field: message Sender Field: sender Timestamp Field: timestamp Context Window Length: 5 Customization**: Increase the context window length for longer conversations (e.g., 10 messages). Add indexes on session_id and timestamp in Supabase for better performance. Format and Send Response 📤 Type**: Set Purpose**: Formats the AI Agent’s response and sends it back to the chat interface. Configuration**: Fields: response: {{ $node['Process Query with RAG'].json.output }} Customization**: Add additional formatting to the response if needed (e.g., prepend with a timestamp or apply markdown formatting). Setup Instructions 🛠️ Prerequisites 📋 n8n Setup: Ensure you’re using n8n version 1.0 or higher. Enable the AI features in n8n settings. Supabase: Create a Supabase project and set up the following tables: documents: id (uuid), content_text (text), embedding (vector(1536)), metadata (jsonb) document_rows: id (uuid), dataset_id (varchar), row_data (jsonb) document_metadata: file_id (varchar), file_name (varchar), file_type (varchar), file_url (text) knowledge_base: id (serial), file_id (varchar), file_name (varchar), file_type (varchar), file_url (text), upload_date (timestamp) n8n_chat_history: id (serial), session_id (varchar), message (text), sender (varchar), timestamp (timestamp) Add the match_documents function to Supabase to enable vector search: CREATE OR REPLACE FUNCTION match_documents ( query_embedding vector(1536), match_count int DEFAULT 5, filter jsonb DEFAULT '{}' ) RETURNS TABLE ( id uuid, content_text text, metadata jsonb, similarity float ) LANGUAGE plpgsql AS $$ BEGIN RETURN QUERY SELECT documents.id, documents.content_text, documents.metadata, 1 - (documents.embedding <=> query_embedding) as similarity FROM documents WHERE documents.metadata @> filter ORDER BY similarity DESC LIMIT match_count; END; $$;
+9

AI Personal Assistant with GPT-4o, RAG & Voice for WhatsApp using Supabase

🧠 Intelligent AI Assistant with RAG & Voice for WhatsApp – Built with GPT-4o & Supabase 📌 About this workflow and its creator Hi! I’m Amanda, a creator of intelligent automations using n8n and Make. I’ve been building AI-powered workflows for over 2 years, always focused on usability and innovation. This one here is very special to me – a truly advanced AI assistant that reads, listens, interprets and responds like a real human 🤖✨ This ready-to-use workflow acts as a powerful AI personal assistant capable of understanding messages via voice, text, documents, or even images. It supports full multi-channel operation (WhatsApp via Evolution API, Instagram, Facebook, and more), and includes advanced RAG capabilities using Supabase + GPT-4o. It’s designed to be highly extensible, with memory, prompt update tools, and knowledge base management. ⚙️ What this workflow does 💬 Understands user input via text, document, audio or image (voice, OCR, PDF) 🎤 Transcribes and interprets voice messages using OpenAI Whisper 🧠 Understands prompts and user commands using GPT-4o via LangChain agent 🗂️ Searches knowledge base using RAG + Supabase vector DB 📄 Accepts documents and automatically indexes them for future questions 🧾 Summarizes documents and stores metadata in Supabase 🗃️ Offers memory support (PostgreSQL chat memory per user session) 📧 Sends replies through WhatsApp (Evolution API), Instagram, Facebook, etc. 📅 Manages schedules (via tool integration with Google Calendar) 📬 Sends and searches emails (with support tools) 🛠 Modular and expandable structure (tools for saving knowledge, deleting, updating prompt) 🔧 Setup Instructions n8n Hosting This workflow requires n8n self-hosted (or n8n Cloud with custom credentials + community nodes enabled). Create required databases Use the provided SQL queries inside the setar_supabase_tabelas_vectoriais, criar_cerebro, and criar_rag_controle nodes to initialize: documents table for RAG cerebro table for prompt memoria_chat for session memory rag_controle for summaries and indexing Credentials needed OpenAI API (for chat, embeddings and Whisper transcription) Redis (for managing message buffer) Supabase (for vector store + metadata) Postgres (for memory and prompts) Evolution API (or other messaging platforms) Webhook Set the webhook path to receive messages from your Evolution or WhatsApp API provider. Configure ‘Set’ node In the config node, adjust: adminNumero: your personal WhatsApp or admin number evolutionApiKey: your private API key utilizacaoApenasViaAdmin: toggle if this should only respond to admin numbers Tool connections Ensure the supporting workflows are also imported and connected for: Emails Knowledge management Calendar events 📎 Notes This workflow uses LangChain agents, OpenAI GPT-4o, Supabase, Redis, and PostgreSQL. It includes multiple “sticky notes” inside the workflow with explanations. Ideal for businesses, consultants, and developers looking to offer an intelligent and extendable AI chatbot experience. 🛍 Want to use this on your system? ❤️ Buy workflows: https://iloveflows.com ☁️ Use n8n Cloud with my partner link: https://n8n.partnerlinks.io/amanda

Automated Document Sync Between SharePoint and Google Drive with Supabase

SharePoint → Supabase → Google Drive Sync Workflow Overview This workflow is a multi-system document synchronization pipeline built in n8n, designed to automatically sync and back up files between Microsoft SharePoint, Supabase/Postgres, and Google Drive. It runs on a scheduled trigger, compares SharePoint file metadata against your Supabase table, downloads new or updated files, uploads them to Google Drive, and marks records as completed — keeping your databases and storage systems perfectly in sync. Workflow Structure Data Source:** SharePoint REST API for recursive folder and file discovery. Processing Layer:** n8n logic for filtering, comparison, and metadata normalization. Destination Systems:** Supabase/Postgres for metadata, Google Drive for file backup. SharePoint Sync Flow (Frontend Flow) Trigger:** Schedule Trigger Runs at fixed intervals (customizable) to start synchronization. Fetch Files:** Microsoft SharePoint HTTP Request Recursively retrieves folders and files using SharePoint’s REST API: /GetFolderByServerRelativeUrl(...)?$expand=Files,Folders,Folders/Files,Folders/Folders/Folders/Files Filter Files:** filter files A Code node that flattens nested folders and filters unwanted file types: Excludes system or temporary files (~$) Excludes extensions: .db, .msg, .xlsx, .xlsm, .pptx Normalize Metadata:** normalize last modified date Ensures consistent Last_modified_date format for accurate comparison. Fetch Existing Records:** Supabase (Get) Retrieves current entries from n8n_metadata to compare against SharePoint files. Compare Datasets:** Compare Datasets Detects new or modified files based on UniqueId, Last_modified_date, and Exists. Routes only changed entries forward for processing. File Processing Engine (Backend Flow) Loop:** Loop Over Items2 Iterates through each new or updated file detected. Build Metadata:** get metadata and Set metadata Constructs final metadata fields: file_id, file_title, file_url, file_type, foldername, last_modified_date Generates fileUrl using UniqueId and ServerRelativeUrl if missing. Upsert Metadata:** Insert Document Metadata Inserts or updates file records in Supabase/Postgres (n8n_metadata table). Operation: upsert with id as the primary matching key. Download File:** Microsoft SharePoint HTTP Request1 Fetches the binary file directly from SharePoint using its ServerRelativeUrl. Rename File:** rename files Renames each downloaded binary file to its original file_title before upload. Upload File:** Upload file Uploads the renamed file to Google Drive (My Drive → root folder). Mark Complete:** Postgres Updates the Supabase/Postgres record setting Loading Done = true. Optional Cleanup:** Supabase1 Deletes obsolete or invalid metadata entries when required. Integrations Used | Service | Purpose | Credential | |----------|----------|-------------| | Microsoft SharePoint | File retrieval and download | microsoftSharePointOAuth2Api | | Supabase / Postgres | Metadata storage and synchronization | Supabase account 6 ayan | | Google Drive | File backup and redundancy | Google Drive account 6 rn dbt | | n8n Core | Flow control, dataset comparison, batch looping | Native | System Prompt Summary > “You are a SharePoint document synchronization workflow. Fetch all files, compare them to database entries, and only process new or modified files. Download files, rename correctly, upload to Google Drive, and mark as completed in Supabase.” Workflow rule summary: > “Maintain data integrity, prevent duplicates, handle retries gracefully, and continue on errors. Skip excluded file types and ensure reliable backups between all connected systems.” Key Features Scheduled automatic sync across SharePoint, Supabase, and Google Drive Intelligent comparison to detect only new or modified files Idempotent upsert for consistent metadata updates Configurable file exclusion filters Safe rename + upload pipeline for clean backups Error-tolerant and fully automated operation Summary > A reliable, SharePoint-to-Google Drive synchronization workflow built with n8n, integrating Supabase/Postgres for metadata management. It automates file fetching, filtering, downloading, uploading, and marking as completed — ensuring your data stays mirrored across platforms. Perfect for enterprises managing document automation, backup systems, or cross-cloud data synchronization. Need Help or More Workflows? Want to customize this workflow for your organization? Our team at Digital Biz Tech can extend it for enterprise-scale document automation, RAGs and social media automation. We can help you set it up for free — from connecting credentials to deploying it live. Contact: [email protected] Website: https://www.digitalbiz.tech LinkedIn: https://www.linkedin.com/company/digital-biz-tech/ You can also DM us on LinkedIn for any help.

AI Agent for realtime insights on meetings

Video Guide I prepared a detailed guide explaining how to build an AI-powered meeting assistant that provides real-time transcription and insights during virtual meetings. Youtube Link Who is this for? This workflow is ideal for business professionals, project managers, and team leaders who require effective transcription of meetings for improved documentation and note-taking. It's particularly beneficial for those who conduct frequent virtual meetings across various platforms like Zoom and Google Meet. What problem does this workflow solve? Transcribing meetings manually can be tedious and prone to error. This workflow automates the transcription process in real-time, ensuring that key discussions and decisions are accurately captured and easily accessible for later review, thus enhancing productivity and clarity in communications. What this workflow does The workflow employs an AI-powered assistant to join virtual meetings and capture discussions through real-time transcription. Key functionalities include: Automatic joining of meetings on platforms like Zoom, Google Meet, and others with the ability to provide real-time transcription. Integration with transcription APIs (e.g., AssemblyAI) to deliver seamless and accurate capture of dialogue. Structuring and storing transcriptions efficiently in a database for easy retrieval and analysis. Real-Time Transcription: The assistant captures audio during meetings and transcribes it in real-time, allowing participants to focus on discussions. Keyword Recognition: Key phrases can trigger specific actions, such as noting important points or making prompts to the assistant. Structured Data Management: The assistant maintains a database of transcriptions linked to meeting details for organized storage and quick access later. Setup Preparation Create Recall.ai API key Setup Supabase account and table create table public.data ( id uuid not null default gen_random_uuid (), date_created timestamp with time zone not null default (now() at time zone 'utc'::text), input jsonb null, output jsonb null, constraint data_pkey primary key (id), ) tablespace pg_default; Create OpenAI API key Development Bot Creation: Use a node to create the bot that will join meetings. Provide the meeting URL and set transcription options within the API request. Authentication: Configure authentication settings via a Bearer token for interacting with your transcription service. Webhook Setup: Create a webhook to receive real-time transcription updates, ensuring timely data capture during meetings. Join Meeting: Set the bot to join the specified meeting and actively listen to capture conversations. Transcription Handling: Combine transcription fragments into cohesive sentences and manage dialog arrays for coherence. Trigger Actions on Keywords: Set up keyword recognition that can initiate requests to the OpenAI API for additional interactions based on captured dialogue. Output and Summary Generation: Produce insights and summary notes from the transcriptions that can be stored back into the database for future reference.

Build your own Supabase and Postgres integration

Create custom Supabase and Postgres workflows by choosing triggers and actions. Nodes come with global operations and settings, as well as app-specific parameters that can be configured. You can also use the HTTP Request node to query data from any app or service with a REST API.

Supabase supported actions

Create
Create a new row
Delete
Delete a row
Get
Get a row
Get Many
Get many rows
Update
Update a row

Postgres supported actions

Delete
Delete an entire table or rows in a table
Execute Query
Execute an SQL query
Insert
Insert rows in a table
Insert or Update
Insert or update rows in a table
Select
Select rows from a table
Update
Update rows in a table

FAQs

  • Can Supabase connect with Postgres?

  • Can I use Supabase’s API with n8n?

  • Can I use Postgres’s API with n8n?

  • Is n8n secure for integrating Supabase and Postgres?

  • How to get started with Supabase and Postgres integration in n8n.io?

Need help setting up your Supabase and Postgres integration?

Discover our latest community's recommendations and join the discussions about Supabase and Postgres integration.
Mikhail Savenkov
Honza Pav
Vyacheslav Karbovnichy
Dennis
Dennis

Looking to integrate Supabase and Postgres in your company?

Over 3000 companies switch to n8n every single week

Why use n8n to integrate Supabase with Postgres

Build complex workflows, really fast

Build complex workflows, really fast

Handle branching, merging and iteration easily.
Pause your workflow to wait for external events.

Code when you need it, UI when you don't

Simple debugging

Your data is displayed alongside your settings, making edge cases easy to track down.

Use templates to get started fast

Use 1000+ workflow templates available from our core team and our community.

Reuse your work

Copy and paste, easily import and export workflows.

Implement complex processes faster with n8n

red iconyellow iconred iconyellow icon