Skip to content

RecipesPostHog

PostHog product

Pro

Signups, DAU, activation, and a Pro signup funnel on one board. Your agent holds a PostHog key with Query Read. Botopticon is not affiliated with PostHog.

Access

PostHog personal API key, Query Read on one project

Required. Env POSTHOG_PERSONAL_API_KEY, POSTHOG_PROJECT_ID, POSTHOG_HOST. Mode api_key.

  • query:read

In PostHog open your account Settings, then Personal API keys, then Create personal API key. Name it Botopticon board, give it only the Query Read scope, and limit it to the one project you want shown. Copy the key once (it starts with phx_). A key only does what its scopes allow, so a Query Read key can't capture events, change flags, or edit insights. Put the project id (Project settings) in POSTHOG_PROJECT_ID and your app host in POSTHOG_HOST: https://us.posthog.com, https://eu.posthog.com, or your self-hosted URL.

PostHog MCP is fine if the agent already has it. Ask it only to run read queries.

Botopticon never stores this key. Paste it into the agent, cron host, or MCP config. Revoke it any time.

Pro tiles are drawn here so you can read them. On a Free workspace they are skipped. Upgrade to Pro to add them. Free tiles on the same board still install.

Board

Sample · not your account.

Signups

Sample · signed_up · last 24 hours

18users

+4

Updated just nownowPostHog

Signups 7d

Sample · Per UTC day

18

min 9max 18

SunMonTueWedThuFriSat

Updated just nownowPostHog

DAU

Sample · Distinct people · 24h

240users

+6%

Updated just nownowPostHog

Activation

Sample · Signups in 7 days · 18 people

  1. ActivatedFirst board
    38.9% users
  2. Not yetSigned up
    61.1% users

Updated just nownowPostHog

Signup funnel

Sample · Visit to paid · 7 days

  1. Visits1,200 people
  2. Signups180 people15%
  3. Paid22 people12%

Updated just nownowPostHog

Command Tiles

Pro

Sample · not your account. The agent puts the ask on the board. You answer there. How Command Tiles work

  • Pause the experiment

    Needs you

    Sample data

    Approval · PostHog

    Pause the signup experiment?

    Updated just nownowPostHog

    Needs you
  • Signups jumped. Next?

    Needs you

    Sample data

    Question · PostHog

    Signups jumped in the last 24 hours. What next?

    Updated just nownowPostHog

    Needs you

Tiles

  • Signups
  • Signups 7d
  • DAU
  • Activation
  • Signup funnelPro
  • Signups. Count of the signup event you named, last 24 hours.
  • Activation. Cohort = signups in the last 7 days. Activated did the activation event you named.

State map

  • Signups. value = signup events in 24h. delta only when you stored yesterday. needs_you stays false, except 401/403 -> needs kind "blocker": Replace POSTHOG_PERSONAL_API_KEY.
  • Signups 7d. One point per UTC day from one grouped HogQL query. Post only days the query returns.
  • DAU. value = distinct person_id with any event in 24h. delta as a percent only when you stored yesterday. needs_you stays false.
  • Activation. Rows Activated "building" and Not yet "queued", max = cohort size. The queued row keeps the tile open at 100%. Never done, verified, merged, or live. No signups: one row {"label":"No signups in 7 days","value":0,"max":1}.
  • Signup funnel. Steps from one FunnelsQuery: $pageview, the signup event, then a paid event if you have one. Two steps are fine. Pro only.

Verify

The agent runs these on the first run, then reports.

  1. GET https://www.botopticon.com/api/catalog with the token -> 200. A 401 means the token is wrong, revoked, or still the placeholder.
  2. POST each body to https://www.botopticon.com/api/ingest?dry_run=1 (or post_tile with dry_run true). On board_not_found, stop and ask me; don't switch boards. On a validation error or warning (title or subtitle too long, weak title), fix that body and dry-run it again.
  3. Post for real. Each reply has ok true, a pane_id, and board_name "PostHog product".
  4. Call list_tiles (or open the board): 5 tiles on "PostHog product", none stale.
  5. Then tell me those four results in one short message.

Keep it current

A small script, not an LLM loop. It runs every 15 minutes for signups and DAU, once an hour for the trend, activation, and the funnel. It posts to “PostHog product” only when a tile changes, and reads BOTOPTICON_TOKEN and POSTHOG_PERSONAL_API_KEY and POSTHOG_PROJECT_ID and POSTHOG_HOST from the environment.

An LLM routine every few minutes spends your usage and adds nothing new.

