Integrations
Sources
Incoming webhooks
Supabase

How to connect Supabase to Knock

Learn how to use Supabase database webhooks to trigger notifications and manage data in Knock.

The Supabase source enables you to receive Supabase database webhook events in Knock and map them to actions like triggering workflows and identifying users. Knock provides a pre-built integration with webhook verification and event-to-action mappings ready to use.

Database webhooks in Supabase fire when rows are inserted, updated, or deleted from your tables, making them useful for sending notifications based on data changes in your application.

Prerequisites

#
  • A Supabase project with database tables you want to monitor
  • A Knock account with at least one workflow configured

Getting started

#
1

Create the source in Knock

Navigate to Integrations > Sources in your Knock dashboard and click "Create source." Select Supabase from the list of pre-built integrations.

2

Copy the webhook URL

Copy the webhook URL for the Knock environment you want to configure.

3

Create a database webhook in Supabase

In your Supabase Dashboard, go to Database > Webhooks and click "Create a new hook." Select the table and events (INSERT, UPDATE, DELETE) you want to monitor, then paste the Knock webhook URL as the HTTP endpoint.

4

Configure the webhook secret

Copy the webhook secret from your Supabase webhook configuration. In the Knock dashboard, paste this value into the source configuration so Knock can verify incoming requests.

5

Review event mappings

Review the pre-configured event-to-action mappings and enable the ones relevant to your use case.

Pre-configured events

#

The Supabase source comes with mappings for common database webhook event types. You can enable or disable each mapping independently.

Supabase eventSuggested actionDescription
INSERTTrigger workflowSends a notification when a new row is inserted into a monitored table
UPDATETrigger workflowSends a notification when a row is updated in a monitored table
DELETETrigger workflowSends a notification when a row is deleted from a monitored table

Customization

#

You can modify any of the pre-configured mappings or create new ones to handle different tables or event types. When customizing field mappings, use dot notation to reference nested fields in the Supabase webhook payload (e.g. record.user_id or old_record.status).

For details on building custom event-action mappings and field mapping, see the custom webhooks documentation.

New chat