Workflow button
A button that runs a Slack workflow's link trigger.
workflow_button looks like a regular button with a small lightning-bolt glyph, and carries a
workflow object describing the link trigger
it runs when clicked.
Fields
typestring
Always `workflow_button`.
stringtextPlainTextElement
The button's label. Truncates around 30 characters. Maximum length is 75 characters.
PlainTextElementworkflow{ trigger: { url: string; customizable_input_parameters?: { name: string; value: string }[] } }
The link trigger this button runs, and any input values to pass to it.
{ trigger: { url: string; customizable_input_parameters?: { name: string; value: string }[] } }style?"primary" | "danger"
`primary` renders green, `danger` renders red. Omit for the default gray style.
"primary" | "danger"accessibility_label?string
Read by screen readers instead of `text`. Maximum length is 75 characters.
stringconfirm?ConfirmationDialog
Shows a confirmation dialog before the click is dispatched. See Confirmation dialogs.
ConfirmationDialogExamples
Primary style
Interactivity
Clicking the button (after any confirm dialog is accepted) calls onAction with a
workflow_button action carrying the workflow object and text back verbatim:
{
"type": "workflow_button",
"action_id": "run_workflow",
"block_id": "workflow",
"action_ts": "1706000000.000100",
"text": { "type": "plain_text", "text": "Run workflow", "emoji": true },
"workflow": {
"trigger": {
"url": "https://slack.com/shortcuts/Ft0123ABC456/321cba",
"customizable_input_parameters": [
{ "name": "input_parameter_a", "value": "Value for input param A" }
]
}
},
"style": "primary"
}
style is only included when the element sets it. A workflow button doesn’t write to
state.values: it’s a one-shot action.