Global Variables
Global variables are useful when you want to store information between runs of a workflow or share information between different workflows.
Workflows do not have any concept of persistence. For example, the second time a workflow runs, it does not carry over data about the first time it ran. Global variables can be used to bridge this gap by storing information that persists.
In some instances, you may want multiple workflows to share information. A common example is an API key or Webex Teams room name.
The maximum number allowed of global and environmental variables combined is 300 per organization.
Global variables are created and managed under the Variables page.
- Choose Automate > Variables in the navigation menu.
- On the Global Variables tab, click New Variable.
- Click the Data Type drop-down menu and choose the data type for the variable. For more information, see the Data Types Help topic.
- Enter a meaningful Display Name and optional Description.
- Click the Scope drop-down menu and choose the scope for the global variable:
- Environment - Variables that store data specific to the environment that can be used across different workflows
- Global - Variables that store data that will persist across workflow runs or between different workflows
- Enter an optional Value or leave this blank if you intend to have the variable data updated by an activity in the workflow.
- Click Submit.
Using a global variable within a workflow is the same as using any other variable. On the Workflow Editor in the properties for an activity, Click the (Variable Reference) icon in a field and use the variable browser to select the variable you want to use.
You can also use the Set Variables activity in a workflow to update the value of a global variable within the workflow.