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

2
Start connection
Click “Connect” to begin the setup process

3
Authorize with Fivetran
AstroBee uses Fivetran to securely connect to PostHog. Click “Continue” to proceed
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.
Configure your PostHog connection:Region: Select your PostHog data region (US or EU)Access Token: Create a Personal API key in PostHog

- Log in to your PostHog Cloud account
- Click your account in the top right corner, then click the gear icon to access Account settings
- Navigate to the Personal API keys section
- Click “Create personal API key”
- Copy the key and paste it into the Access Token field
- How to create and manage API keys
- Understanding PostHog’s data structure
- Best practices for data syncing
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:
Click “Save” to complete the setup
- 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

6
Connection complete
Your PostHog connection is now active and appears in “My Sources”

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:- Navigate to the Sources page
- Find your PostHog connection
- Click the “Sync now” button
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
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:- Navigate to the connection settings
- 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.Invalid Access Token
Invalid Access Token
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
Wrong region selected
Wrong region selected
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
No events syncing
No events syncing
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)
Sync taking too long
Sync taking too long
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
Missing cohorts or persons
Missing cohorts or persons
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