
GitBook
Let AI connect your sources for you
Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

Connect GitBook to PostHog to sync your data into the PostHog data warehouse for analysis and modeling.
Enter your GitBook API token to pull your documentation workspace into the PostHog Data warehouse.
You can create a personal access token under Account settings → Developer in GitBook. The token inherits your account permissions and grants read access to your organizations, spaces, collections, sites, members, teams, change requests, and comments.
Configuration
| Option | Type | Required |
|---|---|---|
API token | password | Yes |
Linking GitBook to PostHog
- Go to the Data pipeline page in PostHog
- Click New source and select GitBook
- Fill in the required configuration fields
- Click Next, select the tables you want to sync, and then press Import
Supported tables
| Table | Description | Sync method | Incremental field | Primary key |
|---|---|---|---|---|
organizations | Organizations the API token's owner is a member of. An organization is the top-level workspace that owns spaces, collections, sites, and members. | Full refresh | — | — |
spaces | Spaces across every organization the token can access. A space is a single project of documentation content. | Full refresh | — | — |
collections | Collections across every organization the token can access. A collection groups spaces (and nested collections) together. | Full refresh | — | — |
sites | Published documentation sites across every organization the token can access. | Full refresh | — | — |
members | Organization memberships across every organization the token can access. One row per user per organization. | Full refresh | — | — |
teams | Teams across every organization the token can access. Teams group organization members for access management. | Full refresh | — | — |
change_requests | Change requests across every organization the token can access. A change request is a proposed set of edits to a space's content, similar to a pull request. | Full refresh | — | — |
comments | Comments posted on spaces across every organization the token can access. | Full refresh | — | — |