Supabase
Connect HookFlo with Supabase to receive alerts for database and authentication events
Integration Guide
This guide will help you set up a webhook integration between Supabase and HookFlo, allowing you to receive real-time alerts when database changes, authentication events, and other activities occur in your Supabase project.
Supabase uses a combination of database triggers and Postgres functions to deliver webhook events. HookFlo seamlessly integrates with both Supabase’s built-in webhooks and custom webhook implementations.
Prerequisites
- A HookFlo account with an active project
- A Supabase project with admin access
- Basic understanding of Supabase database and functions
Integration Overview
The integration process follows these key steps:
- Set up a webhook in HookFlo
- Configure notification channels (email/Slack)
- Connect Supabase to HookFlo
- Test the integration
Setting Up Your HookFlo Webhook
After logging into HookFlo, follow these steps to create and configure your Supabase webhook:
Create a Webhook
Setup Notification Channel
Connect your Webhook with application
Configuring Supabase
Now that your HookFlo webhook is set up, you need to configure Supabase to send events to it:
Setup Supabase Webhook
Create a Database Webhook
Enable HTTP Extension (If Needed)
Select Tables to Monitor
Testing Your Integration
To ensure your integration is working properly:
Generate Test Events
Verify in HookFlo
Advanced Configuration
Webhook Payload Structure
Here’s an example of what the webhook payload looks like for different events:
Database Event Payload
Authentication Event Payload
Troubleshooting
Example: Monitoring New User Signups
Here’s a complete example of setting up HookFlo to alert your team when new users sign up:
Create the Webhook in HookFlo
Follow the steps above to create a Supabase webhook in HookFlo and configure your notification channels.
Configure the Database Webhook in Supabase
- In your Supabase dashboard, go to Database > Webhooks
- Create a new webhook named “user-signups”
- Select the
auth.users
table (or your custom users table) - Choose the INSERT event type to trigger on new user creations
- Add your HookFlo webhook URL and headers (x-webhook-id and x-webhook-token)
- Save the webhook
Security Considerations
When setting up webhook integrations between Supabase and HookFlo, keep these security best practices in mind:
- Protect your webhook credentials: Keep your x-webhook-id and x-webhook-token secure
- Use row-level security: Limit what data can be included in webhook payloads
- Implement data minimization: Only send the fields you actually need
- Regular audits: Remove webhooks from tables that no longer need monitoring
- Use HTTPS only: Ensure all webhook communications use secure protocols
Congratulations! 🎉
You’ve successfully set up real-time event tracking and alerting between Supabase and HookFlo in just few minutes. Your team can now receive immediate notifications about important database and authentication events, helping you respond quickly to critical situations.
Need more help? Contact our support team or join our Discord forum or DM me directly on X.