# Connect PostHog to your AI client

> Connect PostHog to Bonnard through a read-only OAuth grant to one project, the first step to querying it from Claude, ChatGPT or another AI client.

Updated: 2026-10-12

To chart PostHog data in Claude, ChatGPT or another AI client, connect it here, then create an app on it.
Bonnard reads PostHog through a read-only grant to one project, so your apps query only that project.

## Requirements

- The Admin role in your Bonnard workspace.
- A PostHog Cloud project in the US or EU region, and a PostHog login that can open it. Self-hosted PostHog is not
  supported.
- A project that is not already connected in this workspace.

## 1. Open PostHog from the Data page

In the console at `app.bonnard.ai`, select **Data**, then **PostHog** under **Integrations**. PostHog opens in the same
tab.

[Image: The Data page with PostHog under Integrations]

## 2. Approve access in PostHog

Sign in to PostHog, choose the organization and the project, and approve access. Bonnard asks to run read-only queries
on that project and to read its event and property definitions: the `query:read`, `event_definition:read` and
`property_definition:read` scopes, plus `openid`.

PostHog asks for approval every time, and the grant covers that one project. PostHog then sends you back to Bonnard,
which finds the project's region and reads its tables.

## 3. Check the connection

You land on the connection's page, named after the project. On **Overview**, the **Connection** card shows
**Connected** and the project. **Tables (N)** shows the number of tables discovered.

[Image: The PostHog connection, Connected, with its project]

Apps on a PostHog connection are for your own team only. Their audience is locked to **Internal**, and there is no
tenancy step.

If you deleted a connection to this project before, connecting the same project again brings it back with its
dashboards and charts.

## Troubleshooting

- `Couldn't connect PostHog. You may have declined access, or the request expired.` This banner on the **Data** page
  means nothing was saved. You declined, took over 10 minutes, granted no project or several, chose a project already
  connected here, or changed Bonnard user or workspace before approving. Select **Try again**.
- `Could not connect PostHog` Bonnard could not start the sign-in. Check that you have the Admin role, then select
  **PostHog** again.
- **Needs reauthorization** on the **Connection** card, with a warning icon on the connection's tile on the **Data**
  page. PostHog stopped accepting Bonnard's access, for example after someone revoked it under
  **Connected applications** in PostHog, or selected **Disconnect** here. Select **Reconnect** and approve the same
  project. Another project fails.
- `This PostHog connection needs reauthorization. A workspace admin can reconnect it from the Data tab in the console.`
  Agents get this until you reconnect. Select **Reconnect** as above.

## Charts in your AI client

[Create an app](https://bonnard.ai/docs/apps/create-an-app.md) on this connection, so AI clients such as Claude and ChatGPT can query it and draw charts for your team.
Select **Create app** on the connection's **Used by** card.
