Understanding Flow Variables

Updated 3 months ago by Karan

In this guide, you will understand how to use variables in a flow. The variable is a symbol that functions to hold dynamic values or expressions. The role of a variable may change during the execution of the flow.

Let's get started.

Flow Input Variables

In a flow, we make use of the variables in each node that hold the input value and the output value. The values are transferred from one node to another node with the help of the variables.

Trigger Variables

Every flow starts with a trigger node. Except for Scheduler, all trigger nodes can pass variables to the flow run. These trigger variables can be accessed in any node using the symbol ${input.variableName}. For example, if you pass tableName field in the Form submission trigger, it can be accessed in any node using ${input.tableName}

Node Output Variables

A flow consists of several nodes. Each node produces output after the execution. This output can be used in the downstream nodes using the notation: ${<nodeId>.output.<field>}.

You don't have to remember to use this notation because alternatively, you can also use the select variables tool.

Select variables tool

If you don't know how to write the request notation, then follow the below-mentioned steps to use the select variables tool. This tool can be opened from the top-right corner of any node configuration dialog. For example, see it below on the Send Email dialog.

  1. Hit the "Select Variable" tool at the top-right corner of the send email configuration window.
  2. The select variable tool window will open, here all node data will be shown with the node IDs.
  3. To pick a path of specific data from the node, click on the grey button beside the provided data.

Paste the copied path anywhere in the node configuration dialog.

In the case of node output variables. the path includes atleast 3 parts: node ID, the output of the node, and the node-specific data you want to read will be returned as a response.


Let's understand the variables in a flow with an example.

The flow consists of the Form Submission Trigger node --> Simple HTTP node--> Send email node.

In the submission trigger node, the values entered in the form are stored in a variable as input. Assume that a zipcode is specified by the form on the frontend.

Now this zipcode can be used in the Simple HTTP node URL like https://ziptocity.example.com/${input.zipcode} that requests the server to retrieve or sent the data

And in the simple email node, the body is used to send the email to the end-user. To send the email enter email like jay@gmail.com, enter the subject like city name, and enter body like the city is ${xmgi.output.response}, where xmgi is the node ID of the Simple HTTP node. Select variables tool can be used to get the node ID.

Finally, the user will get the desired output through the mail.

Thus the variable store and transfers dynamic values across the nodes in the flow.

How did we do?