Skip to main content

Legacy steps from Apps workflow_step object

Welcome to the new home of Slack developer docs!

We're still building and not all features are available quite yet. Enjoy this peek into the future!

Not ready for the future? Return to the past at api.slack.com.

A workflow_step object holds information about an app's workflow step. This object is used during configuration and execution of a step as well as view submissions. The format of inputs and outputs will depend on the context of the step.

Arguments

FieldTypeDescription
workflow_step_execute_idStringAn identifier provided with workflow_step_execute event payloads. Used to call back to workflows.stepCompleted or workflows.stepFailed.
workflow_step_edit_idStringAn identifier provided with view_submission payloads. Used to call back to workflows.updateStep.
workflow_instance_idStringAn identifier provided with workflow_step_execute payloads. Unique to the current execution of the workflow.
workflow_idStringAn identifier for the workflow that the step is included in. Consistent across workflow executions.
step_idStringAn identifier for the step within the workflow. Consistent across workflow executions.
inputsObjectA key-value map of input objects that specify input required from a user. This is the data your app expects to receive when the workflow step starts.
outputsObject[]An array of output objects created during step execution. This is the data your app promises to provide when your workflow step is executed.

Example

{
"workflow_id": "12312",
"step_id": "123894",
"step_name": "Create Acme Issue",
"step_image_url": "https://acmecorp.cdn/path/to/square/image.png",
"inputs": {
"title": {
"value": "{{user}} submitted an issue",
"skip_variable_replacement": false
},
"submitter": {
"value": "{{user}}",
"skip_variable_replacement": false
},
"channel": {
"value": "{{channel}}",
"skip_variable_replacement": false
}
},
"outputs": [
{
"name": "ticket_id",
"type": "text",
"label": "Ticket ID"
},
{
"name": "title",
"type": "text",
"label": "Title"
}
]
}

input object

An object that holds information about the user inputs for that workflow step.

You can specify variables in your input's value object using a handlebar-like format, e.g. {{variable}}. During workflow execution, those variables will be replaced with their actual runtime value, unless you have skip_variable_replacement enabled. value can be any valid JSON value.

FieldTypeDescription
valueAnyThis is the input value. You can use {{variables}} which are included in the view_submission payload from a configuration modal. These variables refer to input from earlier workflow steps.
skip_variable_replacementBooleanFlag to specify if variables in value should be replaced. Default to true.
variablesObjectA key-value map of variables to replace

Example

"inputs": {
"title": {
"value": "{{user}} submitted an issue",
"skip_variable_replacement": false
}
}

output object

An object that holds information about outputs this workflow step will produce. Outputs can be used in subsequent steps of a workflow.

Arguments

FieldTypeDescription
nameStringDeveloper defined name that will be used as reference during execution.
typeStringType of the expected input. Can be text, channel or user.
labelStringLabel of this input field displayed to the user.

Example

{
"name":"ticket_id",
"type":"text",
"label":"Ticket ID"
}