AutomationMart
Home/Browse/Store chat data in Supabase PostgreSQL for WhatsApp/Slack chatbot
n8n

Store chat data in Supabase PostgreSQL for WhatsApp/Slack chatbot

n8nn8n6 modulesv1.0
SlackWhatsAppGemini

n8n Template: Store Chat Data in Supabase PostgreSQL for WhatsApp/Slack Integration This n8n template captures chat data (like user ID, name, or address) and saves it to a Supabase PostgreSQL database. It’s built for testing now but designed to work with WhatsApp, Slack, or similar platforms later, where chat inputs aren’t predefined. Guide with images can be found on: Step 1: Configure Firewall Rules in Your VPC Network To let your n8n instance talk to Supabase, add a firewall rule in your VPC

At a glance

Store chat data in Supabase PostgreSQL for WhatsApp/Slack chatbot is a ready-made n8n workflow you import as a workflow JSON file — no build required. It connects Slack, WhatsApp, Gemini. It's free to download. Follow the 5-step import below to go live in minutes.

Platform
n8n
Connects
Slack, WhatsApp, Gemini
Modules
6
Price
Free
Version
v1.0
Store chat data in Supabase PostgreSQL for WhatsApp/Slack chatbot workflow diagram

About this workflow

n8n Template: Store Chat Data in Supabase PostgreSQL for WhatsApp/Slack Integration This n8n template captures chat data (like user ID, name, or address) and saves it to a Supabase PostgreSQL database. It’s built for testing now but designed to work with WhatsApp, Slack, or similar platforms later, where chat inputs aren’t predefined. Guide with images can be found on: Step 1: Configure Firewall Rules in Your VPC Network To let your n8n instance talk to Supabase, add a firewall rule in your VPC network settings (e.g., Google Cloud, AWS, etc.). 1. Go to VPC Network settings. 2. Add a new firewall rule: - Name: allow-postgres-outbound - Direction: Egress (outbound traffic) - Destination Filter: IPv4 ranges - Destination IPv4 Ranges: 0.0.0.0/0 (allows all; restrict to Supabase IPs for security) - Source Filter: - Pick IPv4 ranges and add the n8n VM’s IP range, or - Pick None if any VM can connect - Protocols and Ports: - Protocol: TCP - Port: 5432 (default PostgreSQL port) 3. Save the rule. Step 2: Get the Supabase Connection String 1. Log into your Supabase Dashboard. 2. Go to your project, click the Connect button in the header. 3. Copy the PostgreSQL connection string: - Replace [YOUR-PASSWORD] with your Supabase account password (no brackets) and replace the string before that with your actual unique identifier. - Note the port (6543 or 5432)—use what’s in the string. Step 3: Set Up the n8n Workflow This workflow takes chat data, maps it to variables, and stores it in Supabase. It’s built to handle messy chat inputs from platforms like WhatsApp or Slack in production. Workflow Steps 1. Trigger Node: "When clicking 'Test workflow'" (manual trigger). - For now, it’s manual. In production, this will be a WhatsApp or Slack message trigger, which won’t have a fixed input format. 2. Set Node: "Set sample input variables (manual)". - This node sets variables like id, name, address to mimic chat data. - Why? Chat platforms send unstructured data (e.g., a message with a user’s name or address). We map it to variables so we can store it properly. The id will be something unique like a phone number, account ID, or account number. 3. Sample Agent Node: Uses a model (e.g., GeminiFlash2.0 but doesn't matter). - This is a placeholder to process data (e.g., clean or validate it) before saving. You can skip or customize it. 4. Supabase PostgreSQL Node: "Supabase PostgreSQL Database". - Connects to Supabase using the connection string from Step 2. - Saves the variables (id, name, address) to a table. - Why store extra fields? The id (like a phone number or account ID) is the key. Extra fields like name or address let us keep all user info in one place for later use (e.g., analytics or replies). 5. Output Node: "Update additional values e.g., name, address". - Confirms the data is saved. In production, this could send a reply to the chat platform. Why This Design? - Handles Unstructured Chat Data: WhatsApp or Slack messages don’t have a fixed format. The "Set" node lets us map any incoming data (e.g., id, name) to our database fields. - Scales for Production: Using id as a key (phone number, account ID, etc.) with extra fields like name makes this workflow flexible for many use cases, like user profiles or support logs. - Future-Ready: It’s built to swap the manual trigger for a real chat platform trigger without breaking. Step 4: Configure the Supabase PostgreSQL Node 1. In the n8n workflow, set up the Supabase PostgreSQL node: - Host: aws-0-eu-central-1.pooler.supabase.com (from the connection string) - Port: 6543 (or what’s in the connection string) - Database: postgres - User: postgres.fhspudlibstmpgwqmumo (from the connection string) - Password: Your Supabase password - SSL: Enable (Supabase usually requires it) 2. Set the node to Insert or Update: - Map id to a unique column in your Supabase table (e.g., phone number, account ID). - Map fields like name, address to their columns. 3. Test the workflow to confirm data saves correctly. Security Tips - Limit Firewall Rules: Don’t use 0.0.0.0/0. Find Supabase’s IP ranges in their docs and use those. - Hide Passwords: Store your Supabase password in n8n’s environment variables. - Use SSL: Enable SSL in the n8n node for secure data transfer.

n8n

How to import this n8n workflow

  1. 1

    Download the workflow JSON file after purchase.

  2. 2

    Open n8n → click the menu → Import from File.

  3. 3

    Select the downloaded JSON and import.

  4. 4

    Set up credentials for each node that requires them.

  5. 5

    Click Execute Workflow to test, then activate.

Setup guide

Setup guide included

Purchase to unlock the full step-by-step guide

Related N8n workflows

Send personalized birthday and anniversary emails with Google Sheets, Gemini, and Gmail

Birthday & Milestone Message Automation (n8n Google Sheets + Gemini AI + Gmail) This workflow automatically sends personalized birthday and anniversary emails to clients. It runs daily, checks a Google Sheet for matching dates, generates a warm AI message using Google Gemini and sends it via Gmail. It also includes a thoughtful investment idea tailored to the client’s age, risk profile and relationship type. Quick Implementation Steps 1. Connect Google Sheets OAuth2 2. Add your Google Gemini API

Free

Website monitoring, scheduling, and email alerts template

Website Downtime Monitoring with Scheduled Checks and Email Alerts Easily monitor your website uptime and receive instant email alerts when it becomes unreachable — using this no-code template powered by n8n, a free and flexible workflow automation tool. This ready-to-use workflow periodically checks your website’s status and sends an alert email if it’s down. --- ⚙️ How it Works - Schedule Website Check Triggers the workflow at regular intervals (e.g., eve

Free

Generate contextual recommendations from Slack using Pinecone

This advanced Retrieval-Augmented Generation (RAG) automation template for n8n enables contextual, real-time recommendations using Slack messages as input. The workflow extracts referenced documents from Google Drive, performs semantic retrieval from Pinecone, and generates next-step advice using GPT-4o — tailored specifically for executives and knowledge workers. Perfect for AI copilots, Slack-based assistants, or CTO coaching tools, this no-code RAG implementation gives you the building block

Free

Create Slack messages for new Google Tasks

Every time a new task is added to a specified Google Tasks list, Make will automatically create a new message in Slack.

Free

Facebook ads competitive analysis using Gemini and Open AI

How it works - User submits a keyword through a form to trigger the workflow. - Ads matching the keyword are scraped from Facebook Ads Library. - Ads are filtered by media type (image or video). - Images are analyzed using an AI model to describe visuals and text. - Videos are downloaded, processed, and sent to Gemini for visual and spoken content analysis. - Text, URLs, and media descriptions are compiled. - All ad insights are saved into a Google Sheet for easy viewing. Set up steps - Requires

Free

Send WhatsApp messages and watch events using ChatGPT for automated responses X Woztell

This is a predefined template that will make the creation of your scenario much easier. Of course, you can always expand and customize the scenario to meet your own individual needs.

Free

AI-powered X (Twitter) content generator and scheduler with LangChain and Blotato

This n8n template demonstrates how to use AI to fully automate the generation and scheduling of X (formerly Twitter) content based on a specific, predefined persona. Use cases are many: It's perfect for social media marketers looking to streamline content creation, individual experts building a consistent brand voice, or businesses aiming to drive traffic to specific services with a steady stream of relevant content. Good to know The AI model used in this workflow (via OpenRouter) re

Free

Auto-schedule demos for high-intent leads with Clearbit, Slack, and Calendly

This workflow automatically captures, enriches, scores, and routes website leads in real-time, scheduling high-intent prospects for demos within minutes instead of hours—dramatically improving conversion rates by eliminating response delays. What Makes This Different: - Real-Time Lead Processing - Captures and processes leads instantly from website forms with zero delay - Intelligent Fit Scoring - Automatically scores leads 0-100 based on company size, seniority, and revenue - Dual-Track Routing

Free

Reviews

No reviews yet

Be the first to buy and share your experience.

Leave a review

Sign in to share your experience with this workflow.

Log in to review
Free
No ratings yet

Create a free account to purchase workflows.

  • JSON blueprint — instant download
  • Setup guide PDF included
  • 5 downloads · valid 30 days
  • Works with n8n

Need help setting this up?

Book a 3-hour live setup session with an Agility consultant.

₹2,499/ session
3 hrs · video call
  • Configure live on Google Meet / Zoom
  • Free follow-up if workflow has defects
  • Platform expert assigned to you
Book installation session
Free