Slack Integration
The Slack integration lets agents send messages, manage channels, and react to messages in your Slack workspace. Use it for notifications, escalation workflows, or any scenario where the agent needs to reach a team via Slack.
Authentication
Slack uses a Bot Token (xoxb-...) for authentication.
To get one:
- Go to api.slack.com/apps → Create New App → From scratch
- Under OAuth & Permissions, add the following Bot Token Scopes:
chat:write— send messageschannels:manage/groups:write— create channelschannels:read/groups:read— list channelsreactions:write— add reactionsusers:read— look up users
- Click Install to Workspace, then copy the Bot OAuth Token (
xoxb-...)
| Field | Description |
|---|---|
| Bot Token | Your Slack bot token starting with xoxb- |
Installing
- Go to your project → Integrations → Browse
- Find Slack and click Install
- Paste your Bot Token
- Select the actions you want to enable
- Click Install
Actions
post_message — Post Message
Sends a message to a channel or DM.
Tool reference: {{tool:slack_post_message}}
| Parameter | Required | Description |
|---|---|---|
channel | Yes | Channel ID (e.g. C012AB3CD) or channel name (e.g. #support) |
text | Yes | Message text — supports Slack markdown |
blocks | No | Block Kit JSON array for rich messages |
Returns: message_ts (message timestamp), channel
update_message — Update Message
Edits a previously sent message.
Tool reference: {{tool:slack_update_message}}
| Parameter | Required | Description |
|---|---|---|
channel | Yes | Channel ID |
message_ts | Yes | Timestamp of the message to update (from post_message) |
text | Yes | New message text |
delete_message — Delete Message
Deletes a message.
Tool reference: {{tool:slack_delete_message}}
| Parameter | Required | Description |
|---|---|---|
channel | Yes | Channel ID |
message_ts | Yes | Timestamp of the message to delete |
add_reaction — Add Reaction
Adds an emoji reaction to a message.
Tool reference: {{tool:slack_add_reaction}}
| Parameter | Required | Description |
|---|---|---|
channel | Yes | Channel ID |
message_ts | Yes | Message timestamp |
emoji | Yes | Emoji name without colons (e.g. white_check_mark) |
create_channel — Create Channel
Creates a new Slack channel.
Tool reference: {{tool:slack_create_channel}}
| Parameter | Required | Description |
|---|---|---|
channel_name | Yes | Channel name (lowercase, no spaces) |
is_private | No | true for private channel, false for public (default: false) |
Returns: channel_id, channel_name
invite_to_channel — Invite to Channel
Invites one or more users to a channel.
Tool reference: {{tool:slack_invite_to_channel}}
| Parameter | Required | Description |
|---|---|---|
channel | Yes | Channel ID |
user_ids | Yes | Comma-separated Slack user IDs (e.g. U012AB3CD,U045EF6GH) |
Using Slack in an agent
Escalation to Slack
When a caller's issue cannot be resolved in this conversation, or they ask to speak to a human:
1. Collect a brief summary of the issue.
2. Use {{tool:slack_post_message}} to send a message to #support-escalations with:
- The caller's name (if known)
- A summary of the issue
- Any relevant ticket or order numbers
3. Tell the caller: "I've notified the support team and someone will follow up with you shortly."
Channel ID for #support-escalations: C012AB3CD
Alert pattern
When an anomaly or threshold breach is detected, use {{tool:slack_post_message}}
to alert the #ops-alerts channel. Format the message as:
⚠️ *Alert:* <what happened>
*Details:* <relevant data points>
*Time:* <timestamp>
Troubleshooting
channel_not_found
The channel ID or name is wrong, or the bot hasn't been invited to the channel. Go to the channel in Slack and type /invite @YourBotName.
not_in_channel
The bot must be a member of the channel before it can post. Use /invite @YourBotName in that channel.
missing_scope
The bot token doesn't have the required OAuth scope. Go to your Slack app settings → OAuth & Permissions and add the missing scope, then reinstall the app.
invalid_auth
The bot token is incorrect or has been revoked. Regenerate it from your Slack app settings → OAuth & Permissions → Reinstall to Workspace.