Setup

  1. 01

    Make a PostHog Query Read key

    PostHog > Settings > Personal API keys > Create personal API key. Name it Botopticon board, pick only the Query Read scope, and limit it to one project. Keep it in POSTHOG_PERSONAL_API_KEY, the project id in POSTHOG_PROJECT_ID, and https://us.posthog.com or https://eu.posthog.com in POSTHOG_HOST. Botopticon never stores this key. Paste it into the agent, cron host, or MCP config. Revoke it any time.

  2. 02

    Create a Botopticon token

    In the app, open Connection tokens and create one named after this board. It starts with bot_ and is shown once. Save it as BOTOPTICON_TOKEN where the agent runs. It posts to Botopticon. It is not the PostHog key.

  3. 03

    Paste the prompt into your agent

    Open the tab for Grok Bot, Muse, MCP, Cursor, Claude, or curl. The agent checks the token, dry-runs every tile, posts to the PostHog product board, and reports back.

  4. 04

    Let the script keep it current

    The agent writes a small script that checks every 15 minutes (the trend and funnel once an hour) and posts only what changed. A quiet tile overnight is normal.

Snippets

Read BOTOPTICON_TOKEN from your environment or secret store. If it isn't set, stop and ask me. Never send the text $BOTOPTICON_TOKEN. If I paste a token in chat, save it as BOTOPTICON_TOKEN and don't repeat it.

Same recipe, one tab per platform. The prompt fetches the source and posts. Do not paste the sample numbers as live data.

Grok Bot

Click Use this recipe first so the board exists.
Paste this into Grok Bot. Set BOTOPTICON_TOKEN in its environment or secret store first.

1. Goal
Keep my Botopticon board "PostHog product" current with live PostHog data.
Any agent that can make HTTPS calls can do this. You report; I decide.

2. Connect
- Botopticon token (starts with bot_): Read BOTOPTICON_TOKEN from your environment or secret store. If it isn't set, stop and ask me. Never send the text $BOTOPTICON_TOKEN. If I paste a token in chat, save it as BOTOPTICON_TOKEN and don't repeat it.
- HTTP (works everywhere): POST https://www.botopticon.com/api/ingest
  Headers: Authorization: Bearer <token>, Content-Type: application/json
- MCP (optional, same token): https://www.botopticon.com/api/mcp, tool post_tile. If an MCP tool returns HTML or an error, use HTTP.

3. Source access
PostHog: read POSTHOG_PERSONAL_API_KEY, POSTHOG_PROJECT_ID, POSTHOG_HOST from your environment (PostHog personal API key, Query Read on one project). If one isn't set, ask me.
In PostHog open your account Settings, then Personal API keys, then Create personal API key. Name it Botopticon board, give it only the Query Read scope, and limit it to the one project you want shown. Copy the key once (it starts with phx_). A key only does what its scopes allow, so a Query Read key can't capture events, change flags, or edit insights. Put the project id (Project settings) in POSTHOG_PROJECT_ID and your app host in POSTHOG_HOST: https://us.posthog.com, https://eu.posthog.com, or your self-hosted URL.
Scopes: query:read.
PostHog MCP is fine if the agent already has it. Ask it only to run read queries.
Botopticon never stores this key. Paste it into the agent, cron host, or MCP config. Revoke it any time.

4. Board
Send "board": "PostHog product" on every post. On a Free workspace with one board, posts land on that board, and the reply warns board_ignored_free when the names differ.

5. Tiles
Bot "PostHog" on every tile. Never change the tile keys.
- signups-24h, kpi, "Signups". Count of the signup event you named, last 24 hours. States: value = signup events in 24h. delta only when you stored yesterday. needs_you stays false, except 401/403 -> needs kind "blocker": Replace POSTHOG_PERSONAL_API_KEY. ttl_seconds 43200.
- signups-7d, trend, "Signups 7d". States: One point per UTC day from one grouped HogQL query. Post only days the query returns. ttl_seconds 86400. needs_you stays false.
- dau-now, kpi, "DAU". States: value = distinct person_id with any event in 24h. delta as a percent only when you stored yesterday. needs_you stays false. ttl_seconds 43200.
- activation, progress, "Activation". Cohort = signups in the last 7 days. Activated did the activation event you named. States: Rows Activated "building" and Not yet "queued", max = cohort size. The queued row keeps the tile open at 100%. Never done, verified, merged, or live. No signups: one row {"label":"No signups in 7 days","value":0,"max":1}. ttl_seconds 86400. needs_you stays false.
- signup-funnel, funnel, "Signup funnel". States: Steps from one FunnelsQuery: $pageview, the signup event, then a paid event if you have one. Two steps are fine. Pro only. ttl_seconds 86400. needs_you stays false.

