Skip to main content
Use PostHog when a workflow needs product analytics. Run a HogQL query, pull event trends or funnel conversion, read saved insights and dashboards, look up persons, or list feature flags, session recordings, experiments, surveys and error-tracking issues, then pass the results to an AI step or a report.

Configuration

Before you configure this step, connect PostHog in Integrations for your workspace with your API key. If no active connection is available, the step shows a warning with a link to Integrations instead of the account selector.

Arguments form

When you select an action, the Arguments section renders a form driven by the action’s input schema. Fields that refer to existing records include dropdown pickers. Switch to the Raw JSON tab when you prefer to write the full arguments object by hand. Changes in either tab stay in sync.

Common actions

Destructive actions, such as deleting records, are not available in the workflow action picker.

Output

This step stores the PostHog response as the step output. The shape of the response depends on the action. Use the full output reference in later steps:

Example

  1. Open Integrations and connect PostHog if you have not already done that.
  2. Add a PostHog step to your workflow.
  3. Select a connected account in Authentication.
  4. Choose List projects in Action.
  5. Fill in the required fields. Use Insert Variable to reference an earlier step’s output for any field value.
  6. Click Run in the step header to test the action, then review the returned payload in Output.

Use cases

Weekly product metrics digest

  1. Get event trends
  2. Get funnel conversion
  3. List saved insights

Investigate a user

  1. Find persons by distinct ID
  2. Get person
  3. List session recordings

Review feature flags and experiments

  1. List feature flags
  2. Get feature flag
  3. List experiments

Notes

  • This step depends on a connected PostHog integration in your workspace.
  • The workflow action picker shows a curated set of actions. Agents with the PostHog tool can use more of them.

Using PostHog as an Agent Tool

You can also add PostHog as a tool in the Agent Editor. Open the agent, click Add tool, and select PostHog. In the tool settings panel, choose the connected account the agent should use. The agent calls PostHog actions when they are relevant to the conversation. See also: Integrations, Creating and Editing, and Testing and Iteration