Don’t know What is Initialize Variable in Power Automate and how to use it? This Power Automate tutorial is just for you. Here we will see what is Power Automate to initialize variables and how to work with it.
In addition, we will also see how to initialize variables with dynamic content values with examples and what are the different initialize variable types available in Power Automate flow.
And also we will explore what is Power Automate initialize variable apply to each.
Also, Check: How to Initialize Float Variable in Power Automate
What is Power Automate Initialize Variable
A variable in Power Automate is a temporary storage of the data with different data types such as String, Integer, boolean, float, array, or object.
When we initialize a new variable in Power Automate, we can see the three parameters as explained below:
- Name– Variable Name
- Type– Variable Data type
- Value– Variable Value
Power Automate initialize variable types
Here we will see the various variable data types that are presented while initializing variables in Power Automate.
- Boolean- Boolean data type accepts the true or false values.
- Integer – Integer data type accepts only the numerical data type i.e. 1,2,3 etc
- Float- Float data type accepts decimal numerical values like i.e. 75.25, 77.13, etc.
- String- String data type accepts text values like Power Platforms, Power Automate, etc.
- Object- Object type includes the pair of properties and values in JSON format.
- Array- The array type contains the list of objects with the same data type.
In the below screenshot, you can see that the Power Automate different variable types are highlighted.

In the following, we will how to initialize variables in the Power Automate flow, where Recently I got a requirement to work with the SharePoint List and Power Automate.
Read: How to Initialize Object Variable in Power Automate
How to Initialize Variable in Power Automate
Let us see How to Initialize Variable in Power Automate with an example.
So here I have created a SharePoint list called TaskList shown below consisting of different columns called,
- TaskName(text data type)
- Assigned To(Person data type)
- TaskPriority and Status columns are off (choice data type)
- StartDate, Due Date, and TaskCompletedDate columns ( Date data type)
- NumberofDaysToComplete (Integer Data type)

To achieve this follow the below steps:
- Login into the Power Automate flow and then select the + create flow and click on the Automated cloud flow.
- Enter the flow name and choose the trigger as When an item is created or modified and click on the create option as highlighted below:

- Now we will add an action to initialize the variable i.e. initialize the variable. We can able to view the three parameters explained below:
- Add the dynamic content value in the value section.
- Name– Enter the Variable Name
- Type– Choose the Variable Data type
- Value– Select the dynamic content Variable Value

- We will add a Compose action to get the output from the input of the initialized variable.

- Check the flow checker, if the flow has no errors then select the Test option and choose Manually and click Save & Test as highlighted below:

- Once the Power Automate flow has been triggered, we can see the expected output from the SharePoint List as below:

This is how to initialize the variable in the Power Automate flow.
Also, Read: How to Initialize Integer Variable in Power Automate
Example:2
Let us see how to initialize the variable manually by entering the Value of the String data type.
In this example, we will create an instant cloud flow to manually trigger a flow then we will initialize the variable and assign value to the initialized variable.
- Select the + create flow and click on the Instant cloud flow.
- Enter the flow name and choose the trigger as Manually trigger a flow and click on the create option as displayed below:

- Once the flow has been created, click the +Add step to add action and initialize the variable in Power Automate.
- Then enter the variable name, variable type, and variable value as highlighted below:

- Now we will add another step to add a compose action to get the output from the initialized input variable value.
- In the compose action input value, we cannot change the value assigned to the variable.

- Save the flow, then Select Test-> Manualluy and choose Run Flow as below:

- Once the Flow has been run, we can see the expected output in the compose action with the initialized input variable value.

This is how to initialize a variable manually by entering the Value of the String data type.
Power Automate initialize variable in apply to each
Here we will see initialize variable and loop using apply to each section in the Power Automate.
Now we will create a list of arrays in power automate and then add apply to each control action to loop through the array and we will store the array items to the SharePoint list.
So here we will create an Employee list in SharePoint to store the Employee names like below:

Create an instant cloud flow, or create a Manually triggered Flow. Then click on the Next step and Select the Initialize variable, set the variable name, choose the type as an array, and add the array values like the below array.

- Select Apply to each action to loop each array item. Then in the value set the varArray from the dynamic content.
- Add an action inside the loop and select Create an item to add an array of items in the SharePoint List
- Add the site address and SharePoint list name, and in the title select the current item of the Apply to each from the dynamic content.

- Next, click on Save and run the Flow manually, once your flow runs successfully

- After the flow ran successfully, we can see SharePoint list creates a list item from the array to the list.

This is how to initialize variable and loops using apply to each section in the Power automate.
In this Power Automate tutorial, we have discussed what is Power Automate to initialize variables. In addition, we also saw how to initialize variables with dynamic content with examples and covered the different initialize variable types available in Power Automate.
And also we learned about what is Power Automate initialize variable in apply to each.
Furthermore, you may like some more Power Automate and SharePoint tutorials:
- How to Initialize Boolean Variable in Power Automate
- How to Initialize Array Variable in Power Automate
- Power Automate Condition if a String is Empty
- Power automate SharePoint multiple choice column to string
- How to Use People Web Part in SharePoint Online
Bijay Kumar Sahoo is a highly accomplished professional with over 15 years of experience in the field of SharePoint and related technologies. He has been recognized as a Microsoft MVP (Most Valuable Professional) more than 9 times, starting from April 2014, for his exceptional contributions to the SharePoint community. Bijay is also a prolific author, having written two books on SharePoint – “Microsoft Power Platform – A Deep Dive” and “SharePoint Online Modern Experience Practical Guide“. His deep insights into SharePoint are also shared on his popular YouTube channel EnjoySharePoint where he teaches SharePoint to a global audience (From various countries like the United States of America, Canada, the United Kingdom, Australia, New Zealand, etc). Read more…