Dynamic Variables
Dynamic variables are variables that are generated during workflow execution. These variables enable workflows to adapt to real-time data, allowing workflows to function dynamically rather than relying on inputs that contain static values. They can represent various types of data, including metadata, user input, step outputs, or event payloads.To simplify the process of selecting and using dynamic variables, Blink provides the Variable Picker—a tool that allows users to insert dynamic variables without needing to understand complex expression syntax.
Dynamic Variables Types
Dynamic Variable Type | Description | |
---|---|---|
Steps | Step-related variables include status, outputs, or results from previous workflow steps. | |
Local variable | Variables that are created within the workflow using the Set Variable action | |
Files | Variables that represent files used in the workflow, including file paths, sizes, and identifiers. | |
Global variables | Variables defined within a Workspace and accessible across the entire workspace. Global variables can be Raw value or Secret. | |
Metadata | Metadata variables provide workflow-related information:
| |
Input Parameters- Only available in On-demand workflows | These are values defined when triggering an On-demand workflow. | |
Event payload- Only available in On-demand workflows | This refers to the data received from the triggering event in an Event-based workflows. When an event occurs, it generates specific data that is passed into the workflow, enabling it to execute the necessary actions based on the event’s details. |
Adding Dynamic Variables in Workflows
There are two ways distinct way in which you can add dynamic variables to input parameters throughout Workflows
The Variable Picker
The Variable Picker allows users to insert dynamic variables easily into workflows without manually writing expressions. It is compatible with all input types.
Blinks Expression Langauge
The Dynamic Variables can also be added manually using the expression language syntax.
Using the Variable Picker to Add Dynamic Variables
NOTE
When using the same dynamic variable in multiple steps with different value types, the variable will always take the value type from the last step where it was set. The first value type will be overwritten by the second one.
Access the Variable Picker
Click the button in the parameter field where you want to use a variable.
Search for a Specific Variable
In the Variable Picker, type to search for a specific variable.
Select the Desired Variable
Select the desired variable. It appears in the picker’s headline.
View the Variable Tag in the Step Field
The variable tag is displayed in the step field.
Workflow Executes and Replaces the Tag
When executed, the workflow replaces the tag with the actual value.
Referencing a Key in a JSON Object
If a workflow step outputs a JSON object, you can reference a specific key:
Paste the value into another step where needed.
Using Expression Language with Dynamic Variables
The Dynamic Variables can also be added manually using expression language syntax. Blink’s expressions language is based on the Expr library package. Anything supported by ‘Expr’ also works in Blink.
- To see the supported syntax to manually add a Dynamic Variable to a worlflow input, click here
- Functions can be added to Dynamic Variables or Static Variables. To see the supported syntax of adding Functions to Dynamic Variable, click here
- Operators can be added to Dynamic Variables or Static Variables. To see the supported syntax of adding Operators to Dynamic Variables, click here
Recommendations and Limitations
- Avoid reusing the same dynamic variable in multiple steps with different value types; the last assigned type takes precedence.
- Ensure the workflow is correctly structured to prevent missing values in dynamic variables.
Related Articles
Was this page helpful?