Netmind Cloud Agents
← Docs

Slack Channel

Slack channels connect a Slack app to one Netmind Cloud Agent. NCA receives Slack Events API webhooks, verifies them with the app signing secret, and replies with the bot token.

NCA uses Slack Events API webhooks. It does not require Socket Mode or an xapp- app token.

Prerequisites

  • CHANNELS_ENABLED=true on the API service
  • PUBLIC_API_BASE_URL set to the public HTTPS base URL of the API service
  • An existing NCA agent
  • Permission to create or manage a Slack app in the workspace

Slack’s Request URL verification requires a public HTTPS URL. Localhost URLs will not verify unless they are exposed through a tunnel.

Create the Slack app

  1. Open Slack API Apps.
  2. Create an app from scratch.
  3. Add a bot user under App Home.
  4. Open OAuth & Permissions and add the bot scopes needed for your use case.

Recommended bot token scopes:

ScopeWhy
app_mentions:readReceive messages that mention the bot in channels.
chat:writeSend agent replies.
im:historyReceive direct messages.
im:readLet the bot access DM conversations.
im:writeLet the bot send DMs.
channels:historyOptional, for public channel message events.
groups:historyOptional, for private channel message events.

Install the app to the workspace and copy the Bot User OAuth Token. It starts with xoxb-.

Configure in Admin

  1. Open Admin, then go to Channels.
  2. Create a new channel and choose Slack.
  3. Select the agent that should receive messages.
  4. Enter a label, the xoxb- bot token, and the signing secret from Basic Information.
  5. Create the channel.
  6. Copy the inbound URL from the channel detail page.

Paste the inbound URL into Slack Event Subscriptions as the Request URL:

{PUBLIC_API_BASE_URL}/api/channels/hooks/slack/{channelId}

Slack sends a url_verification request. When NCA verifies the signing secret and returns the challenge, the channel becomes active.

Event subscriptions

Enable Event Subscriptions and add these bot events:

EventWhy
app_mentionMessages in channels when users mention the bot.
message.imDirect messages to the bot.

After changing scopes or event subscriptions, reinstall the Slack app to the workspace.

API payload

{
    "agentId": "agt_...",
    "provider": "slack",
    "label": "engineering-slack",
    "config": {
        "mentionOnly": true,
        "shareSessionInChannel": false,
        "threadIsolation": true,
        "progressMode": "preview"
    },
    "credentials": {
        "botToken": "xoxb-...",
        "signingSecret": "..."
    }
}

Send this body to POST /api/channels. NCA runs auth.test and stores the returned bot user ID and team ID in channel config.

Configuration

FieldRequiredDefaultNotes
botUserIdNoAuto-filledSlack bot user ID returned by auth.test. Used to strip bot mentions from prompts.
teamIdNoAuto-filledSlack workspace team ID returned by auth.test.
mentionOnlyNotrueIn channels, only respond when the bot is mentioned. DMs always respond.
shareSessionInChannelNofalseWhen true, users in the same channel share one agent session unless a thread scope is used.
threadIsolationNotrueUses Slack thread_ts as the session scope for threaded messages.
progressModeNopreviewpreview edits one progress message while the agent works. final only sends the final reply.

Credentials

FieldRequiredNotes
botTokenYesBot User OAuth Token. Must start with xoxb-. Stored encrypted.
signingSecretYesApp signing secret from Basic Information. Used to verify webhook signatures.

Verify

Use the channel detail page test action, or call:

curl -X POST "$NCA_API_URL/channels/{channelId}/test" \
    -H "Authorization: Bearer $NCA_TOKEN"

A healthy channel reports a passing auth.test result and an active channel status.

Troubleshooting

  • Request URL verification fails: check PUBLIC_API_BASE_URL, the signing secret, and that the request reaches /api/channels/hooks/slack/{channelId}.
  • Bot does not respond in DMs: subscribe to message.im and reinstall the app.
  • Bot does not respond in channels: subscribe to app_mention, invite the bot to the channel, and mention it.
  • Scope changes do not apply: reinstall the Slack app after changing scopes.

See also