Slack Connector
Direction: Write Only | Type: slack
Send messages, update posts, and add reactions in Slack workspaces from your Strand workflows.
Prerequisites#
The quickest setup is Connect with Slack: all you need is a Slack workspace where you're allowed to install apps, and Strand handles the token. The steps below are only for Option B, using your own Slack app and a Slack Bot Token:
- Go to api.slack.com/apps and click Create New App
- Choose From scratch, name your app, and select your workspace
- Go to OAuth & Permissions in the sidebar
- Under Bot Token Scopes, add the scopes you need:
chat:write: Send messageschat:write.public: Send to channels the bot isn't a member ofreactions:write: Add emoji reactions
- Click Install to Workspace and authorize
- Copy the Bot User OAuth Token (starts with
xoxb-)
Required Permissions#
The Slack bot must have the following OAuth scopes:
| Operation | Required Bot Token Scopes |
|---|---|
| Send Message | chat:write (or chat:write.public for channels the bot hasn't joined) |
| Update Message | chat:write |
| Add Reaction | reactions:write |
Tip: Only add the scopes your workflows need. If you only send messages to channels the bot is a member of, chat:write alone is sufficient.
Connector Setup#
Create a Slack connector from the Connectors page. You have two options:
Option A: Connect with Slack (Recommended)#
Click the Connect with Slack button when creating a new Slack connector. This opens Slack's authorization page, where you approve the required permissions. Your bot token is saved automatically, so no manual setup is needed. If the button isn't shown, use Option B.
Option B: Manual Bot Token#
If you prefer to manage your own Slack app, paste your bot token directly.
Configuration Fields#
| Field | Required | Description |
|---|---|---|
| Name | Yes | Friendly name (e.g., "Production Alerts Slack") |
| Bot Token | Option B only | Bot User OAuth Token (starts with xoxb-, encrypted at rest). Filled in for you by Connect with Slack. |
| Default Channel | No | Default channel for messages (can be overridden per node) |
| Timeout | No | API request timeout in seconds (default: 30) |
| Description | No | Optional description for reference |
Operations#
Send Message#
Send a message to a Slack channel or user.
| Field | Required | Description |
|---|---|---|
| Channel | Yes | Channel ID or name (e.g., #general or C0123456789) |
| Message Text | No* | Message text with Slack mrkdwn formatting |
| Blocks (JSON) | No* | Block Kit blocks as JSON array |
| Thread Timestamp | No | Reply in a thread by providing the parent message ts |
* At least one of Message Text or Blocks is required.
Example: Simple text message:
*Alert:* {{ payload.service }} is {{ payload.status }}
Example: Block Kit message:
[
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*{{ payload.title }}*\n{{ payload.description }}"
}
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {"type": "plain_text", "text": "View Details"},
"url": "{{ payload.url }}"
}
]
}
]
Update Message#
Update an existing Slack message.
| Field | Required | Description |
|---|---|---|
| Channel | Yes | Channel containing the message |
| Message Timestamp | Yes | ts value of the message to update |
| New Text | No | Updated message text |
| New Blocks (JSON) | No | Updated Block Kit blocks |
Use the ts value from a previous Send Message output:
{{ steps.send_alert.output_payload.data.ts }}
Add Reaction#
Add an emoji reaction to a message.
| Field | Required | Description |
|---|---|---|
| Channel | Yes | Channel containing the message |
| Message Timestamp | Yes | ts value of the message to react to |
| Emoji Name | Yes | Emoji name without colons (e.g., thumbsup, white_check_mark) |
Output#
Send Message Output#
{
"success": true,
"status": "sent",
"data": {
"channel": "C0123456789",
"ts": "1234567890.123456",
"message": { ... }
},
"service": "slack",
"operation": "send_message"
}
Key fields for subsequent nodes:
{{ steps.node_a1b2c3d4.output_payload.data.ts }}: Message timestamp (for threading, updating, or reacting){{ steps.node_a1b2c3d4.output_payload.data.channel }}: Channel ID
Update Message Output#
{
"success": true,
"status": "updated",
"data": {"channel": "C0123456789", "ts": "1234567890.123456"},
"service": "slack",
"operation": "update_message"
}
Add Reaction Output#
{
"success": true,
"status": "completed",
"data": {"channel": "C0123456789", "ts": "1234567890.123456", "reaction": "white_check_mark"},
"service": "slack",
"operation": "add_reaction"
}
Errors#
| Error | Meaning |
|---|---|
| Slack bot_token is required | Bot token not configured in connector. |
| Slack channel is required | No channel specified in node config or default_channel. |
| Either text or blocks is required | Message has no content. |
| channel_not_found | The channel doesn't exist or the bot can't see it. |
| not_in_channel | Bot isn't a member of the channel. Add chat:write.public scope or invite the bot. |
| invalid_auth | Bot token is invalid or revoked. |
| token_revoked | Bot token has been revoked. Reinstall the Slack app. |
| missing_scope | Bot is missing a required OAuth scope. |
| message_not_found | The message to update or react to doesn't exist. |
| already_reacted | The bot already added this reaction. |
Example Workflow#
- Create Connector with your Slack bot token and default channel
#alerts - Send alert message when a workflow triggers:
- Text:
*{{ payload.severity }}:* {{ payload.message }}
- Add reaction to confirm processing:
- Timestamp:
{{ steps.send_alert.output_payload.data.ts }} - Reaction:
white_check_mark
Limitations#
- File uploads: Not currently supported.
- Incoming messages: Not supported. Use Slack's webhook or Events API with the HTTP trigger.
- Interactive components: Buttons and menus in Block Kit render correctly, but callbacks require external webhook handling.
- Scheduling: Use a Delay node before the Slack connector node instead of Slack's scheduled messages.
Tendrl