Ask or search…
Comment on page

Using variables in workflows

Private Beta
This feature is available in Private Beta. Please get in touch with our team to enable it in your account.

Creating variables

Workflows allows defining global variables that can be used as values for component's settings.
In order to start using variables, click on the three dots in the upper-right corner and find 'Variables'.
A modal screen will appear where variables can be created:
  • Name: Define a name for the variable. It shouldn't contain spaces or special characters. This is the name that will be used later to assign a variable to a component's setting.
  • Type: Number and String variables are supported.
  • Default value: The default value for the variable. When executing a workflow from the UI, this is the value that will be given to the variable.
  • Parameter: Mark a variable as parameter if you need to allow external access to it. This is helpful when running a workflow via API call.
Learn more about executing parameterized workflows in this section.
Click on the '+' button to add the variable. A new entry will appear where you can keep adding variables.

Using variables in components

Once a variable has been defined, you can use them to control the value of a component's settings. As global variables, they can be used in one or many occasions within the same workflow, and they will apply the same value to the setting where they're used.
To use a variable in a setting, just start typing {{@variable_name}} and the available matching variables will appear. Make sure that you close the variable name with double curly braces, as shown in the screenshot below
In this example, the default value for the buffer_radius variable will be used as the value for the 'Distance' setting in the ST Buffer component.