/setting-up-support-slack-locally
Connect a real Slack workspace to local PostHog Conversations (the SupportHog Slack app) so Slack messages become support tickets and replies post back. Use when the user wants to test the conversations Slack integration locally, hits "Support Slack OAuth client ID is not
$ npx -y skills add posthog/posthog --skill setting-up-support-slack-locally --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/setting-up-support-slack-locally
Context preview
The summary Claude sees to decide when to auto-load this skill.
Connect a real Slack workspace to local PostHog Conversations (the SupportHog Slack app) so Slack messages become support tickets and replies post back. Use when the user wants to test the conversations Slack integration locally, hits "Support Slack OAuth client ID is not
SKILL.md
setting-up-support-slack-locally.SKILL.mdname: setting-up-support-slack-locally
description: >
Connect a real Slack workspace to local PostHog Conversations (the SupportHog Slack app) so Slack
messages become support tickets and replies post back. Use when the user wants to test the conversations
Slack integration locally, hits "Support Slack OAuth client ID is not configured", gets a white screen or
"Network error" on the OAuth callback, or asks how to set SUPPORT_SLACK_APP_CLIENT_ID / a tunnel for
supporthog Slack events. Covers the Slack app + scopes, the SUPPORT_SLACK_* dynamic settings, and the
key split: localhost for OAuth and the UI, a public tunnel only for inbound events.
Setting up Support Slack locally
Slack is SaaS-only, so "local" means a throwaway Slack workspace + app whose OAuth and events reach your laptop. The job has one non-obvious idea that avoids almost every wall: **the OAuth connect and the event webhook have opposite reachability needs, so you point them at different places.**
- **OAuth connect** is browser-mediated. Your browser follows the redirect, so `localhost` is reachable.
No tunnel needed.
- **Inbound events** (Slack POSTing messages so they become tickets) are server-to-server from Slack's
cloud. Slack cannot reach `localhost`, so this one needs a public tunnel.
Keep the whole app and the OAuth flow on `localhost`, and point only Event Subscriptions (and Interactivity) at the tunnel. This also sidesteps free-tier tunnel rate limits, since the tunnel then carries only Slack's low-volume event POSTs rather than the entire SPA.
This is the conversations/SupportHog variant of the general [Slack local setup guide](../../../../docs/internal/slack-local-setup-guide.md); that guide covers the PostHog Desktop / notifications Slack app (`SLACK_APP_*`, `/integrations/slack/callback`). Conversations uses its own `SUPPORT_SLACK_*` credentials and `/api/conversations/v1/slack/*` routes, but the tunnel and `SITE_URL` mechanics are identical.
The endpoints
All under `products/conversations/backend/api/urls.py`, prefixed `/api/conversations/`:
| Route | Purpose | Reachability | | ------------------------ | ------------------------------------------------------------- | ------------------------ | | `v1/slack/authorize` | returns the Slack OAuth URL (auth-gated) | browser (localhost) | | `v1/slack/callback` | OAuth redirect target; built from `SITE_URL`, no forced https | browser (localhost) | | `v1/slack/events` | inbound event webhook | Slack's servers (tunnel) | | `v1/slack/interactivity` | interactive component callbacks | Slack's servers (tunnel) |
The callback requires an authenticated session on whatever origin `SITE_URL` resolves to, because the session cookie is per-origin. Keep `SITE_URL` on `localhost` and log in there, and the callback keeps your session.
Step 1 — credentials
`SUPPORT_SLACK_APP_CLIENT_ID`, `SUPPORT_SLACK_APP_CLIENT_SECRET`, and `SUPPORT_SLACK_SIGNING_SECRET` are django-constance dynamic settings (`posthog/settings/dynamic_settings.py`) that default to the matching env var. Empty client id is what produces "Support Slack OAuth client ID is not configured". Put your Slack app's values in `.env.local` (gitignored) and restart the backend:
SUPPORT_SLACK_APP_CLIENT_ID=<client id>
SUPPORT_SLACK_APP_CLIENT_SECRET=<client secret>
SUPPORT_SLACK_SIGNING_SECRET=<signing secret>
Constance stores values in the DB, and a stored value overrides the env default. If it still reads as unconfigured after a restart, check `/admin/constance/config/` for a blank stored value and set it there instead.
Step 2 — the Slack app
At [api.slack.com/apps](https://api.slack.com/apps), create an app in a throwaway workspace, then:
1. **App Home** → enable a **bot user** (give it a display name). Without this, install fails with "requesting permission to install a bot ... but it's not currently configured with a bot". 2. **OAuth & Permissions → Bot Token Scopes** — the flow requests these (from `SUPPORTHOG_SLACK_SCOPES` in `products/conversations/backend/api/slack_oauth.py`): `channels:history`, `channels:read`, `chat:write`, `chat:write.customize`, `files:read`, `files:write`, `groups:history`, `groups:read`, `reactions:read`, `users:read`, `users:read.email`. Attachments need the two `files:` scopes in both directions, so a workspace installed without them shows a "reconnect" banner in support settings. 3. **OAuth & Permissions → Redirect URLs** — add `http://localhost:8010/api/conversations/v1/slack/callback` and Save. If Slack refuses a plain-http localhost URL, use the tunnel URL for the callback too and log in once on the tunnel origin (see [references/troubleshooting.md](references/troubleshooting.md)). 4. Copy the Client ID, Client Secret, and Signing Secret from Basic Information into `.env.local` (Step 1).
Step 3 — tunnel for inbound events
Run any HTTPS tunnel pointed at Caddy on **8010**, rewriting the upstream `Host` header to `localhost` (the dev Caddy only answers for the `localhost` host; without the rewrite you get an empty `200` and a white page):
ngrok http --host-header=localhost 8010
# or, free with no rate limit:
cloudflared tunnel --url http://localhost:8010 --http-host-header localhost
Verify it reaches Django, not just Caddy:
curl -sS https://<tunnel-host>/_preflight | head -c 120 # want JSON, server: granian
Then in the Slack app set **Event Subscriptions → Request URL** (and **Interactivity → Request URL** if testing buttons) to `https://<tunnel-host>/api/conversations/v1/slack/events` (and `.../interactivity`). Slack sends a synchronous `url_verification` challenge on save, so the backend must be up; the handler echoes it back automatically.
The Request URL alone only passe
Read more
name: setting-up-support-slack-locally description: > Connect a real Slack workspace to local PostHog Conversations (the SupportHog Slack app) so Slack messages become support tickets and replies post back. Use when the user wants to test the conversations Slack integration locally, hits "Support Slack OAuth client ID is not configured", gets a white screen or "Network error" on the OAuth callback, or asks how to set SUPPORT_SLACK_APP_CLIENT_ID / a tunnel for supporthog Slack events. Covers the Slack app + scopes, the SUPPORT_SLACK_* dynamic settings, and the key split: localhost for OAuth and the UI, a public tunnel only for inbound events.
Setting up Support Slack locally
Slack is SaaS-only, so "local" means a throwaway Slack workspace + app whose OAuth and events reach your laptop. The job has one non-obvious idea that avoids almost every wall: **the OAuth connect and the event webhook have opposite reachability needs, so you point them at different places.**
- **OAuth connect** is browser-mediated. Your browser follows the redirect, so `localhost` is reachable.
No tunnel needed.
- **Inbound events** (Slack POSTing messages so they become tickets) are server-to-server from Slack's
cloud. Slack cannot reach `localhost`, so this one needs a public tunnel.
Keep the whole app and the OAuth flow on `localhost`, and point only Event Subscriptions (and Interactivity) at the tunnel. This also sidesteps free-tier tunnel rate limits, since the tunnel then carries only Slack's low-volume event POSTs rather than the entire SPA.
This is the conversations/SupportHog variant of the general [Slack local setup guide](../../../../docs/internal/slack-local-setup-guide.md); that guide covers the PostHog Desktop / notifications Slack app (`SLACK_APP_*`, `/integrations/slack/callback`). Conversations uses its own `SUPPORT_SLACK_*` credentials and `/api/conversations/v1/slack/*` routes, but the tunnel and `SITE_URL` mechanics are identical.
The endpoints
All under `products/conversations/backend/api/urls.py`, prefixed `/api/conversations/`:
| Route | Purpose | Reachability | | ------------------------ | ------------------------------------------------------------- | ------------------------ | | `v1/slack/authorize` | returns the Slack OAuth URL (auth-gated) | browser (localhost) | | `v1/slack/callback` | OAuth redirect target; built from `SITE_URL`, no forced https | browser (localhost) | | `v1/slack/events` | inbound event webhook | Slack's servers (tunnel) | | `v1/slack/interactivity` | interactive component callbacks | Slack's servers (tunnel) |
The callback requires an authenticated session on whatever origin `SITE_URL` resolves to, because the session cookie is per-origin. Keep `SITE_URL` on `localhost` and log in there, and the callback keeps your session.
Step 1 — credentials
`SUPPORT_SLACK_APP_CLIENT_ID`, `SUPPORT_SLACK_APP_CLIENT_SECRET`, and `SUPPORT_SLACK_SIGNING_SECRET` are django-constance dynamic settings (`posthog/settings/dynamic_settings.py`) that default to the matching env var. Empty client id is what produces "Support Slack OAuth client ID is not configured". Put your Slack app's values in `.env.local` (gitignored) and restart the backend:
SUPPORT_SLACK_APP_CLIENT_ID=<client id> SUPPORT_SLACK_APP_CLIENT_SECRET=<client secret> SUPPORT_SLACK_SIGNING_SECRET=<signing secret>
Constance stores values in the DB, and a stored value overrides the env default. If it still reads as unconfigured after a restart, check `/admin/constance/config/` for a blank stored value and set it there instead.
Step 2 — the Slack app
At [api.slack.com/apps](https://api.slack.com/apps), create an app in a throwaway workspace, then:
1. **App Home** → enable a **bot user** (give it a display name). Without this, install fails with "requesting permission to install a bot ... but it's not currently configured with a bot". 2. **OAuth & Permissions → Bot Token Scopes** — the flow requests these (from `SUPPORTHOG_SLACK_SCOPES` in `products/conversations/backend/api/slack_oauth.py`): `channels:history`, `channels:read`, `chat:write`, `chat:write.customize`, `files:read`, `files:write`, `groups:history`, `groups:read`, `reactions:read`, `users:read`, `users:read.email`. Attachments need the two `files:` scopes in both directions, so a workspace installed without them shows a "reconnect" banner in support settings. 3. **OAuth & Permissions → Redirect URLs** — add `http://localhost:8010/api/conversations/v1/slack/callback` and Save. If Slack refuses a plain-http localhost URL, use the tunnel URL for the callback too and log in once on the tunnel origin (see [references/troubleshooting.md](references/troubleshooting.md)). 4. Copy the Client ID, Client Secret, and Signing Secret from Basic Information into `.env.local` (Step 1).
Step 3 — tunnel for inbound events
Run any HTTPS tunnel pointed at Caddy on **8010**, rewriting the upstream `Host` header to `localhost` (the dev Caddy only answers for the `localhost` host; without the rewrite you get an empty `200` and a white page):
ngrok http --host-header=localhost 8010 # or, free with no rate limit: cloudflared tunnel --url http://localhost:8010 --http-host-header localhost
Verify it reaches Django, not just Caddy:
curl -sS https://<tunnel-host>/_preflight | head -c 120 # want JSON, server: granian
Then in the Slack app set **Event Subscriptions → Request URL** (and **Interactivity → Request URL** if testing buttons) to `https://<tunnel-host>/api/conversations/v1/slack/events` (and `.../interactivity`). Slack sends a synchronous `url_verification` challenge on save, so the backend must be up; the handler echoes it back automatically.
The Request URL alone only passe
:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Repo: posthog/posthog
Other skills on posthog.
- /analyzing-expensive-users
Analyze the most expensive users in AI observability and explain why they cost so much. Use when the user asks about top spenders, expensive users, per-user LLM cost, user-level cost drivers, or patterns behind high AI observability spend.
Open skill - /creating-online-evaluations
Author continuously-running online evaluations in PostHog AI observability, grounded in real failure modes you've identified. Use when the user wants evaluations that automatically score new generations or whole traces going forward — "create an eval to catch X", "continuously
Open skill - /exploring-ai-failures
Find where an AI/LLM application is failing in production and surface the failure patterns, working from real traces. Use when someone wants to understand what's going wrong with an AI feature, find and categorize failure modes, triage errors, or investigate quality issues
Open skill - /exploring-llm-clusters
Investigate AI observability clusters — understand usage patterns in AI/LLM traffic, compare cluster behavior, compute cost/latency metrics, and drill into individual traces within clusters.
Open skill - /exploring-llm-costs
Investigate LLM spend in PostHog — total cost over time, cost by model, provider, user, trace, or custom dimension, token and cache-hit economics, and cost regressions. Use when the user asks "how much are we spending on LLMs?", "which model / user / feature is most expensive?",
Open skill - /exploring-llm-evaluations
Investigate AI observability evaluations — `hog` (deterministic code-based), `llm_judge` (LLM-prompt-based), and `sentiment` (user-message sentiment). Find existing evaluations, inspect their configuration, run them against specific generations, query individual results, and
Open skill

