Adding Flow Variables
Variables allow for a customized flow configuration and environment parameterization, eliminating the need to create a separate integration flow for each environment.
| If your flow has a REST trigger, it will not be possible to use environment variables in the URI. |
Creating a variable
Variables can be created in both the Diagram and Source Code tabs.
In the Diagram tab:

-
Click on the variables icon
in the left corner of the canvas. -
Select the environment: click the name of the environment in which the variable will be applied: Production or Staging.
-
Register the variable in the form that will open.
-
Save the variable, by clicking SAVE.
In the Source Code tab, in the Source > Flow Variables folder:

-
Select the environment in which the variable will be applied: Production or Staging.
-
Register the variable in the form that will open.
-
Save the variable, by clicking SAVE.
To register a variable, fill in the following fields:
-
Variable: variable name. Alphanumeric field. You can use the characters
.and_. -
Value: value assigned to the variable, which will be deployed automatically according to the environment you selected.
|
To apply the variables, provide the variable name enclosed in curly braces within the component, as shown in the example below:
In this case, follow the steps below:
|
Managing variables
-
To add more than one variable, click the + button in the right corner.
-
To delete a variable, click the trash icon.
-
To hide a variable, click the eye icon.
| You cannot change the variables of a deployed flow with a Deployed status. To change them, you must deploy the flow again. |
Blocked variables
The variables listed below are reserved for internal use and cannot be assigned:
AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_REGION AWS_DEFAULT_REGION RESOURCES_DIR CAMEL_* (any variable that begins with CAMEL_)
Examples
The example below references the variable "name". During the execution of this integration, the variable will be replaced with the registered name.
- from:
uri: rest:get:/hello
steps:
- log:
message: Hello {{name}}

In this other example, we reference a variable in a URL.
- to:
id: to-generic
uri: https://{{url}}
parameters:
httpMethod: POST

Share your suggestions with us!
Click here and then [+ Submit idea]