Integrations
Sources
Incoming webhooks
WorkOS

How to connect WorkOS to Knock

Learn how to use WorkOS webhooks to trigger notifications and manage users in Knock.

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

Prerequisites

#
  • A WorkOS account with access to the Webhooks settings
  • 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 WorkOS 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

Add the webhook endpoint in WorkOS

In your WorkOS Dashboard, go to Webhooks and click "Create Webhook Endpoint." Paste the Knock webhook URL.

4

Copy the signing secret

After creating the endpoint in WorkOS, copy the Secret from the endpoint configuration.

5

Paste the signing secret in Knock

Back in the Knock dashboard, paste the WorkOS signing secret into the source configuration. Knock uses this to verify that incoming webhooks are from WorkOS.

6

Review event mappings

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

Pre-configured events

#

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

Directory sync events

#
WorkOS eventSuggested actionDescription
dsync.user.createdIdentify userCreates a user in Knock when a new user is provisioned via directory sync
dsync.user.updatedIdentify userUpdates user properties in Knock when directory user details change
dsync.user.deletedTrigger workflowNotifies relevant parties when a directory user is deprovisioned
dsync.group.createdSet objectCreates an object in Knock when a new directory group is created
dsync.group.updatedSet objectUpdates object properties when group details change
dsync.group.deletedDelete objectRemoves an object from Knock when a directory group is deleted
dsync.group.user_addedSubscribe userSubscribes a user to an object when they are added to a directory group
dsync.group.user_removedUnsubscribe userUnsubscribes a user from an object when they are removed from a directory group

SSO events

#
WorkOS eventSuggested actionDescription
connection.activatedTrigger workflowNotifies admins when an SSO connection is activated
connection.deactivatedTrigger workflowAlerts admins when an SSO connection is deactivated

Customization

#

You can modify any of the pre-configured mappings or create new ones for additional WorkOS event types. When customizing field mappings, use dot notation to reference nested fields in the WorkOS webhook payload (e.g. data.emails[0].value).

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

New chat