Block kit in Workbot for Slack

Block Kit is Slack's UI framework, which offers more control and flexibility when building messages for Slack.

You can stack blocks, customize their order and appearance, and customize the elements within each block. The following table describes the different types of blocks and the actions that support them.

Blocks can be used in the following Slack surfaces:

SurfaceApplicable actions
MessagesPost message, Post command reply
ModalsOpen/update or push modal
App homePublish app home view

Compatibility with message attachments

Post message and post command reply previously used message attachments to construct messages. Blocks can be used together with message attachments.

You can optionally provide secondary attachments, which will display below any defined blocks.

Behavior of blocks when used with message attachments

  • When both blocks and message attachments are defined, blocks will always appear above message attachments. Blocks with message attachments

  • When any blocks are defined, any input in the Message text field will be used as the Slack notification message.

Message text

Supported blocks

Workbot for Slack supports the following block types:

BlocksDescription
Section with textDisplays text.
Section with imageDisplays text alongside an image thumbnail.
Section with buttonDisplays text alongside a button.

You can configure Workato to take one of the following actions on button-click: continue recipe, run a bot command, or open a URL.
Section with fieldsDisplays text, along with an array of title-value fields, rendered in 2 columns beneath the section text. Maximum number of fields is 10. Maximum length for the text in each field is 2000 characters.
Section with select menuDisplays text, alongside a select menu. Supports Slack's built-in dynamic menus such as Select user, Select conversation, Select channel. You can also define your own custom dynamic menu.

On submission, a menu option invokes another recipe and passes on any command input values it has.
Section with overflow menuDisplays text, alongside an overflow menu. Supports static or dynamically generated overflow menu options.

On submission, an overflow menu option invokes another recipe and passes on any command input values it has.
Section with date pickerDisplays text, alongside a date picker.

On date selection, a date picker invokes another recipe and passes on the selected date via a date parameter. You can customize the name of this date parameter.

You can optionally pass additional command input values together with the date parameter.
Repeat block group This a special block type that's available only on the Workato bot platform. The repeat block group allows you to define a set of blocks to use as a pattern. By iterating through an existing list and mapping the list fields to the fields of the blocks in the pattern, you can dynamically generate repeat blocks.
DividerA content divider, like an <hr>, used to split up different blocks inside of a message.
ImageDisplays an image using a provided public URL.
ActionsA block that can hold multiple interactive elements like buttons, overflow menus, select menus, and date pickers.
ContextDisplays message context, which can include both images and texts. All images and texts will be joined together into a single string, in the order they appear in.

Limitations

Max number of blocks

The following table shows the max number of blocks that Slack allows you to publish on a surface.

SurfaceMax no. of blocks
Messages50
Modals100
App home100

Character limits in block kit elements

When posting to surfaces on Slack, Workbot uses the value & action_id fields to pass bot commands and parameters. These fields have character limits. While bot commands & command input values are exposed to the user for use, Workbot reserves 9 characters for internal use. Additionally, spaces also contribute to the character count.

WARNING

Since Submit button/menu option commands, Command input values, spaces & 9 characters (Workbot internal use) are combined and passed through value or action_id, they share the same character limit.

The following table shows the character limits found in block kit elements.

Block kit elementsCharacter count contributorsCharacter limitField used in payloadSurfaces
Section with button

Actions: Button
  • Submit button command
  • Command input values
  • Workbot internal use (9 characters)
  • Spaces
2000value
  • Messages
  • App home
  • Modals
Section with select menu
  • Submit menu option command
  • Command input values
  • Workbot internal use (9 characters)
  • Spaces
255action_id
  • Messages
  • App home
  • Modals
Actions: select menu
  • Submit menu option command
  • Command input values
  • Workbot internal use (9 characters)
  • Spaces
75value
  • Messages
  • App home
  • Modals
Section with overflow menu

Actions: Overflow menu
  • Submit menu option command
  • Command input values
  • Workbot internal use (9 characters)
  • Spaces
75value
  • Messages
  • App home
  • Modals
Section with date picker

Actions: Date picker
  • Submit menu option command
  • Command input values
  • Workbot internal use (9 characters)
  • Spaces
255action_id
  • Messages
  • App home
  • Modals
Select menu input
*Types: Custom, Dynamic*
Value to pass when this option is selected75valueModals only
Section with radio buttons
  • Submit menu option command
  • Command input values
  • Workbot internal use (9 characters)
  • Spaces
75valueModals only
Checkboxes inputValue75valueModals only
Radio buttons inputValue75valueModals only

Character types

The Open/update or push modal view action does not support CamelCase characters or comma-separated name-value pairs as Command input values for Modal submissions. Use JSON to define these values, for example, {"account_id": "12345"}. However, CamelCase parameters are supported within JSON, for example, {"AccountID": "12345"}. Command input values also support passing JSON arrays and objects as parameters. Learn more about Command input values in modals.

Last updated: