Workflow button element
A button that carries a workflow trigger with customizable inputs. In Repzo Chat, clicking it notifies your app, which runs the workflow.
| Type | workflow_button |
| Available in | Messages, Modals, Home tab |
| Works in blocks | Section block, Actions block |
Repzo Chat has no Slack workflows, so a click doesn’t start anything by itself: it’s delivered to the app that posted the message as a block_actions payload, carrying the button’s workflow object:
{ "type": "workflow_button", "action_id": "start_onboarding", "block_id": "onboarding_kickoff", "workflow": { "trigger": { "url": "https://hooks.example.com/workflows/customer-onboarding", "customizable_input_parameters": [ { "name": "account_id", "value": "ACC-5521" }, { "name": "plan", "value": "professional" } ] } }, "action_ts": "1793786400.000000"}Your app decides what to run with it — for example, start the onboarding in your own system with the input parameters. The trigger.url is never opened by Repzo. Values in customizable_input_parameters are visible to clients, so don’t put secrets in them.
See the button element for the rest of the payload.
Fields
Section titled “Fields”| Field | Type | Description | Required? |
|---|---|---|---|
type |
String | The type of element. In this case type is always workflow_button. |
Required |
text |
Text object | A text object that defines the button’s text. Can only be of type: plain_text. text may truncate with ~30 characters. Maximum length for the text in this field is 75 characters. |
Required |
workflow |
Workflow object | A workflow object that contains details about the workflow to run when the button is clicked. workflow.trigger.url is required. |
Required |
action_id |
String | An identifier for the action triggered when the button is clicked. You can use this when you receive an interaction payload to identify the source of the action. Should be unique among all other action_ids in the containing block. Maximum length is 255 characters. If you leave it out, Repzo generates one. |
Optional |
style |
String | Decorates buttons with alternative visual color schemes. Use this option with restraint. primary gives buttons a green look, ideal for affirmation or confirmation actions, and should only be used for one button within a set. danger gives buttons a red look and should be used when the action is destructive. Use danger even more sparingly than primary. If you don’t include this field, the default button style will be used. |
Optional |
accessibility_label |
String | A label for longer descriptive text about the button. This label will be read out by screen readers instead of the button text object. Maximum length is 75 characters. |
Optional |
Examples
Section titled “Examples”A section with a workflow button
Section titled “A section with a workflow button”
{ "blocks": [ { "type": "section", "block_id": "onboarding_kickoff", "text": { "type": "mrkdwn", "text": "*Northwind Traders* signed the Professional plan. Start the customer onboarding?" }, "accessory": { "type": "workflow_button", "action_id": "start_onboarding", "text": { "type": "plain_text", "text": "Start onboarding" }, "style": "primary", "workflow": { "trigger": { "url": "https://hooks.example.com/workflows/customer-onboarding", "customizable_input_parameters": [ { "name": "account_id", "value": "ACC-5521" }, { "name": "plan", "value": "professional" } ] } } } } ]}