Context actions block
Fields
Field | Type | Description | Required? |
---|---|---|---|
type | String | The type of block. For a context actions block, type is always context_actions . | Required |
elements | Object[] | An array of feedback buttons elements and icon button elements. Maximum number of items is 5. | Required |
block_id | String | A unique identifier for a block. You can use this block_id when you receive an interaction payload to identify the source of the action. If not specified, block_id will be generated. Maximum length for this field is 255 characters. block_id should be unique for each message and each iteration of a message. If a message is updated, use a new block_id . | Optional |
Example
Context actions block with feedback buttons:
{
"type": "context_actions",
"elements": [
{
"type": "feedback_buttons",
"action_id": "feedback_buttons_1",
"positive_button": {
"text": {
"type": "plain_text",
"text": "👍"
},
"value": "positive_feedback"
},
"negative_button": {
"text": {
"type": "plain_text",
"text": "👎"
},
"value": "negative_feedback"
}
}
]
}
Context actions block with an icon button:
{
"type": "context_actions",
"elements": [
{
"type": "icon_button",
"icon": "trash",
"text": {
"type": "plain_text",
"text": "Delete"
},
"action_id": "delete_button_1",
"value": "delete_item"
}
]
}