Slack
Post and manage Slack messages, channels, reactions, and users from inside an agent workflow.
Slack actions let an agent work with a workspace directly in a flow. An agent can post, update, delete, and search messages, manage channels, add reactions, and look up users, then pass the results to later steps.
Supported actions
| Group | Actions |
|---|---|
| Message | Post, Update, Delete, Search |
| Channel | Create, Get, Get All |
| Reaction | Add |
| User | Info, Get All |
Prerequisites
How to use these actions
- Map text inputs from earlier steps. Inputs such as Channel, Text, and Query accept a value mapped from a previous step.
- Toggles and counts take fixed values. The Is Private, Exclude Archived, Reply Broadcast, Unfurl Links, and Unfurl Media toggles, along with Limit and Count, are set to fixed values.
- Messages are addressed by channel and timestamp. To update, delete, or react to a message, supply its channel ID and its message Timestamp.
- Reply in a thread. Set Thread Timestamp on Message Post to the timestamp of a parent message so the new message lands in that thread.
- Search needs a user token. Message Search requires a credential backed by a Slack user token. The other actions use a bot token.
- Reaction names omit colons. Use the emoji name without surrounding colons, for example
thumbsup.
Actions
Message
Slack Message Post
Posts a message to a channel, group, or user.
| Input | Required | Description |
|---|---|---|
| Channel | Yes | The channel, group, or user ID to post to. |
| Text | Yes | The message text. Supports Slack mrkdwn formatting. |
| Thread Timestamp | No | The timestamp of a parent message to reply to. |
| Reply Broadcast | No | Toggle. When on, also posts a threaded reply to the channel. Defaults to off. |
| Unfurl Links | No | Toggle. Whether to show previews for links. Defaults to on. |
| Unfurl Media | No | Toggle. Whether to show previews for media. Defaults to on. |
Slack Message Update
Updates an existing message.
| Input | Required | Description |
|---|---|---|
| Channel | Yes | The channel, group, or user ID the message is in. |
| Timestamp | Yes | The timestamp of the message to update. |
| Text | Yes | The new message text. |
Slack Message Delete
Deletes a message.
| Input | Required | Description |
|---|---|---|
| Channel | Yes | The channel, group, or user ID the message is in. |
| Timestamp | Yes | The timestamp of the message to delete. |
Slack Message Search
Searches for messages across the workspace.
| Input | Required | Description |
|---|---|---|
| Query | Yes | The search query. Supports modifiers like from:, in:, and has:. |
| Sort Direction | No | Sort order, either asc or desc. Defaults to desc. |
| Count | No | Maximum number of results to return, from 1 to 100. Defaults to 20. |
Channel
Slack Channel Create
Creates a new channel.
| Input | Required | Description |
|---|---|---|
| Name | Yes | The channel name. Lowercase, no spaces, up to 80 characters. |
| Is Private | No | Toggle. When on, creates a private channel. Defaults to off. |
Slack Channel Get
Retrieves a single channel.
| Input | Required | Description |
|---|---|---|
| Channel ID | Yes | The unique identifier of the channel to retrieve. |
Slack Channel Get All
Lists channels in the workspace.
| Input | Required | Description |
|---|---|---|
| Exclude Archived | No | Toggle. When on, omits archived channels. Defaults to off. |
| Limit | No | Maximum number of channels to return, from 1 to 1000. Defaults to 100. |
| Types | No | Comma separated list of channel types to include. One or more of public_channel, private_channel, mpim, and im. |
Reaction
Slack Reaction Add
Adds an emoji reaction to a message.
| Input | Required | Description |
|---|---|---|
| Channel | Yes | The channel, group, or user ID the message is in. |
| Timestamp | Yes | The timestamp of the message to react to. |
| Name | Yes | The emoji name without colons, for example thumbsup. |
User
Slack User Info
Retrieves a single user.
| Input | Required | Description |
|---|---|---|
| User ID | Yes | The unique identifier of the user to retrieve. |
Slack User Get All
Lists the users in the workspace.
| Input | Required | Description |
|---|---|---|
| Limit | No | Maximum number of users per page, from 1 to 1000. Defaults to 100. |
Example
An agent that posts an alert and confirms it in a thread:
A Slack Message Post action sets Channel to the alerts channel and maps Text to a summary built by an earlier model step.
A second Slack Message Post action sets Thread Timestamp to the timestamp returned by the first post, then adds follow up detail in that thread.
A Slack Reaction Add action sets Channel and Timestamp to the original message and adds the eyes reaction to show the alert was seen.
Troubleshooting
For issues common to every vendor, see the Actions overview.