Slack actions
Reference for the Slack actions: the workspace connection, each action id, the fields each executor reads, file upload limits, outputs and an example.
The Slack block posts, edits, schedules and deletes messages, uploads files, reads channels and users, and adds reactions. For the plain-language guide, see Slack.
When to use it
Use it to tell a team that something happened or needs attention: a close task finished, a list of unmatched transactions, or a file the workflow produced. To start a workflow from Slack, use a Slack trigger; see Slack triggers. For approvals in Slack, use the Approval block with the Slack channel.
Connection
- Provider id:
slack. Slack OAuth. - Pin a workspace with
config.connection. Without it, the step uses the company's default Slack connection.
Actions
| Action id | Studio label | What it does |
|---|---|---|
slack.sendMessage | Send Message | Post a message to a channel, optionally in a thread or with Block Kit blocks. |
slack.updateMessage | Update Message | Edit a message. |
slack.scheduleMessage | Schedule Message | Schedule a message for a later time. |
slack.deleteMessage | Delete Message | Delete a message. |
slack.uploadFile | Upload File | Upload a file (base64) or text content to a channel. |
slack.getChannel | Get Channel Info | Read a channel's details. |
slack.listChannels | List Channels | |
slack.getUser | Get User Info | Read a user's profile. |
slack.lookupUserByEmail | Lookup User by Email | Find a user by email address. |
slack.addReaction | Add Reaction | Add an emoji reaction to a message. |
Settings
| Field | Studio label | Type | Used by | Required for |
|---|---|---|---|---|
connection | Slack Workspace | string (connection id) | All | Optional. Without it the step uses the company default connection for this system |
channel | Channel | string | sendMessage, updateMessage, scheduleMessage, deleteMessage, uploadFile, getChannel, addReaction | |
text | Message | string | sendMessage, updateMessage, scheduleMessage | |
blocks | Block Kit Blocks (JSON) | json | sendMessage, updateMessage | |
threadTs | Reply in Thread (optional) | string | sendMessage, uploadFile | |
ts | Message Timestamp | string | updateMessage, deleteMessage | |
postAt | Send At (Unix timestamp or ISO) | string | scheduleMessage | |
file | File (base64) | string | uploadFile | |
content | Text Content | string | uploadFile | |
filename | Filename | string | uploadFile | |
title | Title (optional) | string | uploadFile | |
initialComment | Message (optional) | string | uploadFile | |
userId | User ID | string | getUser | |
email | string | lookupUserByEmail | ||
reactionName | Emoji Name | string | addReaction | |
timestamp | Message Timestamp | string | addReaction |
Fields each action reads
Write steps as "type": "action" with "action": "slack.<operation>". The step config goes to the executor as written, so use the executor's field names. They match the Studio fields except in two places:
| Action | Studio field | Executor field |
|---|---|---|
getChannel | channel | channelId |
addReaction | reactionName | name (emoji name without colons) |
Studio saves Slack steps as "type": "slack" with config.operation and maps those two fields itself.
Other rules:
sendMessage,scheduleMessageandupdateMessageneedtextorblocks.blocksis a Block Kit array.scheduleMessagereadspostAtas a Unix timestamp in seconds or an ISO 8601 string.updateMessageanddeleteMessageneedchannelandts.addReactionneedschannel,timestampandname.uploadFiletakesfile(base64, for PDFs, images and spreadsheets) orcontent(plain text such as CSV).filewins when both are set.channelmust be a channel ID such asC01234567, not#name. Files are limited to 50 MiB, andthreadTsworks with one channel only.listChannelsreturns public and private channels, excluding archived ones, 100 at a time by default.
Output
The step output is the Slack Web API response, with ok: true. sendMessage returns channel, ts and message. Read the timestamp with {{steps.<stepId>.ts}}, for example to reply in the thread or update the message later.
Example
Post the close status to a channel, then reply in its thread with the list of open items. The caller passes openItems as text.
{
"name": "Post close status",
"trigger": { "type": "api" },
"steps": [
{
"id": "post_status",
"type": "action",
"name": "Post close status",
"action": "slack.sendMessage",
"config": {
"channel": "C01234567",
"text": "Bank reconciliation for {{input.period}} is done."
}
},
{
"id": "post_open_items",
"type": "action",
"name": "Reply with open items",
"action": "slack.sendMessage",
"config": {
"channel": "C01234567",
"threadTs": "{{steps.post_status.ts}}",
"text": "Open items:\n{{input.openItems}}"
}
}
]
}Other executors
The Slack module also registers sendEphemeral, getPermalink, removeReaction, getFile, deleteFile, openModal, updateModal, pushModal, publishHomeTab, listUsers, createChannel, inviteToChannel, archiveChannel, setChannelTopic, getChannelHistory and addBookmark. They are not in the block's action list, so workflow validation rejects them as slack.<operation> steps.
Live catalog
GET /api/v1/blocks/slackreturns the actions, fields and trigger events.GET /api/v1/blocks/slack/actions/<operation>/examplesreturns stored input and output examples.
Errors and limits
- Slack answers HTTP 200 with
ok: falseon failure. The step then fails withSlack API error: <error>, such aschannel_not_found. - A missing required field fails the step before Slack is called.
- File uploads time out after 2 minutes.
Salesforce actions
Reference for the Salesforce actions: the sign-in connection, each action id, the fields each executor reads, outputs, and a complete query example.
Stripe actions
Reference for the Stripe actions: how the connection works, each action id and what it does, the step settings, outputs and a complete example.
Loopfour