Automation Variables add dynamic capabilities to your automations by allowing you to store, reference, and pass data across various actions. They enable adaptable workflows by integrating context-specific data, which can be used conditionally to control automation actions, creating more precise and flexible operations.
Key Features
Conditional Control: Automation Variables exist only within an automation and can determine whether future actions run or are skipped based on specific conditions.
Data Sharing Across Actions: Variables allow for data to be shared between different actions within the same automation, enhancing the cohesion of your automation flows.
Integration with Scripts: Variables can be mapped to script variables, allowing data to flow seamlessly between automations and scripts, creating adaptable and efficient workflows.
Creating Automation Variables
From the Automation Menu:
Within an automation, select Variables from the top menu. Here, you’ll see all variables associated with this automation and can add new ones.
Provide a unique name for each variable (without spaces) and, if needed, a default value.
From an Action Output:
Variables can also be created dynamically from any action’s output by selecting Additional options in the action setup.
Under Assign action output to variable, specify the name of the variable to store the output.
Using Automation Variables
Referencing Variables:
You can use Automation Variables wherever you see the variable icon. For example, in a Shell action, click the variable icon to access a list of available variables and custom fields.
Select a variable to dynamically insert its value into your action or script.
Mapping Script Variables to Automation Variables
Script-Variable Mapping
When using a script that has predefined variables, you can map these script variables to Automation Variables for seamless data integration.
To do this, add a Run Script action and select a script with variables. Level will automatically detect the script’s variables and provide a mapping section where you can assign values from Automation Variables.
Summary
Automation Variables enhance the flexibility and efficiency of your automations in Level by enabling data-driven decision-making within workflows. Whether setting conditions, sharing data between actions, or mapping to script variables, Automation Variables are essential for creating responsive, customized, and powerful automations.