Skip to main content
The PostHog node adds PostHog operations to your workflows. Add it on the canvas or ask the AI builder for it by name, then pick an operation and fill in its fields. PostHog also includes 15 trigger operations (marked in the tables below) that can start a workflow when something happens in PostHog.
You can wire the PostHog node into an AI agent as a tool provider: the agent calls the operations you allow. See Agent tools.

Credentials

Connect PostHog under Credentials in the node settings. See Connecting credentials for the general flow.

Personal API key

Enter the values manually when creating the credential. Get your credentials here.

Project API key

Enter the values manually when creating the credential. Get your credentials here.

OAuth

Sign in with your PostHog account when prompted; no keys to copy. Get your credentials here.

Operations

Actions

OperationIDDescriptionTrigger
Create Actioncreate_action
Get Actionget_action
List Actionslist_actions

Advanced

OperationIDDescriptionTrigger
Custom Requestraw_requestCall any authenticated PostHog REST endpoint (covers the huge long tail).
List Activity Loglist_activity_log

Annotations

OperationIDDescriptionTrigger
Create Annotationcreate_annotation
Delete Annotationdelete_annotation
List Annotationslist_annotations
Update Annotationupdate_annotation

Batch exports

OperationIDDescriptionTrigger
Get Batch Exportget_batch_export
List Batch Exportslist_batch_exports

Cohorts

OperationIDDescriptionTrigger
Add Persons to Static Cohortadd_persons_to_cohort
Create Cohortcreate_cohort
Delete Cohortdelete_cohort
Get Cohortget_cohort
List Cohort Personslist_cohort_persons
List Cohortslist_cohorts
Update Cohortupdate_cohort

Dashboards

OperationIDDescriptionTrigger
Create Dashboardcreate_dashboard
Delete Dashboarddelete_dashboard
Get Dashboardget_dashboard
List Dashboardslist_dashboards
Update Dashboardupdate_dashboard

Definitions

OperationIDDescriptionTrigger
List Event Definitionslist_event_definitions
List Property Definitionslist_property_definitions

Early access

OperationIDDescriptionTrigger
Create Early Access Featurecreate_early_access_feature
List Early Access Featureslist_early_access_features

Events

OperationIDDescriptionTrigger
List Eventslist_eventsList recent events.

Experiments

OperationIDDescriptionTrigger
Create Experimentcreate_experiment
Experiment Actionexperiment_action
Get Experimentget_experiment
List Experimentslist_experiments
Update Experimentupdate_experiment

Feature flags

OperationIDDescriptionTrigger
Create Feature Flagcreate_feature_flag
Delete Feature Flagdelete_feature_flag
Get Feature Flagget_feature_flag
Get Local Evaluation Payloadfeature_flag_local_evaluation
List Feature Flagslist_feature_flags
List My Feature Flagslist_my_feature_flags
Update Feature Flagupdate_feature_flag

Groups

OperationIDDescriptionTrigger
Find Groupfind_group
List Group Typeslist_group_types
List Groupslist_groups

Ingestion

OperationIDDescriptionTrigger
Batch Capturebatch_captureCapture a batch of events.
Capture Eventcapture_eventCapture a single event.
Evaluate Feature Flagsevaluate_flagsEvaluate feature flags for a person.
Group Identifygroup_identifySet properties on a group ($groupidentify).
Identify PersonidentifyIdentify a person and set their properties ($identify).

Insights

OperationIDDescriptionTrigger
Create Insightcreate_insight
Delete Insightdelete_insight
Get Insightget_insight
List Insightslist_insights
Update Insightupdate_insight

Notebooks

OperationIDDescriptionTrigger
Create Notebookcreate_notebook
Get Notebookget_notebook
List Notebookslist_notebooks

Organization

OperationIDDescriptionTrigger
Invite Org Membercreate_org_invite
List Org Inviteslist_org_invites
List Org Memberslist_org_members
List Projectslist_projects
List Roleslist_roles

Persons

OperationIDDescriptionTrigger
Bulk Delete Personsbulk_delete_persons
Delete Persondelete_person
Get Personget_person
List Personslist_persons
Split Personsplit_person
Update Personupdate_person

Query

OperationIDDescriptionTrigger
Run Query (HogQL)run_queryRun a HogQL / structured query via the Query API (the universal read primitive).

Session replay

OperationIDDescriptionTrigger
Delete Session Recordingdelete_session_recording
Get Session Recordingget_session_recording
List Session Recordingslist_session_recordings

Surveys

OperationIDDescriptionTrigger
Create Surveycreate_survey
Get Surveyget_survey
Get Survey Responsesget_survey_responses
Get Survey Statsget_survey_stats
List Surveyslist_surveys
Survey Actionsurvey_action
Update Surveyupdate_survey

Triggers

OperationIDDescriptionTrigger
On Autocaptureon_autocaptureFires on any autocaptured interaction ($autocapture).Yes
On Custom Eventon_custom_eventFires on a custom event you name (or every event with ’*’).Yes
On Exceptionon_exceptionFires when an exception/error is captured ($exception).Yes
On Feature Flag Calledon_feature_flag_calledFires when a feature flag is evaluated ($feature_flag_called).Yes
On Group Identifyon_group_identifyFires when a group is identified ($groupidentify).Yes
On Identifyon_identifyFires when a person is identified ($identify).Yes
On Page Leaveon_pageleaveFires when a user leaves a page ($pageleave).Yes
On Pageviewon_pageviewFires on every pageview ($pageview).Yes
On Rageclickon_rageclickFires when PostHog detects a rageclick ($rageclick).Yes
On Screen View (Mobile)on_screenFires on a mobile screen view ($screen).Yes
On Set Person Propertieson_set_person_propertiesFires when person properties are set ($set).Yes
On Survey Dismissedon_survey_dismissedFires when a survey is dismissed (survey dismissed).Yes
On Survey Responseon_survey_sentFires when a survey response is submitted (survey sent).Yes
On Survey Shownon_survey_shownFires when a survey is shown to a user (survey shown).Yes
On Web Vitalson_web_vitalsFires on a web-vitals measurement ($web_vitals).Yes