Loopfour
Integrations

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 idStudio labelWhat it does
slack.sendMessageSend MessagePost a message to a channel, optionally in a thread or with Block Kit blocks.
slack.updateMessageUpdate MessageEdit a message.
slack.scheduleMessageSchedule MessageSchedule a message for a later time.
slack.deleteMessageDelete MessageDelete a message.
slack.uploadFileUpload FileUpload a file (base64) or text content to a channel.
slack.getChannelGet Channel InfoRead a channel's details.
slack.listChannelsList Channels
slack.getUserGet User InfoRead a user's profile.
slack.lookupUserByEmailLookup User by EmailFind a user by email address.
slack.addReactionAdd ReactionAdd an emoji reaction to a message.

Settings

FieldStudio labelTypeUsed byRequired for
connectionSlack Workspacestring (connection id)AllOptional. Without it the step uses the company default connection for this system
channelChannelstringsendMessage, updateMessage, scheduleMessage, deleteMessage, uploadFile, getChannel, addReaction
textMessagestringsendMessage, updateMessage, scheduleMessage
blocksBlock Kit Blocks (JSON)jsonsendMessage, updateMessage
threadTsReply in Thread (optional)stringsendMessage, uploadFile
tsMessage TimestampstringupdateMessage, deleteMessage
postAtSend At (Unix timestamp or ISO)stringscheduleMessage
fileFile (base64)stringuploadFile
contentText ContentstringuploadFile
filenameFilenamestringuploadFile
titleTitle (optional)stringuploadFile
initialCommentMessage (optional)stringuploadFile
userIdUser IDstringgetUser
emailEmailstringlookupUserByEmail
reactionNameEmoji NamestringaddReaction
timestampMessage TimestampstringaddReaction

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:

ActionStudio fieldExecutor field
getChannelchannelchannelId
addReactionreactionNamename (emoji name without colons)

Studio saves Slack steps as "type": "slack" with config.operation and maps those two fields itself.

Other rules:

  • sendMessage, scheduleMessage and updateMessage need text or blocks. blocks is a Block Kit array.
  • scheduleMessage reads postAt as a Unix timestamp in seconds or an ISO 8601 string.
  • updateMessage and deleteMessage need channel and ts. addReaction needs channel, timestamp and name.
  • uploadFile takes file (base64, for PDFs, images and spreadsheets) or content (plain text such as CSV). file wins when both are set. channel must be a channel ID such as C01234567, not #name. Files are limited to 50 MiB, and threadTs works with one channel only.
  • listChannels returns 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/slack returns the actions, fields and trigger events.
  • GET /api/v1/blocks/slack/actions/<operation>/examples returns stored input and output examples.

Errors and limits

  • Slack answers HTTP 200 with ok: false on failure. The step then fails with Slack API error: <error>, such as channel_not_found.
  • A missing required field fails the step before Slack is called.
  • File uploads time out after 2 minutes.

On this page