setting-up-support-slack-locally

Connect a Slack workspace to local PostHog Conversations via OAuth and tunneled event webhooks.

713|118|Updated Aug 11, 2020
One-click install
npx skills add https://github.com/PostHog/posthog-foss --skill setting-up-support-slack-locally
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: setting-up-support-slack-locally
Source: https://github.com/PostHog/posthog-foss/tree/main/products/conversations/skills/setting-up-support-slack-locally
Command: npx skills add https://github.com/PostHog/posthog-foss --skill setting-up-support-slack-locally

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Setting up the SupportHog Slack integration against a local PostHog development environment fails in confusing ways: OAuth client ID errors, white screens on the callback, redirect URI mismatches, and Slack event webhooks that cannot reach localhost. This Skill walks through the full local setup and explains the key insight that OAuth (browser-mediated) works on localhost while inbound Slack events (server-to-server) require a public tunnel.

Core Features & Use Cases

  • Credential configuration: Set the SUPPORT_SLACK_APP_CLIENT_ID, SUPPORT_SLACK_APP_CLIENT_SECRET, and SUPPORT_SLACK_SIGNING_SECRET dynamic settings via .env.local or the Constance admin.
  • Slack app creation: Configure the bot user, OAuth scopes, redirect URLs, event subscriptions, and interactivity endpoints at api.slack.com.
  • Tunnel setup for inbound events: Run ngrok or cloudflared against port 8010 with Host-header rewriting so Slack event POSTs reach Django.
  • Troubleshooting reference: Diagnose white screens, Network errors from tunnel rate limits, signature verification failures, and verify the event path end-to-end with a signed url_verification replay.
  • Use Case: A developer testing the PostHog Conversations Slack integration locally hits "Support Slack OAuth client ID is not configured" and uses this Skill to configure credentials, create the Slack app, and tunnel events so Slack messages become support tickets.

Quick Start

Set up the SupportHog Slack app and tunnel so I can test the PostHog Conversations Slack integration on my local development environment.

Frequently Asked Questions about setting-up-support-slack-locally

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up the PostHog Conversations Slack integration locally?

Create a Slack app in a throwaway workspace, set SUPPORT_SLACK_APP_CLIENT_ID, CLIENT_SECRET, and SIGNING_SECRET in .env.local, add the localhost callback redirect URL, and point Event Subscriptions at a public tunnel. Keep OAuth and browsing on localhost; only inbound events need the tunnel.

Why do I get "Support Slack OAuth client ID is not configured"?

The SUPPORT_SLACK_APP_CLIENT_ID dynamic setting is empty. Set the three SUPPORT_SLACK_* variables in .env.local and restart the backend. If it persists, a blank value stored in Constance overrides the env default, so set it at /admin/constance/config/ instead.

Why does the Slack OAuth callback show a white screen on localhost?

The callback ran without an authenticated session on the origin SITE_URL resolves to, returning a 401 hidden by Content-Security-Policy. Log in on the same localhost origin before connecting Slack so the session cookie is present.

Can Slack events reach a localhost development server?

No, Slack's servers cannot reach localhost, so inbound events need a public tunnel such as ngrok or cloudflared pointed at port 8010. The tunnel must rewrite the Host header to localhost or the dev Caddy returns an empty 200.

Why do I see Network error messages when browsing PostHog over a tunnel?

Free-tier ngrok rate limits drop the SPA's many API requests per page load. Keep browsing and OAuth on localhost and use the tunnel only for low-volume Slack event POSTs, or switch to Cloudflare Tunnel which has no such limit.

How do I verify the Slack events webhook without sending real Slack events?

Replay a signed url_verification request: compute an HMAC-SHA256 signature with your signing secret and POST it to the tunnel's /api/conversations/v1/slack/events endpoint. A challenge response with server: granian confirms the full path works.