Today we're releasing data sources. With Knock data sources, you can connect events from any tool to your messaging infrastructure in a few clicks, no code required.

When events occur in your other services—like a new user in Clerk, a payment in Stripe, or a directory sync event in WorkOS—you can send that event data to Knock to create users, trigger workflows, and update audiences. Knock ingests, verifies, and transforms the event data for you to take action on.

Pre-built sources

We're shipping five pre-configured data sources: Stripe, Supabase, PostHog, Clerk, and WorkOS. For each, we've handled verification schemes and created pre-configured action mappings so you can get set up with a few clicks.

Pre-built data source integrations

Build your own source

For any other providers, use our custom data source to map any event to an action in Knock. Custom sources include a flexible JavaScript scripting framework to process, validate, and transform incoming requests.

Configuring a custom data source in Knock

This function runs whenever an event is received and before any actions are processed, enabling you to write your own logic to verify a payload and transform properties to better match how they're used in Knock messaging.

async function main(ctx) {
  const { headers, rawBody, body, vars } = ctx;
  const verified = await verifyHmacSha256({
    secret: vars["SERVICE_SIGNING_SECRET"],
    signature: headers["x-webhook-signature"],
    payload: body,
  });
  const full_name = `${body.first_name} ${body.last_name}`;
  return {
    verified,
    full_name,
  };
}

Get started

Data sources are available today for all Knock customers. Head to "Settings > Sources" in the dashboard, or read more in our documentation.