Supabase: Send database webhooks to Slashbin
Time: ~10 minutes | Difficulty: Beginner | Prerequisites: A Supabase project with access to its database webhooks, and a Slashbin account
TL;DR: Supabase database webhooks are unsigned. Slashbin cannot check an HMAC signature on them, so it checks a shared x-slashbin-token header instead. That header proves only that the sender holds the token. Keep the token private, and rotate it if it leaks.
The Problem
You looked for a signing secret in Supabase and found none. Supabase’s database webhooks guide documents no signature, so a recipe that tells you to paste an HMAC secret cannot work here.
Two things follow:
- There is nothing to verify the body against. A shared header token is the only check available. Anyone who learns the token can send events to your stream.
- The header is set on the trigger. Supabase documents the headers as an argument of the trigger it creates. It does not document a dashboard header field for HTTP Request webhooks (only for Edge Function webhooks), so do not count on finding one there.
The Solution
Point the Supabase webhook at a Slashbin data stream. Slashbin compares the shared token at the gateway, stores the raw payload, and delivers it to your destination with retries and replay.
Read Golden Model for the canonical schema you keep, and Third-Party Model for the shape a destination expects.
Step 1: Create a Data Stream in Slashbin
- In the Slashbin console, click Create New Data Stream and select Supabase.
- Copy the stream’s receiver URL and its shared token. The console shows both, so copy them from there rather than typing them.
Step 2: Create the Database Webhook in Supabase
- In Supabase, create a database webhook on the table you want to watch, for the events you care about: insert, update, delete.
- Point it at the receiver URL from Step 1.
- Set the
x-slashbin-tokenheader to the shared token, through the trigger’s headers argument as the Supabase webhooks guide describes.
The token is the only check. Supabase does not sign the request, so Slashbin cannot tell a real Supabase trigger from anyone else who holds the token. Treat it like a password.
Step 3: Confirm the First Event in the Delivery Log
Change a row in the watched table, then open the stream in Slashbin and check the Delivery Log:
- An event with your row in it means the URL and token match on both sides. You are done.
- A verification failure means the
x-slashbin-tokenheader is missing or does not match the token in Slashbin. Check the header on the trigger. - Nothing at all means no request reached the URL. Check that the URL is copied exactly and that the webhook is on the right table and events.
What a Supabase Event Contains
type:INSERT,UPDATEorDELETE.tableandschema: where the change happened.record: the row after the change. It is null on a delete.old_record: the row before the change. It is available on update and delete, and null on insert.
Next Steps
- Write transformed rows back into a Supabase table: Supabase: Write transformed rows to a table.
- Send one event to more than one system: see Fan-Out Routing.
- Browse every supported source and destination on Integrations.