Skip to main content

Introduction

Variables allow you to store important pieces of information in a single place. If the information changes, you only need to update the variable once, rather than in multiple flows, reducing errors and making flows easier to maintain. In addition, variables help to make your flows more reusable. Instead of hardcoding values, you can use the same CloudFlow for different accounts, subscriptions, or projects.

For example, you can create an approver variable that can be used in all flows requiring action approval. You only need to update the approver's email address once by amending the approver variable, rather than updating each individual flow.

You can reference variables in your flows in the same way you reference data.

Variable scope

Variables can be global or local.

  • Global variables are accessible to all the flows within your organization. You can use global variables when you have data that needs to be accessed by more than one CloudFlow. In other words, the data is a constant that should be centrally managed.

  • Local variables are accessible within the flow where they are defined. You can use local variables when data is only relevant to a specific flow. For example, if you have a flow for a particular AWS account, Azure subscription, or Google Cloud project, you can use a local variable for its ID. This means you only need to define the ID once, rather than adding it to each node in the flow. To reuse the flow for another cloud target, duplicate the flow and update the ID variable. Local variables include an optional value, which is useful for flow templates where values are filled in later.

Variable types

When you create a variable, you select its data type.

Note

Connection variables can be used in action nodes and CLI nodes. They are not available for use with other node types.

When you update the value of a connection variable, every action node and CLI node that uses that variable automatically runs with the new connection, so you do not need to edit each node individually.

TypeDescriptionExample
StringText valuehello
IntegerWhole number42
FloatDecimal number3.14
BooleanTrue or falsetrue
ListOrdered collection; set Element Type (string, integer, float, or boolean) for every item[1, 2, 3]
ConnectionAWS, GCP, OpenAI, or Anthropic connection; set Connection Type and choose a connection from your organization's connections. Action nodes support these connection types; CLI nodes support AWS and GCP connections. Azure connections must be selected directly on Azure nodes. See Create and manage variables, Add a connection variable in an action node, and Configure the CLI node.