Skip to main content

Workflow YAML

The Workflow YAML contains all the information about the Workflow. Its name, description, runner, etc. It also includes a list of the Workflow's Steps, and each step has a name, action, inputs, and a connection.

Any Workflow has a YAML format representation which looks like this:

Thumbnail

Viewing your Workflow in YAML format

  1. In the Workflow Editor, in the top-right corner, click the Thumbnail icon and then select the Edit YAML option . Your Workflow is presented in YAML format.
Thumbnail

Workflow YAML Grammar

The Workflow YAML is used to describe the Workflow and is defined as YAML . These attributes are present in the Workflow YAML file:

  • name - Name of the Workflow.
  • type - Can be either a Flow or Subflow Workflow.
  • Workflow_type - The Workflow type represents how the Workflow will be used: on_demand, event or scheduled
  • active - True while the Workflow is running, false otherwise.
  • desc - Description of the Workflow.
  • connections- The Workflow's connection, in the following format: connection-type:connection-name.
  • workflow- The workflow representation. Workflow is built by sections that contains a name and steps
  • steps - There are two types of steps: Action and Text. Each type contains different attributes: Action
  • action - The full name of the action.
  • id - ID of the step.
  • name - Name of the step.
  • desc- Description of the step.
  • inputs- The Action's inputs, in the following format:input-field-name:value

Action inputs might be encapsulated, for example:

input-field-name:
sub-input-field: value
sub-input-field-2: value2
  • connections - The connection of the step, in the following format: `connection-type: connection-name`.
  • steps - Flow Control actions such as `internal.for` iterates over all the `steps` and executes them.
  • transitions - Flow control actions such as `internal.if` contains the `transitions` field built as following:
transitions:
- on: true
steps: ...
- on: false
steps: ...

One of the steps branches will execute depending on the evaluated condition, which is provided on the if action.

Text

  • text - Free text. (this is unrelated to the steps attribute.)
  • counting_steps - The number of steps in the Workflow.

YAML Format Examples

Example of Input and Output Parameters

name: output parameters
type: Flow
automation_type: on_demand
inputs:
name:
default: Ofir
display_name: Name
name: name
placeholder: Enter your name
required: true
type: text
outputs:
Welcome Message: "{{ steps.S1.output }}"
workflow:
- section: Formatting
steps:
- action: core.bash
id: S1
name: Format welcome message
inputs:
code: echo "Welcome, {{inputs.name}}!"
counting_steps: 0

Sharing your Workflow in YAML format

You can share your Workflow with someone who is not in your Workspace

  1. In the Workflow Editor, in the top-right corner, click the Thumbnail icon and then select the Edit YAML option . Your Workflow is presented in YAML format.
Thumbnail
  1. Copy the Workflow in YAML format and paste it into any platform to which you want to share. The receiver can copy/paste the Workflow into the Blink platform and can use the Workflow.
Thumbnail