PostHog
Developer ToolsCapture product events, manage persons and feature flags, run HogQL queries, and create annotations from your flows over the PostHog API. Works with US Cloud, EU Cloud, and self-hosted.
What This Integration Enables
FlowRunner agents use PostHog to keep product analytics fed and to act on what it shows. An agent can stream custom product events from any workflow into PostHog, sync and enrich person profiles, and run HogQL queries on demand to power reports, alerts, or downstream automations. It can manage feature flags to gate rollouts and annotate charts when releases or incidents occur. Ingestion uses the Project API Key; reads and management use the Personal API Key. What it does not do on its own is change a feature flag's rollout, because a flag change reaches real users the moment it lands. That approval stays with the product owner.
Without FlowRunner
With FlowRunner
Use Case Scenarios
Event streaming and verification
A workflow logs a conversion in another system. The agent calls Capture Event to mirror it into PostHog for product analysis, then runs a HogQL query with Run Query to confirm the event landed and to read a rollup by event type. It posts the snapshot to the product channel. Events that used to stay locked in one system now show up alongside the rest of the product data.
Profile enrichment and eligibility
The agent calls Update Person Properties to enrich a user's profile from another system, then checks their eligibility with Get Feature Flag before sending a targeted onboarding email. The right users get the right message, keyed off a live flag rather than a stale list.
Feature flag rollout with an approval gate
A release plan calls for widening a feature flag from ten percent to fifty percent of users. The agent drafts the change and posts the current and proposed rollout to the product channel. It does not apply it. Only after the product owner approves does the agent call Update Feature Flag, and it records the change and who approved it in the flow log.
Human-in-Loop Highlight
The human-in-loop moment in PostHog is the feature flag rollout gate. Capturing events, enriching persons, running queries, and creating annotations are all safe to automate, so the agent runs them by rule. Changing a feature flag's rollout is not, because it reaches real users immediately and can expose an unfinished feature or break an experiment. When a release plan calls for a rollout change, the agent posts the current and proposed conditions to the product channel and asks: "Widen the new-checkout flag from 10 percent to 50 percent of users. Approve?" A product owner approves. Only then does the agent call Update Feature Flag. The agent keeps analytics fed and profiles current on its own. A person owns the flag change that reaches users.
Agent Capabilities
20 actionsIngestion
3- Capture Event Send a custom product event into PostHog. Requires a Project API Key.
- Identify User Set person properties on a distinct ID. Requires a Project API Key.
- Create Alias Link two distinct IDs to the same person. Requires a Project API Key.
Persons
4- List Persons List the persons in the project.
- Get Person Retrieve a single person and their properties.
- Update Person Properties Update a person's properties. Used to enrich a profile from another system.
- Delete Person Delete a person and their data. Not reversible.
Events
2- List Events List recent events in the project.
- Get Event Retrieve a single event.
Insights
2- Run Query Run a HogQL query over the events and persons tables. Used to power a report or alert.
- List Insights List the saved insights in the project.
Feature Flags
5- List Feature Flags List the feature flags in the project.
- Get Feature Flag Retrieve a feature flag. Used to check a user's eligibility.
- Create Feature Flag Create a feature flag.
- Update Feature Flag Update a feature flag's rollout conditions. Used to gate a release, behind a human approval.
- Delete Feature Flag Delete a feature flag.
Cohorts
2- List Cohorts List the cohorts in the project.
- Get Cohort Retrieve a single cohort.
Annotations
2- Create Annotation Record an annotation to mark a release or incident on charts.
- List Annotations List the annotations in the project.
Start building with PostHog
$100 in credits. No card required. Connect in minutes.