workflows.fit
Back to n8n workflows
n8n templateFreeBy JPres

Store chat data in Supabase PostgreSQL for WhatsApp/Slack chatbot

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 ...

Data & StorageAILangchainCore NodesManual TriggerSetLm Chat Google GeminiMemory Postgres Chat
Loading interactive preview...

Template notes

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: https://github.com/JimPresting/Supabase-n8n-Self-Hosted-Integration/

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: