skills/setup-slack-channel/references/slack-workspace-and-app.md
Goal: a dedicated Slack app, installed in a workspace where an in-progress bot is harmless, with its two tokens in hand.
In preference order:
slack.com/create. Fastest path when
company approval would block them. A free workspace is fine for this.Never test in a workspace where an unapproved or half-built bot would disrupt people. That is the whole reason installs are gated.
So: create the app immediately, and start the install request in parallel if one is needed. Do not sit idle waiting for approval before creating.
There is exactly one correct manifest: the one the Intelligence Channel wizard generates (Phase 1, the Setup step — "Copy manifest" / "View manifest YAML"). It is already pointed at the Channel's Request URL. Copy it from there.
Do not use either of these:
slack-app-manifest.yaml. It sets
socket_mode_enabled: true and declares no request_url — the direct-adapter
shape. An app created from it installs cleanly and never delivers an event to
Intelligence.assets/slack-app-manifest.yaml in this skill. Same problem; it is retained
only as a reference for what the direct-adapter shape looks like.The generated manifest deliberately contains no slash_commands, because the
managed adapter does not deliver them. Do not add them back, and do not invent a
Request URL for them. It does set interactivity.is_enabled: true with an
Intelligence-hosted interactivity request URL — that one is deliberate, and it is
what makes HITL buttons and selects work.
Then, in a browser at api.slack.com/apps: create a new app from an app
manifest, choose the workspace, paste the manifest, review the requested
scopes, and create it.
Two paste-time gotchas:
usage_hint: "" is the usual culprit (the OpenTag manifest ships two). Delete
the empty keys rather than blanking them.Before creating, change display_information.name and
features.bot_user.display_name so the bot is obviously a dev app in the member
list. Two bots with the same name in one workspace is a support burden for
whoever finds it later.
Never paste a manifest over an app that is already installed and in use. That can reinstall it and rotate its tokens, breaking every consumer holding the old ones. Configuring a new app is the only safe path.
xoxb-…).Both go into the Slack adapter form in Intelligence, entered by the developer.
Neither belongs in this repo, in .env, or in the conversation — see
references/secrets-and-credentials.md.
They must come from the same app. A mismatched pair cannot be detected during setup: it looks configured and never delivers.
Do not open the Install App page to read the token — it renders it in plain text. Use OAuth & Permissions, and have the developer copy it themselves.
If you changed the manifest after the first install, Slack shows a banner asking you to reinstall. That is required for the new scopes to take effect, and it issues a new bot token — so reinstall before copying the token, never after.
| Setting | Expected | Why |
|---|---|---|
| Socket Mode | disabled | Managed delivery is HTTPS to Intelligence's Request URL. Socket Mode is the direct-adapter path; enabling it here delivers nothing. |
| Event subscriptions → Request URL | https://intelligence.copilotkit.ai/api/channels/adapters/slack/events | This is the whole delivery mechanism. Absent or wrong = permanent silence. |
| Event subscriptions → bot events | includes app_mention, message.im | app_mention for channel mentions, message.im for DMs. Editing the app after install can drop these. |
| Interactivity | enabled, request URL https://intelligence.copilotkit.ai/api/channels/adapters/slack/interactivity | This is how HITL buttons and selects reach your runtime. Turning it off silently breaks them. Modals stay undelivered either way — view_submission is not handled. |
Workspace-installed is not the same as channel member. Slack does not emit
app_mention at all for a channel the app is not in — it shows the human an
invite prompt instead, and nothing reaches your runtime.
/invite @YourBot
Prefer a channel the developer created for this. A DM to the bot also works for
testing, but check which handlers the app registers first: an app with only
onMention ignores plain DMs (see references/troubleshooting.md).
xoxb- bot token and the signing secret from that app are in the
developer's hands, and neither has touched the repo or the chat.