Slack
Connects a Slack workspace to an agent flow via Slack's OAuth "Add to Slack" flow. Unlike the other channels, there's no per-organization app to create: the Slack App itself is platform-owned, see System Configuration → Slack.
1. Prerequisites
The Slack App credentials (client_id, client_secret, signing_secret,
bot_scopes) live on a SystemChannelSlack record that Brain Station 23
manages, not something you create per organization. The only prerequisite on
the organization side is being signed in to Slack as a user permitted to
install apps into the target workspace, since clicking "Add to Slack" opens
Slack's own install-confirmation screen for that workspace.
2. Configuration
Three console routes:
| Route | Purpose |
|---|---|
/channels/slack | List the organization's Slack integrations |
/channels/slack/create | Connect a workspace |
/channels/slack/{id}/edit | View and reconfigure a connected workspace |
Create
/channels/slack/create is one card, one field: Agent Flow (required,
placeholder "Select an agent flow"). If the org has no agent flows, an
inline warning replaces normal validation and links to Create an Agent
Flow (/agent-builder/create).
Clicking Add to Slack (disabled until a flow is selected) first checks
client-side that a flow was picked ("Please select an agent flow"), then
calls POST /channels/slack/oauth/authorize with that agentFlowId and the
current organizationId, and redirects the whole page to the returned Slack
authorization URL. systemConfigId is not exposed in the UI, so this always
resolves to the primary system config. If the request itself fails (before
any redirect happens) it toasts "Failed to initiate Slack connection" with
the server's detail as the description.
Slack redirects back to GET /channels/slack/oauth/callback, which exchanges
the code for a bot token and creates the SlackIntegration row: team_id,
team_name, bot_user_id, app_id and the bot token, tied to the system
config used. On success the console lands on /channels/slack?connected=true;
on failure, ?error= carries the Slack error code or invalid_state /
config_not_found.
Edit
/channels/slack/{id}/edit has three cards, no tabs.
Status: Integration Enabled toggle, folded into the same Save Changes call as Configuration below. Disabling doesn't remove the Slack installation, it stops NeuraFlow from processing events for it.
Workspace Information, all three fields disabled inputs, read-only, populated from the OAuth callback and never re-fetched from Slack: Team Name, Team ID, App ID.
Configuration: Agent Flow is the only editable field here, there is no way to re-run Slack authorization from this screen (no reconnect or revoke button anywhere on this page).
Save Changes validates "Agent Flow is required." client-side, then calls
PUT /channels/slack/integrations/{id} with agentFlowId and enabled.
Success toasts "Slack integration saved successfully."; failure toasts
"Failed to save configuration." with the server's detail as the
description.
3. Other
All Slack events, for every connected workspace, arrive at one endpoint:
POST {BASE_URL}/api/v1/webhooks/channels/slack/events. It looks up the
integration by the event payload's team_id. Signature verification against
that request always uses the primary system config's signing_secret,
regardless of which config the matching integration was created against, see
System Configuration → Slack for what
that means for non-primary configs.