Block kit in Workbot for Slack
Block Kit is Slack's UI framework that allows more control and flexibility when building messages for Slack.
You can also optionally provide secondary attachments, which will display below any defined blocks in the Post command reply or Post message actions.
Block kit previewer
Preview the messages you've built with the Post message or Post command reply actions by clicking on See preview on block kit builder in the block hint.
Block kit preview link
Placeholder info in block kit preview
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.
Behavior of blocks when used with message attachments
When both blocks and message attachments are defined, blocks will always appear above message attachments.
When any blocks are defined, any input in the Message text field will be used as the Slack notification message.
Supported blocks are displayed in the table below.
|Section with text||Displays text.|
|Section with image||Displays text alongside an image thumbnail.|
|Section with button||Displays text alongside a button.
On button submission, a button invokes another recipe and passes on any command input values it has.
|Section with fields||Displays 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 menu||Displays 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 menu||Displays 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 picker||Displays 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.
|Divider||A content divider, like an <hr>, used to split up different blocks inside of a message.|
|Image||Displays an image using a provided public URL.|
|Actions||A block that can hold multiple interactive elements like buttons, overflow menus, select menus, and date pickers.|
|Context||Displays 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.|
- Include up to 50 blocks in each message.
- File blocks are not supported at this point of time.