Integrations
Sources
PostHog

PostHog source

Receive PostHog webhook events in Knock to trigger workflows and automate actions based on product analytics events.

The PostHog source enables you to receive PostHog webhook events directly in Knock. PostHog sends webhook callbacks when actions fire in your product analytics, such as a user completing a key funnel step, a feature flag change, or a custom event you define. Knock verifies each payload, identifies the event type, and executes the actions you configure.

This integration is useful for building notifications triggered by product behavior: reaching out to users who complete onboarding milestones, alerting your team when a feature flag is changed, or triggering re-engagement workflows based on usage patterns.

Prerequisites

#

Getting started

#
1

Create the source in Knock

Navigate to Integrations > Sources in the Knock dashboard. Click "Create source" and select PostHog as the source type. Give it a name and description.

2

Copy the webhook URL

After creating the source, copy the webhook URL for the environment you want to configure.

3

Configure a webhook destination in PostHog

In PostHog, navigate to the Data pipelines section and add a new webhook destination. Paste the Knock webhook URL. You can configure which actions or events trigger the webhook.

4

Test the connection

Trigger a test action in PostHog and verify that the event appears in the Knock source event logs.

Once configured, PostHog sends webhook events to Knock when the specified actions or events fire. You can verify that events are arriving by checking the event logs on the source environment page.

Pre-configured events

#

PostHog webhook events are driven by the actions and events you configure in your PostHog project. Common scenarios include:

Event typeDescription
Action webhooksFired when a PostHog action matches (for example, a user clicks a specific button or views a key page)
Custom eventsFired when your application sends a custom event to PostHog that matches your webhook criteria
Feature flag changesFired when a feature flag is updated

The exact event types depend on how you configure your PostHog actions and webhook destinations. See the PostHog webhooks documentation for more details on available triggers and payload formats.

Customization

#

You can modify the default action mappings or add new ones for any event type Knock receives from PostHog. For details on how field mapping works with dot-notation paths, see the HTTP source page.

If you need to map PostHog events to actions beyond triggering workflows, see the full list of available actions in the sources overview.

New chat