You can add global variables to workflows to store static information, that is, information that is unlikely to change, such as a subdomain or an API version required to run a workflow. This procedure saves you from repeatedly entering the same information in every workflow block, reduces the likelihood of errors, and can be used across multiple workflows and integrations.
Creating a global variable
To create a global variable complete the following steps:
- Click Configuration > General > Global Settings.
- Click Add new variable(+).
- Add the variable name as the key, such as AWS.Version
- Enter a value. Using the example above, we would enter the API version as the value
- Save your changes.
Applying a global variable to a workflow
To apply a global variable to a workflow, complete the following steps:
- Navigate to Workflows and create a new workflow.
- Drag the API block onto the canvas.
- Select an API block from the list, supply the required information, and click Advanced Mode. If the workflow you need is not in the list, click Advanced Mode and create your own custom API block.
-
You can add a global variable to any of the following tabs:
- Information
- Params
- Headers
- Body
- Response
- Use the following syntax
{{GlobalSetting['variable_name']}}
to add a global variable. Using the example above, we would enter{{GlobalSetting['AWS.Version']}}
.
Result
When the workflow is run, the global variable references the value stored in Configuration > General > Global Settings.
Did you know?
You can also add a global variable to a text field in an Update Block, the Message tab of a Notification or Decision block, or in the Integration details section of an extended integration.
Comments
0 comments
Please sign in to leave a comment.