Outbound webhooks are available on Team and Enterprise plans.
Prerequisites
- A GCP project with a BigQuery dataset.
- The destination table created before you enable the endpoint. The connector does not create or alter tables.
- A Google Cloud service account with a JSON key, granted write access on the destination dataset.
Configuration
Paste the full contents of the service account JSON key file into the credentials field. Treat it as a secret and do not commit it to a repository.
Service account permissions
Svix does not publish a required role list for this connector, so scope the service account using Google’s own reference. Google documents that writing rows to a table requires thebigquery.tables.updateData permission, which is included in the predefined roles/bigquery.dataEditor role. See BigQuery access control.
Grant the role on the destination dataset rather than the whole project:
Default destination behavior
Without a transformation, Svix writes two columns. It generates a uniqueid for each row and writes the raw webhook payload to payload:
Create an analytics table
Transformation contract
The transformation receives one batch and returns the rows to insert: The handler receives one delivery batch:input.events, an array whose length is capped by the endpoint batch sizeinput.events[].eventType, the Novu event type, for examplemessage.sentinput.events[].payload, the webhook body
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.
- Output: an object with a
rowsarray. Each row is inserted as a separate BigQuery row, and its keys must match your column names.
event.payload.data.object:
id and payload, which matches the two column schema. Replace it when you use a wider table.
Configure in the Dashboard
1
2
Enter connection details
Enter the project ID, dataset ID, table ID, and paste the service account credentials JSON.3
Configure the transformation
Keep the default template if your table uses theid and payload schema. Otherwise paste a transformation whose row keys match your columns.4
Select event types
Subscribe to the event types you want to store. All subscribed types land in the same table, so confirm the transformation produces valid rows for each one.5