# PostHog

> Let the Coder list open PostHog support tickets and file one when a bug turns up. Coming soon: filing a ticket always waits for your Approve.

Status: Coming soon

PostHog's Support inbox is where your users' problems arrive. Connect it and the Coder can list new and open tickets, and file a ticket when it finds a bug. If the bug came from [Sentry](/docs/integrations/sentry), the ticket carries the details.

> [!SOON]
> PostHog is Coming soon.

## At a glance

| | |
| --- | --- |
| Category | Errors and support |
| Status | Coming soon |
| Used by | Coder, Marketing, Product owner (only the Coder is available now) |

## What assistants can do

| Ability | How it runs |
| --- | --- |
| List new and open support tickets | Reads on its own |
| File a support ticket | Waits for your Approve (always, with no Auto-approve switch) |

## Setup (when it opens)

1. In PostHog, turn on Support (Support, then Settings, then Enable support).
2. Create a personal token with permission to read tickets, and copy your project token (the one that starts with "phc_").
3. Open [Integrations](https://stellarfirm.ai/app/integrations) and pick **PostHog**.
4. Paste both tokens and press **Connect**. Either one alone connects, but you need the personal token to read tickets and the project token to file them.

## Permissions

In plain words, the two tokens do different jobs:

- The **personal token** needs permission to **read tickets**. It lists the tickets in your inbox.
- The **project token** lets the Coder **file** a ticket. It is a public project identifier, not a secret that lets anyone read your data.

Neither token needs to reply to, close, or delete tickets, and the Coder does none of these.

## Good to know

- Filing a ticket always waits for your Approve. No Auto-approve setting covers it.
- Replying, closing, and deleting tickets stay in PostHog. The Coder points you there instead.
- Tickets are filed as the requester "StellarFirm". No email address, person, or page address is attached.
- StellarFirm works out which PostHog region your project is in on first use.
- Your token stays with your StellarFirm workspace and is never shown back to you. The page shows only that it is connected.

## Prompts

```prompt title="Check the inbox"
Coder, list the new and open support tickets in PostHog and group them by theme.
```

```prompt title="File from an error"
Coder, read Sentry issue [short id] and file a PostHog support ticket for it. Do not file until I Approve.
```

```prompt title="Turn a ticket into work"
Coder, read PostHog ticket [id], tell me what you think is wrong, and propose the smallest fix.
```

---

Source: https://stellarfirm.ai/docs/integrations/posthog
