Docs / Strand / connectors/slack

Slack Connector

Send messages, update posts, and add reactions in Slack workspaces from your Strand workflows.

Prerequisites

You need a Slack Bot Token to use this connector. Here's how to get one:

  1. Go to api.slack.com/apps and click Create New App
  2. Choose From scratch, name your app, and select your workspace
  3. Go to OAuth & Permissions in the sidebar
  4. Under Bot Token Scopes, add the scopes you need:
  1. Click Install to Workspace and authorize
  2. 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:

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.

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 Yes Bot User OAuth Token (starts with xoxb-, encrypted at rest)
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:

code

*Alert:* {{ payload.service }} is {{ payload.status }}

Example: Block Kit message:

json

[
  {
    "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:

code

{{ 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

json

{
  "success": true,
  "status": "sent",
  "data": {
    "channel": "C0123456789",
    "ts": "1234567890.123456",
    "message": { ... }
  },
  "service": "slack",
  "operation": "send_message"
}

Key fields for subsequent nodes:

Update Message Output

json

{
  "success": true,
  "status": "updated",
  "data": {"channel": "C0123456789", "ts": "1234567890.123456"},
  "service": "slack",
  "operation": "update_message"
}

Add Reaction Output

json

{
  "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

  1. Create Connector with your Slack bot token and default channel #alerts
  2. Send alert message when a workflow triggers:
  1. Add reaction to confirm processing:

Limitations