CA
Docs home

Slack

Connect Slack when you want an agent to respond in direct messages, channels, or threads inside a Slack workspace.

Prerequisites

  • An existing Cloud Agents agent.
  • Permission to create or manage a Slack app in the workspace.
  • Permission to install the app to the workspace.

Create a 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 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-.

Connect it to Cloud Agents

  1. Open Settings -> 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.
  7. Paste the inbound URL into Slack Event Subscriptions as the Request URL.
  8. Run the channel test.

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.

SettingRecommendation
Mention onlyKeep on for channels so the agent replies only when mentioned. DMs still work.
Shared sessionKeep off unless everyone in the Slack channel should share one conversation.
Thread isolationKeep on so Slack threads map to separate agent sessions.
Progress modeUse preview if you want one message updated while the agent works.

Verify

Open the channel detail page and run Test. A healthy channel confirms the Slack bot identity and active status.

Troubleshooting

  • Request URL verification fails: confirm the signing secret and paste the current inbound URL from Cloud Agents.
  • 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