Skip to main content
Connect PostHog to AstroBee to analyze product usage, user behavior, and event data. Get queryable access to events, users, sessions, cohorts, and more from your PostHog account.
Experimental feature: PostHog connector is currently in beta. We’re actively improving sync reliability and adding more features.

Prerequisites

  • A PostHog Cloud account hosted in the US or EU data region
  • Access to create a Personal API key in PostHog
  • Your PostHog base URL (e.g., app.posthog.com for US, eu.posthog.com for EU)

Connecting PostHog

1

Navigate to Sources

From the Sources page, click on “PostHog” in the Available Sources section
Sources page showing PostHog connector
2

Start connection

Click “Connect” to begin the setup process
Configure PostHog interface
3

Authorize with Fivetran

AstroBee uses Fivetran to securely connect to PostHog. Click “Continue” to proceed
Fivetran authorization screen
Fivetran ensures:
  • Secure: Data transfer is encrypted end-to-end and your credentials are never exposed
  • Private: Your data passes through without permanent storage
4

Configure connection settings

Follow the setup guide on the right for detailed configuration instructions from Fivetran.
PostHog connection configuration
Configure your PostHog connection:Region: Select your PostHog data region (US or EU)Access Token: Create a Personal API key in PostHog
  1. Log in to your PostHog Cloud account
  2. Click your account in the top right corner, then click the gear icon to access Account settings
  3. Navigate to the Personal API keys section
  4. Click “Create personal API key”
  5. Copy the key and paste it into the Access Token field
Follow the Fivetran PostHog setup guide for detailed configuration steps, including:
  • How to create and manage API keys
  • Understanding PostHog’s data structure
  • Best practices for data syncing
Click “Save & Test” to verify the connection
5

Select tables to sync

Back in AstroBee, your data is being synced from PostHog. This typically takes 10 seconds to 10 minutes depending on your data volume.Once synced, select which tables to include in your analysis. Common PostHog tables include:
  • event: User interactions and product events
  • person: User profiles and properties
  • person_name: User identification data
  • session: User session information
  • cohort: User cohorts and segments
  • project: PostHog project metadata
Select PostHog tables in AstroBee
Click “Save” to complete the setup
6

Connection complete

Your PostHog connection is now active and appears in “My Sources”
PostHog connection completed

What happens next

After connecting PostHog, you can create an ontology to start querying your product analytics data. Click “Create Ontology” to let AstroBee analyze your PostHog tables and generate a business model for natural language queries.

Syncing data

PostHog connections use manual sync - you control when data is refreshed. To sync your latest product analytics data:
  1. Navigate to the Sources page
  2. Find your PostHog connection
  3. Click the “Sync now” button
AstroBee will pull the latest events, users, sessions, and cohort data from PostHog.

Understanding PostHog data

PostHog syncs multiple related tables that work together:
  • Events data: Every user interaction tracked in your product
  • Person data: User profiles with properties and identification
  • Session data: Grouped user activities within a time window
  • Cohort data: User segments based on behavior or properties
  • Project metadata: Your PostHog project configuration
The exact tables and data available depend on your PostHog setup and which events you’re tracking.

Managing connections

One connection per PostHog account

PostHog is a one-to-many connector - one connection syncs all data from your PostHog account. You cannot selectively sync individual projects; the connector syncs all accessible projects.

Deleting a connection

To remove a PostHog connection:
  1. Navigate to the connection settings
  2. Click the “Remove connection” button
Deleting a connection removes all synced PostHog data from your warehouse. Any ontologies using this data will no longer work.

Troubleshooting

For additional help, see Fivetran’s PostHog troubleshooting guide.
Issue: Connection fails with invalid or expired API key error.Solution:
  • Verify you copied the entire API key from PostHog
  • Ensure the API key hasn’t been revoked or expired
  • Create a new Personal API key in PostHog and update your connection
  • Check that you’re using a Personal API key, not a project API key
  • Confirm you have the necessary permissions in PostHog
Issue: Connection fails or no data syncs after successful authentication.Solution:
  • Verify your PostHog account region (US: app.posthog.com, EU: eu.posthog.com)
  • Update the Region setting to match your PostHog account location
  • Recreate the connection with the correct region
  • Check your PostHog account settings to confirm the hosting region
Issue: Connection succeeds but event data is empty.Solution:
  • Verify your PostHog project is actively tracking events
  • Check that events have been captured recently in your PostHog dashboard
  • Ensure you selected the “event” table during setup
  • Trigger a manual sync to pull the latest data
  • Wait for initial sync to complete (can take 10+ minutes for large event datasets)
Issue: Initial sync appears stuck or is taking longer than expected.Solution:
  • Large event datasets (millions of events) can take 30+ minutes to sync
  • Check your internet connection
  • Avoid making changes to the connection during sync
  • PostHog’s API rate limits may slow down large syncs
  • If stuck for more than an hour, contact support at support@astrobee.ai
Issue: Some cohorts or user data don’t appear in synced tables.Solution:
  • Verify the cohorts exist in your PostHog dashboard
  • Ensure you selected the “cohort” and “person” tables during setup
  • Check that users have been identified (not just anonymous)
  • Trigger a new sync to pull the latest cohort and person data
  • Some cohorts may be empty if no users match the criteria

Next steps

I