Skip to main content

Authentication

This provider requires authentication.
  • api_key: PostHog API key (required: True, sensitive: True)
  • project_id: PostHog project ID (required: True, sensitive: False)
Certain scopes may be required to perform specific actions or queries via the provider. Below is a summary of relevant scopes and their use cases:
  • session_recording:read: Read PostHog session recordings (mandatory)
  • session_recording_playlist:read: Read PostHog session recording playlists
  • project:read: Read PostHog project data (mandatory)

In workflows

This provider can be used in workflows. As “step” to query data, example:
Check the following workflow example:

Provider Methods

The provider exposes the following Provider Methods. They are available in the AI Assistant.
  • get_session_recording_domains Get a list of domains from session recordings within a time period (action, scopes: session_recording:read, project:read)
    • hours: Number of hours to look back (default: 24)
    • limit: Maximum number of recordings to fetch (default: 100)
  • get_session_recordings Get session recordings within a time period (action, scopes: session_recording:read, project:read)
    • hours: Number of hours to look back (default: 24)
    • limit: Maximum number of recordings to fetch (default: 100)

Connecting with the Provider

API Key

To obtain the PostHog API key, follow these steps:
  1. Log in to your PostHog account.
  2. Navigate to “Project Settings” > “API Keys”.
  3. Create a new API key or use an existing one.
  4. Copy the API key value.

Project ID

To find your PostHog project ID:
  1. Log in to your PostHog account.
  2. The project ID is visible in your project settings or in the URL when you’re viewing your project.

Available Methods

The PostHog provider offers the following methods:

Get Session Recording Domains

Retrieve a list of domains from session recordings within a specified time period.

Get Session Recordings

Retrieve session recordings data within a specified time period.

Example Workflow

Here’s an example workflow that tracks domains from PostHog session recordings over the last 24 hours and sends a summary to Slack:

Notes

The PostHog provider requires the following scopes:
  • session_recording:read - Allows reading session recordings data
  • project:read - Allows reading project data
  • session_recording_playlist:read - Optional access to recording playlists