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
- Open Slack API Apps.
- Create an app from scratch.
- Add a bot user under App Home.
- Open OAuth & Permissions and add the bot scopes needed for your use case.
Recommended bot scopes:
| Scope | Why |
|---|---|
app_mentions:read | Receive messages that mention the bot in channels. |
chat:write | Send agent replies. |
im:history | Receive direct messages. |
im:read | Let the bot access DM conversations. |
im:write | Let the bot send DMs. |
channels:history | Optional, for public channel message events. |
groups:history | Optional, 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
- Open Settings -> Channels.
- Create a new channel and choose Slack.
- Select the agent that should receive messages.
- Enter a label, the
xoxb-bot token, and the signing secret from Basic Information. - Create the channel.
- Copy the inbound URL from the channel detail page.
- Paste the inbound URL into Slack Event Subscriptions as the Request URL.
- Run the channel test.
Event subscriptions
Enable Event Subscriptions and add these bot events:
| Event | Why |
|---|---|
app_mention | Messages in channels when users mention the bot. |
message.im | Direct messages to the bot. |
After changing scopes or event subscriptions, reinstall the Slack app to the workspace.
Recommended settings
| Setting | Recommendation |
|---|---|
| Mention only | Keep on for channels so the agent replies only when mentioned. DMs still work. |
| Shared session | Keep off unless everyone in the Slack channel should share one conversation. |
| Thread isolation | Keep on so Slack threads map to separate agent sessions. |
| Progress mode | Use 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.imand 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.