> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# PostHog connector

- Connector: `appmixer.posthog`
- Version: 1.1.0
- Components: 14 (2 triggers, 12 actions)

PostHog is an open-source product analytics platform. Capture events, manage persons, query analytics data with HogQL, list cohorts and feature flags, and create annotations.

- Connector page: <https://connectors.appmixer.com/connector/appmixer.posthog/1.1.0>
- Documentation: <https://docs.appmixer.com/connector-configuration/posthog>
- Source code: <https://github.com/clientIO/appmixer-connectors/tree/dev/src/appmixer/posthog>
- Download package: <https://connectors.appmixer.com/connector/appmixer.posthog/1.1.0/download>

## Authentication

**Type:** API Key

**Fields:**

- `PostHog Host` (text): Base URL of your PostHog instance. US Cloud: https://us.posthog.com, EU Cloud: https://eu.posthog.com, or your self-hosted URL.
- `Personal API Key` (text): Generate a Personal API key in PostHog under Settings → User → Personal API Keys.

## Triggers (2)

- [New Action Event](https://connectors.appmixer.com/connector/appmixer.posthog/1.1.0/component/appmixer.posthog.core.NewActionEvent.md) (`appmixer.posthog.core.NewActionEvent`): Triggers when PostHog delivers a matched event to this component's webhook URL. Setup: start the flow, copy the webhook URL from the flow log, then in PostHog create a realtime destination (Data pipelines → Destinations → HTTP Webhook) pointing to that URL, optionally filtered by an action.
- [New Annotation](https://connectors.appmixer.com/connector/appmixer.posthog/1.1.0/component/appmixer.posthog.core.NewAnnotation.md) (`appmixer.posthog.core.NewAnnotation`): Triggers when a new annotation is created in a PostHog project.

## Actions (12)

- [Capture Event](https://connectors.appmixer.com/connector/appmixer.posthog/1.1.0/component/appmixer.posthog.core.CaptureEvent.md) (`appmixer.posthog.core.CaptureEvent`): Capture a single event in PostHog. The event is sent to the project's ingestion endpoint using the public Project API key.
- [Create Annotation](https://connectors.appmixer.com/connector/appmixer.posthog/1.1.0/component/appmixer.posthog.core.CreateAnnotation.md) (`appmixer.posthog.core.CreateAnnotation`): Create an annotation in a PostHog project. Annotations mark important moments (releases, campaigns) on analytics charts.
- [Delete Annotation](https://connectors.appmixer.com/connector/appmixer.posthog/1.1.0/component/appmixer.posthog.core.DeleteAnnotation.md) (`appmixer.posthog.core.DeleteAnnotation`): Delete an annotation from a PostHog project by its annotation ID.
- [Delete Person](https://connectors.appmixer.com/connector/appmixer.posthog/1.1.0/component/appmixer.posthog.core.DeletePerson.md) (`appmixer.posthog.core.DeletePerson`): Delete a person from a PostHog project by their person ID. This action is irreversible.
- [Find Persons](https://connectors.appmixer.com/connector/appmixer.posthog/1.1.0/component/appmixer.posthog.core.FindPersons.md) (`appmixer.posthog.core.FindPersons`): Search for persons in a PostHog project. Returns a maximum of 100 persons per call.
- [Get Person](https://connectors.appmixer.com/connector/appmixer.posthog/1.1.0/component/appmixer.posthog.core.GetPerson.md) (`appmixer.posthog.core.GetPerson`): Retrieve a single person from a PostHog project by their person ID.
- [Identify User](https://connectors.appmixer.com/connector/appmixer.posthog/1.1.0/component/appmixer.posthog.core.IdentifyUser.md) (`appmixer.posthog.core.IdentifyUser`): Identify a user in PostHog by sending an $identify event with person properties ($set).
- [List Cohorts](https://connectors.appmixer.com/connector/appmixer.posthog/1.1.0/component/appmixer.posthog.core.ListCohorts.md) (`appmixer.posthog.core.ListCohorts`): List cohorts in a PostHog project. Returns a maximum of 100 cohorts per call.
- [List Feature Flags](https://connectors.appmixer.com/connector/appmixer.posthog/1.1.0/component/appmixer.posthog.core.ListFeatureFlags.md) (`appmixer.posthog.core.ListFeatureFlags`): List feature flags in a PostHog project. Returns a maximum of 100 feature flags per call.
- [List Projects](https://connectors.appmixer.com/connector/appmixer.posthog/1.1.0/component/appmixer.posthog.core.ListProjects.md) (`appmixer.posthog.core.ListProjects`): List all PostHog projects the authenticated user has access to. Returns a maximum of 100 projects.
- [Run Query](https://connectors.appmixer.com/connector/appmixer.posthog/1.1.0/component/appmixer.posthog.core.RunQuery.md) (`appmixer.posthog.core.RunQuery`): Run a HogQL (SQL-like) query against a PostHog project's analytics data and return the result rows.
- [Make API Call](https://connectors.appmixer.com/connector/appmixer.posthog/1.1.0/component/appmixer.posthog.core.MakeApiCall.md) (`appmixer.posthog.core.MakeApiCall`): Perform an arbitrary authorized API call to the PostHog API.

## Changelog

### 1.1.0

- New component Delete Annotation. PostHog soft-deletes annotations, the same as deleting one in the PostHog UI.
- Find Persons: new optional Distinct ID input returns only the person with exactly that distinct ID.

### 1.0.2

- Quote CSV cells that hold a comma, a double quote or a line break and map cells by header column when exporting results to a file.

### 1.0.1

- MakeApiCall: Request Headers and Query Parameters set in the Designer are now sent. They were silently dropped: the key-value field stores its rows as a JSON object string, which the component did not parse.

### 1.0.0

- Initial release.
