Install
Capture events, identify users, evaluate feature flags, run HogQL queries, and manage persons, cohorts, insights, dashboards, experiments, surveys, and groups with PostHog.
- Open System, then Nodes.
- Find PostHog and click Install.
- Use the new nodes at once. You do not restart.
How it works
PostHog (posthog.api) is an action node in the PostHog package (@zerodot/posthog): Capture events, evaluate feature flags, run HogQL queries, and manage persons, cohorts, insights, and experiments with PostHog.
- Event: capture, capture many (batch), identify, create alias, identify group, get, get many
- Person: get, get many, update, update property, delete property, split, delete many
- Feature Flag: create, get, get many, update, delete, evaluate flags
- Cohort: create, get, get many, update, delete, get persons, add persons, remove person
- Insight: create, get, get many, update, delete
- Dashboard: create, get, get many, update, delete
- Annotation: create, get, get many, update, delete
- Action: create, get, get many, update, delete
- Query: run (HogQL or another query kind), get, cancel
- Experiment: create, get, get many, update, delete, launch, pause, resume, end, archive, duplicate, reset, ship variant
- Survey: create, get, get many, update, delete, launch, stop, get responses, get stats
- Session Recording: get, get many, update, delete, get console logs
- Group: create, get many, find, update property, delete property, get related, get types
Field names are the names of the PostHog API parameters, such as distinct_id and date_marker. Each create and update has the main fields. Additional Body takes a JSON object with all other API fields. The main fields replace the same fields in it. Filters on a list set the query parameters of that list.
Capture, batch, identify, alias, identify group, and evaluate flags use the public endpoints (/i/v0/e/, /batch/, /flags/). They use the project API key and no personal API key. All other operations use the private REST API of the project.
PostHog does not hard delete flags, cohorts, insights, dashboards, annotations, actions, and experiments. For these, Delete marks the item as deleted (PATCH with deleted: true). Surveys and session recordings use a real DELETE. The API has no delete call for one person. Use Delete Many with ids or distinct_ids.
A list can return all items (at most 5000) or a limit. The node follows the pages of PostHog. Get Types of a group has no pages.
When PostHog gives an error, the node fails with the message, a short help text, and the error code. A rate limit (HTTP 429) gives the time to wait from Retry-After.
There is no trigger. Use PostHog destinations to send events to a webhook.
Logins it can use
PostHog API (posthog.apiKey):
region: US Cloud, EU Cloud, or Custom Host for a self-hosted PostHog.host: the address of your PostHog. Only for Custom Host.personalApiKey: from Account settings > Personal API keys. Give it the scopes that the operations need.projectId: the number in the address of the project.projectApiKey: optional. From Project settings. Only capture, batch, identify, alias, identify group, and evaluate flags need it.
The Test button reads the project.
Guides and related hubs
Add PostHog from System > Nodes without restarting.
All Analytics nodesConnect PostHog, Mixpanel, DataForSEO, Google Analytics, and product telemetry sources to automated pipelines.
Use credentialsAES-256-GCM encrypted API keys and OAuth2 connections.
Compare alternativesCompare zerodot with n8n, Zapier, Windmill, and Activepieces.