Define an input variable
Variables allow information to change, or vary, for every run of your flow. If you're using a flow for any type of data entry, you need variables to define the fields that you need to enter. Input variables include information that you enter into the flow before or during the run. Output variables are outcomes that the flow returns to you after the run. Power Automate Desktop provides you with the ability to receive input values from cloud flows and return values using output variables. As a result, your automations can be seamlessly integrated. To define input variables, begin in your Power Automate Desktop app and then open the designer by editing a desktop flow.
Watch the following demo video of the steps that you complete in this unit.
Note
The flow in the demo video was built in the Build your first Power Automate Desktop flow module.
When you're in the designer, select the plus (+) icon under the Input / output variables section, and then select Input.
The Variable type can be Input or Output. This example uses input; output variables are covered later. The Variable name is the name that is used and referenced inside the desktop flow. The External name is used outside the desktop flow, and the Description field gives you more information about the variable, which can be especially helpful if you have many different input and output variables in the same desktop flow. The Default value allows you to define a value to be used if no input is provided. The Data type field helps to further define your variable's data type and can determine how the data is treated by Power Automate. For example, using the data type of Sensitive text encrypts the values, which helps secure sensitive data. You can use this data type for passwords, to open secure programs, or for other personal or private information. You can set your own values for your variable, or you can use the default values (displayed in the following screenshot). Select Save to create your variable.
Select the plus (+) icon to create more input variables for your flow. If you're using the desktop flow that's built on the Contoso Invoicing app, define three more variables:
Variable 2:
Variable type - Input
Variable name - Contact
Data type - Text
Default value -
[email protected]
External name - Contact email
Description - Contact email
Variable 3:
Variable type - Input
Variable name - Account
Data type - Text
Default value - WingTip Toys
External name - Account Name
Description - Name of the account that's being invoiced
Variable 4:
Variable type - Input
Variable name - Date
Data type - Text
Default value - 03/21/2025
External name - Date
Description - The invoice date.
After you finish defining your input variables, select Save.
Now that you've defined the input variables, you can set how they'll be used in the desktop flow.