Environment Variables
Environment variables enhance the flexibility of workflow modules, such as API Request, Dynamic Form, Validator, and Custom Response. They allow you to avoid hardcoding static values like keys, URLs, or tokens, making workflows more adaptable and easier to manage.
Instead of embedding these values directly into workflows, you can define them as environment variables for the specific flow and reference them dynamically.
Set Environment Variables
1 Navigate to the workflow module where you want to use environment variables.
2 Click the Edit icon to open the environment variables configuration panel.
3 In the panel, define the required environment variables using the JSON format. For example:
{
"Authorization": "hg345667oguixxxxxxxxx"
}
In this example, "Authorization"
is the key, and "hg345667oguixxxxxxxxx"
holds the token value.
Use Environment Variables in Workflows
Once defined, you can reference these variables in your workflow modules. Use the syntax ${env.<VariableName>}
to use the variable dynamically. For example:
In API Request Headers:
To include the authorization token in the headers, specify the value as:
In Workflow Claims:
If the workflow is required to use the environment claims, use the variable in the definition, such as:
By integrating environment variables, workflows become dynamic, adaptable, and easier to configure, especially for scenarios that require frequent changes or multiple configurations.