If you are working with Power Automate Desktop, you should know how to work with variables. Many times you will need this. In this tutorial, I will explain Power Automate desktop variables and the different types of variables that you can use in Power Automate desktop.
What are Variables in Power Automate Desktop?
- Variables are like containers that store and save information during the execution of a flow. The information type can be text, number, date, files, or folders.
- In short, I can say variables allow for storing data from one action and using it in another action when needed later.
- To use variables in actions, the names of your variables must be enclosed in percent (%) characters. Example: %Name%
- If the % sign is excluded, the application will read the value as hardcoded content and not as a variable.
Now, let’s see how to create variables in Power Automate Desktop flow.
Create Variables in Power Automate Desktop
When you create variables, Power Automate desktop will convert them into a specific data type based on their content.
The most commonly used data types are text, number, and boolean. This will represent the simple data types that make up or are used to create the complex data types, like lists and datatables.
While there are some complex data types, such as Lists and Data Tables, that represent Advanced data types, these are collections of other data types that can be accessed as one entity.
Variable – Text [Simple Data Type]
It stores the text value in a variable. The value can be any text, such as an email address or the contents of a .txt file.
If you are not aware of how to create and add actions to the workspace in Power Automate desktop, Click Here.
- To create a variable with the text data type, you can use the “Set variable” action. Set the parameters as below.
- Variable: By default, it will take the variable as ‘NewVar’. You can rename the variable name.
- Value: Provide a text without any notation.

This is how to create a text variable in Power Automate Desktop.
Variable – Number [Simple Data Type]
It stores the numerical values in a variable. This data type is only helpful when performing mathematical operations.
- You can use the “Set variable” action to create a Numeric value variable. Set the parameters.
- Variable: You can rename the variable.
- Value: Provide a number value without notation.
Note:
To assign numeric values to a variable, you can directly hardcode the value without any % signs. To perform mathematical operations with variables, use percent signs (%) before and after the value.

Variables – Boolean [Simple Data Type]
The value from the Boolean data type of a variable can be either True or False. It will be helpful when you want to extract true or false values.
- I will take a Set variable action and name it as Price, assign a value to it like below.

- To create a Boolean variable data type, use the “Set variable” action. See the parameters.
- Variable: Provide a name for the variable.
- Value: Click on {x} -> Select Price variable and provide an expression that returns a true or false value.

- When you save and run the flow, you can see that the flow variables will produce the output as True/False based on the given input.

Variable – List [Advanced Data Type]
In Power Automate desktop, a list is an advanced data type that takes a collection of other data types.
You can create a List data variable when you want to store information or a list of items of the same data type. Depending on the type of list items, the list can contain text values, numeric values, and so on.
- To create a variable with a List data type, use the “Create new list” action. You can rename the variable. By default, it creates an empty list with a row index and an Item.

Empty List:

- To add data to the list, take the “Add item to list” action. Provide the parameters as below
- Add item: Enter the value that you want to add to list.
- Into list: Click {x} -> Choose the specific list the item needs to be added.

Likewise, I have created two more “Add items to a list” with different values. When you execute the flow, the items will be added to the list that has been created.

Note:
Power Automate Desktop also has actions such as “Read text from file” and “Get files in folder”, which generate lists as output.
Check out How to Schedule Power Automate Desktop Flows?
Variable – Datatable [Advanced Data Type]
It is an advanced data type variable that contains a collection of other data types and stores data in a tabular format. Data tables are like Excel, which has both rows and columns.
From the data table, we can retrieve each item by using its unique row and column number.
Method 1: By using the Create new data table action
- In Power Automate Desktop, use the “Create new data table” action to generate new datatables. Then, you can use a visual builder to populate the values and rename the column headers.
- New Table: Click on the Edit button to add rows and columns to the data tables.

- This will generate the data table with five rows and five columns. You can have a look at the reference image below.

Method 2: By using the Set variable action
You can also create a data table with the help of the “Set variable” action by using programming array notation in Power Automate desktop.
The notation will consist of multiple single-dimensional arrays separated by commas and enclosed in curly brackets.
- Drag and drop the Set variable action. Ensure to provide the required parameters.
- Variable: Provide a name to the variable.
- Value: Give the expression as below.
%{^['Product Name', 'Price'],['Charger', '10 USD'], ['MicroPhone', '20 USD'] }%
Output:

Note:
To create a new data table action in Power Automate desktop apart from the Create new data table action, three more actions produce data tables to store extracted data such as Read from Excel worksheet, Execute SQL statement, and Extract data from web page actions.
Variable – Custom object [Advanced data type]
Custom objects are data type variables that contain pairs of properties and values, which can be converted into JSON format.
You can create a custom object with different data types by using the Set variable action in Power Automate desktop.
- Add a “Set variable” action to the Power Automate workspace. Set the variable value like below.
- Variable: Provide a name for the variable. By default, it will take as NewVar.
- Value: Provide properties and value within expression %{{ }}%.
%{ 'ProductName': 'IPAD', 'Code': '7415GBDC65', 'InStock': 'Yes' }%
Output: Custom Object

This way, you can set variable data types in Power Automate Desktop flows.
So there you have it – different types of variables that can be used in Power Automate Desktop.
I hope you found this useful! Do let me know if you have any questions or doubts.
You may also like the following tutorials:
- Power Automate Desktop Flow Examples
- Extract Tables from a PDF using Power Automate Desktop
- Connect Power Automate Desktop to Cloud using Direct connectivity

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.