Segment source
Receive Segment webhook events in Knock to trigger workflows and keep user data in sync with track and identify events.
The Segment source enables you to receive Segment webhook events directly in Knock. Segment sends webhook callbacks when track and identify events flow through your workspace. Knock verifies each payload using your Segment webhook signing secret, identifies the event type, and executes the actions you configure.
This integration is useful for triggering notification workflows from track events, such as alerting users when key actions happen in your product, or syncing user data into Knock from identify events so recipient profiles stay up to date.
Knock supports ingesting any of Segment's supported events, so you can map them to actions as your needs evolve.
Prerequisites
#- A Knock account with at least one environment configured.
- A Segment workspace with access to webhook or destination settings.
Getting started
#Once configured, Segment sends webhook events to Knock in real time. You can verify that events are arriving by checking the event logs on the source environment page.
Pre-configured events
#Segment sends events based on the Segment spec. Below are common event types you might map to actions in Knock.
See the Segment spec documentation for the full list of available event types and their schemas.
Customization
#You can modify the default action mappings or add new ones for any event type Knock receives from Segment. For details on how field mapping works with dot-notation paths, see the custom source page.
If you need to map Segment events to actions beyond triggering workflows, see the full list of available actions in the sources overview.
Event idempotency
#Knock uses the messageId field from the Segment event spec as the idempotency key. Segment includes a messageId in every track and identify event by default, so no additional field configuration is needed.
You can change the idempotency key field or disable idempotency checks from the Settings tab in your source environment configuration. Events without an idempotency key attribute are processed normally.
For details on how Knock handles idempotent events, key validation rules, and the default 24-hour idempotency window, see the source event idempotency section of the sources overview.




