Connecting PostHog

The Greppilot PostHog integration enables interaction with your PostHog project directly from the dashboard. It provides capabilities to query product analytics data, browse events, search users, inspect feature flags, and review saved insights.

Configuration

A PostHog Personal API Key is required for connection.

  1. In the Greppilot dashboard, navigate to Integrations.
  2. Select the PostHog integration.
  3. Provide your Personal API Key, Project ID, and optionally a custom host.

Generate a Personal API Key within your PostHog settings under Settings > Personal API Keys. Ensure the key possesses adequate permissions for desired operations.

PostHog Personal API Keys start with phx_. Keys are validated upon connection.

ParameterTypeDescriptionRequired
apiKeystringPersonal API Key from PostHog settings (starts with phx_).Yes
projectIdstringProject ID found in PostHog Project Settings.Yes
hoststringCustom PostHog host. Defaults to https://us.posthog.com.No

Available Tools

Upon successful connection, the following PostHog tools become available:

query

Run HogQL queries against PostHog data. HogQL is a SQL-like syntax supporting events, persons, sessions, and groups tables.

ParameterTypeDescriptionRequired
querystringHogQL query string.Yes
limitnumberMax rows to return. Default: 100, max: 500.No

list_events

List recent events with optional filtering.

ParameterTypeDescriptionRequired
eventstringFilter by event name.No
distinct_idstringFilter by user distinct ID.No
limitnumberMax events. Default: 50, max: 100.No
afterstringISO timestamp, return events after this time.No
beforestringISO timestamp, return events before this time.No

list_event_definitions

List all event types tracked in PostHog with their volume.

ParameterTypeDescriptionRequired
limitnumberMax results. Default: 100.No

list_persons

List users tracked in PostHog.

ParameterTypeDescriptionRequired
searchstringSearch by name or email.No
limitnumberMax results. Default: 50, max: 100.No

list_feature_flags

List all feature flags configured in the project.

Parameters: None


list_insights

List saved insights (trends, funnels, retention).

ParameterTypeDescriptionRequired
limitnumberMax results. Default: 50.No