PostHog integration: connect PostHog to Polylane
Connect PostHog events, insights, flags and session replays to Polylane through OAuth. Investigate a rollout using product behavior and error evidence.
Get started for freeHow to set up PostHog
- Select PostHog in Polylane and start its OAuth authorization flow.
- Choose one project on PostHog’s consent screen and review the requested scopes.
- Complete authorization and return to the integration. Query that project’s analysis and rollout context from an investigation.
Permissions and access
OAuth reads include project, query, event_definition, property_definition and action; insight, dashboard, notebook and alert; feature_flag, experiment and activity_log; error_tracking, logs, metrics and tracing; session_recording, person, cohort and group. Additional API reads cover organization, warehouse tables/views and integrations. annotation:write and dashboard:write allow approved annotation creation and dashboard pin/unpin changes. The client also requests hog_function:write for integration provisioning; the agent API tool does not expose arbitrary Hog function writes. The documented agent writes are annotations and dashboard pins, not feature-flag or event mutations.
Discovery, refresh and the connected view
PostHog tools query product data and read saved analysis, flags, experiments, errors and replay metadata in the authorized project. The project chosen at consent defines the investigation scope. This is a product-analysis tool connection, not a cloud inventory scan; no cloud-resource fifteen-minute sync cadence is claimed for it. The replay tool uses bounded recording filters, reads playlist and recording metadata, and returns replay links. It never fetches replay snapshots. When a recording query returns a running query status, the status action resumes it to retrieve completed results rather than starting another query.
Example workflow
Investigate a conversion drop during a feature rollout. Read the flag and experiment context, compare saved insights with event queries, and find affected session recordings and audiences. Correlate those sessions with error evidence in the same project, then create an approved annotation marking the incident window for later analysis.
Disconnect and revoke access
Disconnect PostHog in Polylane. This leaves the authorized application in PostHog; remove it under Settings → Connected applications to revoke authorization at the provider.
Tools for the investigation.
What Polylane can do with PostHog while it investigates. Every call is recorded in the transcript.
posthogQuery Query PostHog analytics or discover the event and property vocabulary for a bounded date range
posthogInsights Read the PostHog insights, dashboards, alerts and notebooks the team watches
posthogChanges Read PostHog feature flags, experiments, releases and activity that explain what changed
posthogAnnotations List PostHog project annotations before recording a new event
posthogErrors Read PostHog error-tracking issues, their events, stack frames and spike history
posthogReplays Read PostHog session recordings and playlists to understand what users saw
posthogApi Call the connected PostHog REST API
PostHog setup and troubleshooting
Common questions.
Which PostHog project can agents read?
The project you choose on the OAuth consent screen. The connection does not authorize arbitrary projects in your organization.
Can agents change my PostHog feature flags?
The documented write surface is approved annotations and dashboard pin/unpin changes. Feature flags and experiments are read for investigation context.
Does Polylane download PostHog replay snapshots?
No. The replay tool reads recording and playlist metadata and returns replay links. It does not fetch replay snapshots.