Use variables
Depending on the action and/or operation you are defining in a flow, there are several ways you can add global and local variables to your flow.
Connection variables are available for action nodes and CLI nodes. When a node needs a cloud connection, choose a connection variable from the Connection variables section on the node's Connection tab (for action nodes) or directly in the Connection drop-down list (for CLI nodes). See Use a connection variable in an action node.
Add variables to parametersβ
You can use variables in action nodes.
Connection variables are not supported in node parameters.
-
Add an action node to your flow (or edit an existing one).
-
Depending on the parameters available for the action, select the plus (+) button next to the parameter where you want to add a variable.
-
Select Variables and expand Global Variables or Local Variables, depending on your requirements, and select the variable you want.

For parameters that expect a map (key-value structure), you can reference a variable or output from a previous node that contains the whole map. The flow uses the entire map at runtime, so you do not have to enter each key-value pair manually.
Use variables in Code and CLI nodesβ
In Code nodes and CLI nodes, you can reference global and local variables directly in your script using a built-in variables object. This is useful when your script logic depends on values that are managed as flow variables, such as region names, thresholds, or feature flags.
- Code node (JavaScript): Use
$variables.globalVariables.<name>or$variables.localVariables.<name>. - Code node (Python): Use
variables["globalVariables"]["<name>"]orvariables["localVariables"]["<name>"]. - CLI node: Use
$variables.globalVariables.<name>or$variables.localVariables.<name>.
In Code nodes, $variables and $nodes are runtime objects in your script (flow data is loaded when execution starts). CloudFlow does not rewrite your source text, so values follow normal JavaScript or Python rules for strings, objects, and quoting. The Code node editor provides autocomplete suggestions for $nodes, variable scopes, and individual variable names.
In CLI nodes, your script is executed by the shell. CloudFlow processes $variables and $nodes using text injection before the command runs. Each value is automatically wrapped to handle spaces and special characters. Unlike in Code nodes, these references are not live objects. They are swapped for plain text. Be careful when adding your own quotes or backslashes, as they will wrap around CloudFlow's internal formatting and may cause parsing errors.
Connection variables are not available using $variables. For CLI nodes, select a connection from the node's Connection drop-down list. You can pick a fixed connection or a connection variable. For Code nodes, pass the relevant values through a preceding node or a non-connection variable.
Add a connection variable in an action nodeβ
A connection variable is a variable whose value is one of your organization's AWS or GCP connections. Action nodes and CLI nodes can use that variable instead of picking a connection separately on every node. You update the connection in one place, which makes flows easier to reuse across accounts or environments and saves you from editing each node when the target connection changes.
Connection variables can be used in action nodes and CLI nodes. They are not available for use with other node types.
-
Create a variable with Type connection.
-
Add an action node to your flow (or edit an existing one).
-
Select the node's Connection tab.
-
Expand the Connection drop-down list. A Connection variables section is displayed.

The connections available match the action you are configuring. For example, for AWS actions only AWS connection variables are shown.
-
Under Connection variables, select the global or local connection variable you want.

Add a connection variable in a CLI nodeβ
You can also use connection variables in CLI nodes.
-
Create a variable with Type connection.
-
Add a CLI node to your flow (or edit an existing one).
-
In Parameters, under Cloud connection provider, choose Google Cloud (GCP) or Amazon Web Services (AWS).
-
Open the Connection drop-down list. The Connection drop-down list shows both connections and connection variables.
-
Select the connection variable you want. At runtime, CloudFlow resolves the variable to its underlying connection ID. Updating the connection variable changes which connection the CLI node uses without editing the node itself.
Filter using variablesβ
You can filter on variables in a flow.
-
Add a Filter node to your flow (or edit an existing one).
-
Select +Add a new filter (or edit an existing one).
-
Select the plus (+) button next to Value.
-
Select Variables and expand Global Variables or Local Variables, depending on your requirements, and select the variable you want.

Add variables to messagesβ
If you have an action node that requires approval, you can add variables to the notification message that requests approval for an action.
-
Add a node that requires approval to your flow (or edit an existing one).
-
In Parameters, select Require approval for this action.
-
In Message, enter your message. Whereever you want to add a variable, select the plus button (+).
-
Select Variables and expand Global Variables or Local Variables, depending on your requirements, and select the variable you want to add to the message.
