Skip to main content
The Postgres connector writes Novu webhook events to a table in your Postgres database. Use it when notification events need to live in an operational database or feed a reporting pipeline that already reads from Postgres. Novu webhook delivery is powered by Svix, and this connector is one of its advanced endpoint types.
Outbound webhooks are available on Team and Enterprise plans.

Prerequisites

  • A Postgres database reachable over the public internet
  • The destination table created before you enable the endpoint. The connector does not create or alter tables.
  • A dedicated database user that can connect to the database and insert into that table
  • Network rules that allow the connection, including any cloud provider IP allowlist
Do not reuse an application owner or migration account. The connector only needs to insert into one table.

Configuration

Create the destination table

This schema keeps the event type available for filtering, extracts the two fields most reports need, and preserves the complete webhook body:
payload holds the full body as JSONB, so a new field in a Novu payload does not require a migration. received_at is set by the transformation rather than by the payload, which makes it a reliable sort key across every event type.

Grant least-privilege access

Replace the database, schema, user, and table names with your own. Add SELECT only if your verification process or database policy requires the same user to read rows back.

Transformation contract

The handler receives one delivery batch:
  • input.events, an array whose length is capped by the endpoint batch size
  • input.events[].eventType, the Novu event type, for example message.sent
  • input.events[].payload, the webhook body
The webhook body wraps the resource in an envelope. payload.object is the resource type as a string, such as "message", and the resource itself is under payload.data.object. For message events, fields such as subscriberId and channel are therefore at event.payload.data.object. Other event families use different resource shapes, so guard extracted fields with defaults. The return shape is defined by the template the Novu Dashboard ships with this connector. Open the template and read the JSDoc comment above its handler for the exact keys, because the return shape differs between connector families. Map the values below into that template rather than pasting a handler from another connector page: Send an example event before you customize anything, read the transformed output in the endpoint’s Logs, then change one column at a time and re-test.

Configure in the Dashboard

1

Prepare the database

Create the table, create the restricted user, and apply the grants above. Confirm the user can connect and insert from outside your network.
2

Add the endpoint

Open Webhooks in the Novu Dashboard, select Endpoints, click Add Endpoint, and choose .
3

Enter connection details

Enter the host, port, database, username, password, and table name. Add a description that identifies the database and environment.
4

Configure the transformation

Start from the transformation template shown in the Dashboard and map the columns using the table above.
5

Select event types

Subscribe to the event types your consumer needs. All subscribed types insert into the same table, so confirm the transformation produces valid rows for each one. For delivery reporting, start with message.sent, message.delivered, and message.failed.
6

Test the endpoint

Click Create, open the endpoint, go to the Testing tab, and use Send Example for each subscribed event type. Confirm success in the Logs tab.

Verify delivery

To read a field that you did not extract into a column, query the stored body:

Troubleshooting

Use the Logs tab to inspect transformed payloads and delivery attempts.

Official references