6. Fetch notes
Read the current PostHog Query API docs. One endpoint: POST {POSTHOG_HOST}/api/projects/{POSTHOG_PROJECT_ID}/query/ with header Authorization: Bearer <POSTHOG_PERSONAL_API_KEY> and a HogQLQuery body. Give every query a name.
Event names. Don't guess them. On the first run, list the top events of the last 30 days with one HogQL query, then ask me once which one is the signup and which one is activation (for example signed_up and board_created). Save both names in the script's config.
Signups. Count of the signup event in the last 24 hours. Subtitle "<event> · last 24 hours". delta only when you stored yesterday's value.
Signups 7d. One HogQL query grouped by toDate(timestamp) (UTC) for the last 7 days. PostHog stores events, so reading all 7 days is fine. Post only days the query returns.
DAU. count(DISTINCT person_id) over events in the last 24 hours.
Activation. Cohort = people who did the signup event in the last 7 days. Rows: "Activated" (value = cohort people who also did the activation event, max = cohort size, state building) and "Not yet" (value = the rest, max = cohort size, state queued). The queued row keeps the tile open even at 100%. Never use done, verified, merged, or live. With no signups in 7 days, post one row {"label":"No signups in 7 days","value":0,"max":1,"stage":"None"}.
Signup funnel (Pro). A FunnelsQuery over 7 days: $pageview, then the signup event, then a paid event only if one exists. Two steps are fine. Skipped on Free.
No tile here asks a person to act. If PostHog answers 401 or 403, post Signups with needs_you true and needs {"who":"PostHog","kind":"blocker","ask":"Replace POSTHOG_PERSONAL_API_KEY"} and keep the last value. A 429 means the hourly query budget ran out: wait for Retry-After and skip that run.
- Every tile: POST {POSTHOG_HOST}/api/projects/{POSTHOG_PROJECT_ID}/query/ with {"query":{"kind":"HogQLQuery","query":"..."},"name":"botopticon_<tile>"}.
- Signups and DAU: SELECT count(), count(DISTINCT person_id) FROM events WHERE timestamp > now() - INTERVAL 1 DAY (add event = '<signup>' for signups).
- Signups 7d: SELECT toDate(timestamp) AS day, count() FROM events WHERE event = '<signup>' AND timestamp > now() - INTERVAL 7 DAY GROUP BY day ORDER BY day.
- Signup funnel: the same endpoint with {"query":{"kind":"FunnelsQuery","dateRange":{"date_from":"-7d"},"series":[...]}}.
- Look-back: Counts are windows over stored events, so nothing short-lived is missed. Each run, query only what changed since your last run: the 24-hour counts every run, the 7-day trend, activation, and the funnel once an hour. Never use OFFSET; PostHog rejects it for personal keys.

7. Posting rules
Fields: bot, tile, type, title, subtitle, props, needs_you, needs, ttl_seconds, board, brief (link optional). Send the full body each time; a post without needs or link clears it.
needs is required whenever needs_you is true: {"who","kind":"task|issue|question|blocker|approval","ask"} (link and detail optional).
Limits: title shows 24 characters (max 80). Subtitle shows 48 (cut at 80). Row labels 64. Feed labels 280. needs.ask 140 on one line. needs.who 48.
Post a tile only when its body changes. Do not invent numbers. Do not post the same body again just to keep a tile fresh.

8. Verify on the first run
a) GET https://www.botopticon.com/api/catalog with the token -> 200. A 401 means the token is wrong, revoked, or still the placeholder.
b) POST each body to https://www.botopticon.com/api/ingest?dry_run=1 (or post_tile with dry_run true). On board_not_found, stop and ask me; don't switch boards. On a validation error or warning (title or subtitle too long, weak title), fix that body and dry-run it again.
c) Post for real. Each reply has ok true, a pane_id, and board_name "PostHog product".
d) Call list_tiles (or open the board): 5 tiles on "PostHog product", none stale.
e) Then tell me those four results in one short message.

9. Keep it current
Write a small script (no LLM in the loop). Run it every 15 minutes for signups and DAU, once an hour for the trend, activation, and the funnel. Use cron or a loop that holds a lock. It keeps a hash of each body, posts only the tiles that changed, retries once on 429 or 5xx, stops re-posting a body that got a 4xx, reads BOTOPTICON_TOKEN and POSTHOG_PERSONAL_API_KEY and POSTHOG_PROJECT_ID and POSTHOG_HOST from the environment, never logs them, and has a --dry flag.
Don't set up an LLM routine that runs every few minutes; it spends my usage and adds nothing.
On the board, a quiet tile with an old "updated" time is normal. A stale tile means your script stopped.

10. Report back
One short message: the token check, the dry-run result, each pane_id, the board name, and the schedule you chose.

FAQ

What if we capture a different signup event?
The agent lists your top events on the first run and asks which one is signup and which one is activation. It never invents an event. No tile turns amber for normal numbers; Signups turns amber only if PostHog rejects the key. The Pro funnel is skipped on Free.
Does this run on the Free plan?
The board installs on Free. Pro tiles are skipped until the workspace is Pro ($29/mo or $290/yr). Free tiles on the same board still install. Plan limits stay as they are.
Does Botopticon store the PostHog key?
Botopticon never stores this key. Paste it into the agent, cron host, or MCP config. Revoke it any time.
How does the board stay current?
A small script fetches the source and posts a tile only when its body changes. A quiet tile is fine: nothing changed. A stale tile means the agent stopped checking. Fifteen minutes after a tile goes stale it leaves the board, and it comes back on the next post.
Why did a tile leave the board?
Three reasons. A progress tile with every row finished leaves 5 minutes later. A status tile set to done leaves 5 minutes later. A stale tile leaves 15 minutes after it goes stale. The next post brings it back.