Integrations
Sources
Incoming webhooks
PostHog

How to connect PostHog to Knock

Learn how to use PostHog webhooks to trigger notifications and automate actions in Knock.

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

PostHog can send webhooks when actions are performed, feature flags are changed, or other events occur in your product analytics pipeline.

Prerequisites

#
  • A PostHog account with access to the project 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 PostHog 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 URL in PostHog

In your PostHog project settings, navigate to the webhooks configuration. Paste the Knock webhook URL as the destination.

4

Configure verification

Copy the webhook signing token from PostHog and paste it into the Knock source configuration so Knock can verify incoming requests.

5

Review event mappings

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

Pre-configured events

#

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

PostHog eventSuggested actionDescription
action.performedTrigger workflowSends a notification when a user performs a defined action in your product
feature_flag.updatedTrigger workflowNotifies relevant parties when a feature flag is changed

Customization

#

You can modify any of the pre-configured mappings or create new ones for additional PostHog event types. When customizing field mappings, use dot notation to reference nested fields in the PostHog webhook payload (e.g. data.person.properties.email).

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

New chat