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
| Operation | ID | Description | Trigger |
|---|---|---|---|
| Create Action | create_action | ||
| Get Action | get_action | ||
| List Actions | list_actions |
Advanced
| Operation | ID | Description | Trigger |
|---|---|---|---|
| Custom Request | raw_request | Call any authenticated PostHog REST endpoint (covers the huge long tail). | |
| List Activity Log | list_activity_log |
Annotations
| Operation | ID | Description | Trigger |
|---|---|---|---|
| Create Annotation | create_annotation | ||
| Delete Annotation | delete_annotation | ||
| List Annotations | list_annotations | ||
| Update Annotation | update_annotation |
Batch exports
| Operation | ID | Description | Trigger |
|---|---|---|---|
| Get Batch Export | get_batch_export | ||
| List Batch Exports | list_batch_exports |
Cohorts
| Operation | ID | Description | Trigger |
|---|---|---|---|
| Add Persons to Static Cohort | add_persons_to_cohort | ||
| Create Cohort | create_cohort | ||
| Delete Cohort | delete_cohort | ||
| Get Cohort | get_cohort | ||
| List Cohort Persons | list_cohort_persons | ||
| List Cohorts | list_cohorts | ||
| Update Cohort | update_cohort |
Dashboards
| Operation | ID | Description | Trigger |
|---|---|---|---|
| Create Dashboard | create_dashboard | ||
| Delete Dashboard | delete_dashboard | ||
| Get Dashboard | get_dashboard | ||
| List Dashboards | list_dashboards | ||
| Update Dashboard | update_dashboard |
Definitions
| Operation | ID | Description | Trigger |
|---|---|---|---|
| List Event Definitions | list_event_definitions | ||
| List Property Definitions | list_property_definitions |
Early access
| Operation | ID | Description | Trigger |
|---|---|---|---|
| Create Early Access Feature | create_early_access_feature | ||
| List Early Access Features | list_early_access_features |
Events
| Operation | ID | Description | Trigger |
|---|---|---|---|
| List Events | list_events | List recent events. |
Experiments
| Operation | ID | Description | Trigger |
|---|---|---|---|
| Create Experiment | create_experiment | ||
| Experiment Action | experiment_action | ||
| Get Experiment | get_experiment | ||
| List Experiments | list_experiments | ||
| Update Experiment | update_experiment |
Feature flags
| Operation | ID | Description | Trigger |
|---|---|---|---|
| Create Feature Flag | create_feature_flag | ||
| Delete Feature Flag | delete_feature_flag | ||
| Get Feature Flag | get_feature_flag | ||
| Get Local Evaluation Payload | feature_flag_local_evaluation | ||
| List Feature Flags | list_feature_flags | ||
| List My Feature Flags | list_my_feature_flags | ||
| Update Feature Flag | update_feature_flag |
Groups
| Operation | ID | Description | Trigger |
|---|---|---|---|
| Find Group | find_group | ||
| List Group Types | list_group_types | ||
| List Groups | list_groups |
Ingestion
| Operation | ID | Description | Trigger |
|---|---|---|---|
| Batch Capture | batch_capture | Capture a batch of events. | |
| Capture Event | capture_event | Capture a single event. | |
| Evaluate Feature Flags | evaluate_flags | Evaluate feature flags for a person. | |
| Group Identify | group_identify | Set properties on a group ($groupidentify). | |
| Identify Person | identify | Identify a person and set their properties ($identify). |
Insights
| Operation | ID | Description | Trigger |
|---|---|---|---|
| Create Insight | create_insight | ||
| Delete Insight | delete_insight | ||
| Get Insight | get_insight | ||
| List Insights | list_insights | ||
| Update Insight | update_insight |
Notebooks
| Operation | ID | Description | Trigger |
|---|---|---|---|
| Create Notebook | create_notebook | ||
| Get Notebook | get_notebook | ||
| List Notebooks | list_notebooks |
Organization
| Operation | ID | Description | Trigger |
|---|---|---|---|
| Invite Org Member | create_org_invite | ||
| List Org Invites | list_org_invites | ||
| List Org Members | list_org_members | ||
| List Projects | list_projects | ||
| List Roles | list_roles |
Persons
| Operation | ID | Description | Trigger |
|---|---|---|---|
| Bulk Delete Persons | bulk_delete_persons | ||
| Delete Person | delete_person | ||
| Get Person | get_person | ||
| List Persons | list_persons | ||
| Split Person | split_person | ||
| Update Person | update_person |
Query
| Operation | ID | Description | Trigger |
|---|---|---|---|
| Run Query (HogQL) | run_query | Run a HogQL / structured query via the Query API (the universal read primitive). |
Session replay
| Operation | ID | Description | Trigger |
|---|---|---|---|
| Delete Session Recording | delete_session_recording | ||
| Get Session Recording | get_session_recording | ||
| List Session Recordings | list_session_recordings |
Surveys
| Operation | ID | Description | Trigger |
|---|---|---|---|
| Create Survey | create_survey | ||
| Get Survey | get_survey | ||
| Get Survey Responses | get_survey_responses | ||
| Get Survey Stats | get_survey_stats | ||
| List Surveys | list_surveys | ||
| Survey Action | survey_action | ||
| Update Survey | update_survey |
Triggers
| Operation | ID | Description | Trigger |
|---|---|---|---|
| On Autocapture | on_autocapture | Fires on any autocaptured interaction ($autocapture). | Yes |
| On Custom Event | on_custom_event | Fires on a custom event you name (or every event with ’*’). | Yes |
| On Exception | on_exception | Fires when an exception/error is captured ($exception). | Yes |
| On Feature Flag Called | on_feature_flag_called | Fires when a feature flag is evaluated ($feature_flag_called). | Yes |
| On Group Identify | on_group_identify | Fires when a group is identified ($groupidentify). | Yes |
| On Identify | on_identify | Fires when a person is identified ($identify). | Yes |
| On Page Leave | on_pageleave | Fires when a user leaves a page ($pageleave). | Yes |
| On Pageview | on_pageview | Fires on every pageview ($pageview). | Yes |
| On Rageclick | on_rageclick | Fires when PostHog detects a rageclick ($rageclick). | Yes |
| On Screen View (Mobile) | on_screen | Fires on a mobile screen view ($screen). | Yes |
| On Set Person Properties | on_set_person_properties | Fires when person properties are set ($set). | Yes |
| On Survey Dismissed | on_survey_dismissed | Fires when a survey is dismissed (survey dismissed). | Yes |
| On Survey Response | on_survey_sent | Fires when a survey response is submitted (survey sent). | Yes |
| On Survey Shown | on_survey_shown | Fires when a survey is shown to a user (survey shown). | Yes |
| On Web Vitals | on_web_vitals | Fires on a web-vitals measurement ($web_vitals). | Yes |