Supabase
Receive Supabase Database Webhook events — row-level INSERT, UPDATE, and DELETE notifications from any Postgres table — in Dispatch and route them to Discord, Slack, Telegram, or any webhook destination.
Setup
- Go to Sources in your Dispatch project and click Add Source.
- Select Supabase from the integrations grid.
- Click Connect — you'll be redirected to Supabase to authorize Dispatch for your organization.
- After authorizing, you'll return to Dispatch and see a list of your Supabase projects.
- Pick the project, then pick the table you want to watch.
- Choose the events you want:
INSERT,UPDATE,DELETE(any combination). - Click Connect. Dispatch creates the trigger in your Supabase project automatically. On first connect Dispatch also creates the
pg_netextension (in theextensionsschema) and adispatch.http_request()trigger function — both are idempotent, safe to re-run, and self-contained so you don't have to enable Supabase Studio's Webhooks UI first.
Each Dispatch source corresponds to one Supabase table. To watch multiple tables, repeat steps 5–7.
Watching User Signups
To get a webhook every time a new user signs up, pick the auth.users table and select INSERT. Dispatch creates a trigger on auth.users using the same pattern Supabase documents for the handle_new_user profile-copy flow. Each row delivered contains the new user's id, email, created_at, and the rest of the auth.users columns under record.
You can also watch auth.users for UPDATE (email confirmation, password change, metadata change) or DELETE (account deletion).
Event Types
The event type is set to <schema>.<table>.<type> lowercased, so you can filter and route by table.
| Event type | Source |
|---|---|
public.todos.insert | A new row was inserted into public.todos |
public.todos.update | An existing row in public.todos was updated |
public.todos.delete | A row in public.todos was deleted |
Payload Shape
Supabase delivers the standard Database Webhook payload:
{
"type": "INSERT",
"table": "todos",
"schema": "public",
"record": { "id": 1, "title": "Buy milk", "is_complete": false },
"old_record": null
}
For UPDATE events, both record (new) and old_record (previous) are populated. For DELETE events, record is null and old_record holds the deleted row.
What Dispatch Creates in Supabase
On first connect Dispatch creates, in your database (all idempotent):
extensions.pg_net— Supabase's HTTP client extension, used to fire the webhookdispatchschema — Dispatch's own namespacedispatch.http_request()—SECURITY DEFINERtrigger function that builds the standard Supabase Database Webhook payload (type,table,schema,record,old_record) and posts it vianet.http_post
For each connected table Dispatch then creates one Postgres trigger that calls dispatch.http_request() with the events you selected, including the Authorization: Bearer <secret> header Dispatch verifies on every request.
You can view the triggers in Supabase Studio under Database → Triggers (they're named dispatch_<id>_<schema>_<table>) or via SQL:
SELECT * FROM information_schema.triggers
WHERE trigger_name LIKE 'dispatch_%';
Auto-Formatted Embeds
When no custom template is assigned, Dispatch auto-detects Supabase payloads and generates specialized embeds:
- Insert events are colored green and include the inserted row as a JSON block
- Update events are colored blue and show a per-field diff (
name: old → new) - Delete events are colored red and include the deleted row
All events show the row ID (when present), schema, and table as fields.
Signature Verification
Supabase Database Webhooks don't HMAC-sign payloads. Instead, Dispatch verifies the Authorization: Bearer <secret> header that Dispatch injected into the trigger at creation time. The bearer secret is per-source and is never exposed in the dashboard after creation.
Disconnecting
To stop receiving events from a single table, go to Sources, find the Supabase endpoint, and click Delete. Dispatch will drop the corresponding trigger from your Supabase project automatically.
To revoke the OAuth connection entirely, click Disconnect in the Add Source dialog after selecting Supabase.