The Snowflake connector inserts Novu webhook events into a Snowflake table. Each batch of webhooks becomes a single parameterized INSERT statement. Use it when notification data belongs in your Snowflake warehouse alongside other analytics sources.
Novu webhook delivery is powered by Svix. This connector maps to the Svix Snowflake advanced endpoint.
Outbound webhooks are available on Team and Enterprise plans.
Prerequisites#
- A Snowflake account and its account identifier in
organization-accountform, for exampleab12345-xs67890. - An RSA key pair, with the public key assigned to a Snowflake user. This connector authenticates with key-pair JWT authentication, not a password. See key-pair authentication.
- The destination table created before you enable the endpoint. The connector does not create or alter tables.
Configuration#
| Field | Required | Description |
|---|---|---|
| Account identifier | Yes | Account identifier in organization-account form, for example ab12345-xs67890. |
| User ID | Yes | The Snowflake user the public key is assigned to. |
| Private key | Yes | The PEM encoded private key that matches the assigned public key. |
| Database name | Only without a transformation | Database that receives the rows. |
| Schema name | Only without a transformation | Schema that contains the table. |
| Table name | Only without a transformation | Table that receives the rows. |
| Transformation | No | JavaScript that returns the SQL statement and bindings to run. |
When you set a transformation, the statement names the target table directly, so database, schema, and table become optional.
Authentication and permissions#
Generate an RSA key pair, assign the public key to the Snowflake user, and paste the complete matching private key into the connector.
Svix does not publish a required privilege list. Scope the user with Snowflake GRANT so it can insert into one table and nothing else:
The connector configuration has no warehouse field. Set a default warehouse and default role on the Snowflake user with the DEFAULT_WAREHOUSE and DEFAULT_ROLE properties of CREATE USER so statements have compute to run on.
Default destination behavior#
Without a transformation, Svix inserts into the table identified by the database, schema, and table fields using three columns. It generates a unique id, sets created_at to the insert time, and writes the raw payload to payload:
The table must exist before you enable the endpoint.
Create an analytics table#
Transformation contract#
The transformation shapes each batch into one SQL statement:
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
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.
- Output: an object with
statementandbindings. statementis the SQL to execute, referencing bindings by name, for example:subscriber_id.bindingsis column-oriented. It is an object keyed by binding name, and each binding has a Snowflaketypeand avaluearray holding one entry per row in the batch. All arrays must be the same length.- Send every value as a string. For allowed types, see using bind variables in a statement.
Novu-oriented example that matches the analytics table above and reads message fields from event.payload.data.object:
Use the FIXED type for numeric columns, and still push the value as a string.
Configure in the Dashboard#
Enter connection details#
Enter the account identifier, user ID, and private key. Fill in database, schema, and table if you are relying on the default insert behavior.
Configure the transformation#
Paste a transformation whose statement names your table and whose bindings match its columns.
Select event types#
Subscribe to the event types you want to store. Every subscribed type runs through the same statement, so confirm each binding array is filled for all of them.
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#
Troubleshooting#
| Symptom | What to check |
|---|---|
| JWT or authentication errors | The private key does not match the public key assigned to the user, the account identifier is wrong, or the key was pasted with missing lines. Key-pair authentication is required, so a password will not work. |
| No active warehouse errors | The user has no default warehouse, or no USAGE grant on it. The connector configuration has no warehouse field. |
| Insufficient privileges | The role is missing USAGE on the database or schema, or INSERT on the table. |
| Binding count errors | The value arrays have different lengths. Push one entry per event to every binding, including when a field is missing. |
| Type or conversion errors | A value was pushed as a number or object. Send strings, and use FIXED for numeric columns. |
| Table not found | Database, schema, and table fields are only used without a transformation. With a transformation, the fully qualified name in the statement is what matters. |
| Statement runs but no rows appear | The statement targets a different database or schema than the one you are querying. Check the fully qualified name in the transformation. |