PostHog
Query product and web analytics, replays, errors, logs and the data warehouse; create insights, dashboards, flags, experiments and surveys.
A PostHog connection gives a playbook's functions PostHog's MCP server, with every tool it lists. You sign in to PostHog and allow access to your organizations and projects, and the connection acts as you, in the projects you reach, whether your account is in PostHog's US or EU cloud.
Available on Auto Cloud and on self-hosted runtimes.
What a playbook can do with PostHog
- Run queries over your events, persons and properties, and read web analytics, heatmaps, actions, event and property definitions and the activity log.
- Read session recordings and their playlists, error tracking issues, and logs.
- Read the tables, views and external sources of the data warehouse.
- Create, change and delete insights, dashboards, feature flags, experiments and their holdouts and saved metrics, and surveys.
It reads no PostHog user management, billing or access control, and writes none of them: the connection asks the read scopes of what a playbook analyses and the write scopes of what it builds, and nothing of PostHog's identity and organization administration.
PostHog's MCP server lists its own tools when a function runs, and once you connect, your agent lists them with list_connection_tools.
An example workflow
An error triage, every morning. A schedule trigger runs the workflow at 08:00. A lookup function reads the error tracking issues that first appeared or spiked in the last day. A reasoning function reads each issue's message and stack, the session recordings PostHog links to it, and the release notes in its prompt, and decides which issues are new, which are known, and which touch the checkout, the ones the team treats as urgent. An interaction function creates a Linear issue for each new one through a Linear connection, with the PostHog issue linked and the reasoning function's summary, and posts the morning's list to the engineering channel through Slack. A second workflow, on an event trigger, builds a PostHog insight for a flag the team just rolled out, so the dashboard exists before anyone asks for it. Every query and its rows are in the run's history in Studio.
How to connect PostHog
- Sign in to PostHog and allow access to your organizations and projects. The consent screen shows the permissions listed below.
Then:
- Ask your agent to connect PostHog to Auto, or open Settings, Agents, Connections in Auto Studio and choose PostHog.
- On the Studio page, check the service and its access, choose which playbooks may use the connection, and approve it.
- Have your agent check one small read through the connection before a function depends on it.
What it needs
- A PostHog account in the organization, whose project access the connection has.
- Your agent connected to Auto and signed in as you, with permission to change your organization, if your agent adds the connection.
- On a self-hosted runtime, nothing to register: PostHog's authorization server takes a client Auto names by its metadata document or registers itself, or one you registered.
Permissions Auto asks for
- Read PostHog organizations.
- Read PostHog projects and their settings.
- Read PostHog user profiles.
- Run queries over PostHog data.
- Read PostHog actions.
- Read PostHog event definitions.
- Read PostHog property definitions.
- Read PostHog persons and their properties.
- Read the PostHog activity log.
- Read PostHog web analytics.
- Read PostHog heatmaps.
- Read PostHog session recordings.
- Read PostHog session recording playlists.
- Read PostHog error tracking issues and settings.
- Read PostHog logs.
- Read the tables of the PostHog data warehouse.
- Read the views of the PostHog data warehouse.
- Read the external data sources of the PostHog data warehouse.
- Read PostHog dashboard templates.
- Read, create, change and delete PostHog insights.
- Read, create, change and delete PostHog dashboards.
- Read, create, change and delete PostHog feature flags.
- Read, create, change and delete PostHog experiments.
- Read, create, change and delete the holdouts of PostHog experiments.
- Read, create, change and delete the saved metrics of PostHog experiments.
- Read, create, change and delete PostHog surveys.
Good to know
What a query answers, persons and their properties included, is kept in the run's history, where people with access to the playbook can read it. Add the connection with content recording off if that history should hold no PostHog data, or give the playbook a project with the data it needs and no more.