In this Power Automate tutorial, we will learn what is Power Automate Array Variable and how to initialize Array Variable in Power Automate with different examples.
Moreover, we will also learn the below-related topics:
- Power Automate initialize Array Variable
- Power Automate initialize Array Variable json
- Power Automate initialize Array Variable of objects
- Power Automate initialize Array Variable function
- Power Automate append to an array variable
- Power Automate initialize variable array of empty
- Power Automate initialize an array with multiple values
Also, Read: What is Initialize Variable in Power Automate
Array Variable in Power Automate
- The same data type array can be used with the Power Automate Array data type, and the values must follow the array format.
- For example, if it is an integer array then the array values will be [1,2,3..] no need of a double quote mark.
- In the same way, if it is of string array then the array looks like [“a”, “b”, “c”..] within a double quote mark.
- And for the dynamic content of array item values no need for a double quote mark, even if it is a string value.
Check: How to Use Power Automate Delay Action
Power Automate initialize Array Variable
Here we will see how to initialize the variable with the Array data type in Power Automate.
In this example, we will initialize the string array to display the TaskName, TaskPriority, and Status values in the array format. Follow the below steps:
Step:1
- Once the Power Automated cloud flow has been created, select an action to initialize the variable in an array format as displayed below:
- Enter the name and type of the variable as an array and in the values field add the dynamic content values.

Step:2
After initializing the array variable, add a compose action to retrieve the array data values from the SharePoint list on Power Automate.

- To run the Power Automate flow, select the Test option and choose Manually and click the Save & Test option.
- Once the Power automation flow is triggered and runs, we can see the array of data values from the SharePoint list in the compose output section as below:

This is how to initialize the variable with the Array data type in Power Automate.
Check out: How to Initialize Boolean Variable in Power Automate
Power Automate initialize Array Variable of JSON
Let us see how we can initialize the Array Variable of JSON in Power Automate flow,
Before following the steps, we should know the syntax of the JSON format:
JSON data is known as name/value pairs. And the name/value pair consists of a field name in double quotes, followed by a colon, followed by a value. The below syntax code is an example of JSON format.
"name":"John"
Follow the below steps to initialize variable array of JSON
In this example, we will pass the username and user email as dynamic input content in the array-type format. In the compose action we will see the encoded values of the username and user email of the person who triggered the flow in Power Automate.
Step:1
Open the Power Automate and create an instant flow by selecting the manual trigger as displayed below:

Step:2
- Select an action to initialize the variable in an array-type format as displayed below:
- Enter the variable name and then select the type of the variable as an array.
- And in the values field add the JSON format data values by choosing the dynamic content values. Here we are passing two values inside the array with a JSON format.
[ {“name”:@{triggerOutputs()[‘headers’][‘x-ms-user-name-encoded’]}} , {“email”:@{triggerOutputs()[‘headers’][‘x-ms-user-email-encoded’]}}]
Where, (JSON key-value pairs)
- name and email = (JSON Keys)
- user-name and user-email = dynamic content values (JSON Value)

Step:3
- After initializing the array variable, add a compose action to retrieve the array data values from the initialized variable on Power Automate.
- Click the Save & Test -> option to save and test the Power Automate flow.

Step:4
- Choose Manually under the test option and select Run Flow. Once the Power automation flow is triggered and runs.
- We can see the output in Compose action below, where the user name and user email are in the encoded value inside the Array in a JSON format.

This is how to initialize variable array of JSON in Power Automate flow.
Have a look: How to Initialize Float Variable in Power Automate
Power Automate initialize Array Variable of objects
Here we will see how to initialize Array Variable of objects using Power Automate.
Here we will initialize a variable and then create an array, where each item in the array has an object with its properties. We will unite the two arrays of objects.
- Once the Power Automated instant flow has been created, select an action to initialize the variable in an array format as displayed below:
- In this example, we will initialize two variables and select the variable type as an array. In the values section, add the array of object items.

- Now we will unite the two arrays of objects using the Union function to get the array items in a single array object.
- So click on the Next step and select compose action and in input write the below expression:
union(variables('VarArray'),variables('VarArray2'))

- Now click on Save and run the flow manually, we can see the result in the compose action output.

This is how to initialize variable array of objects using Power Automate.
Power Automate initialize Array Variable function
Let us see how we can create an array function with the initialized variable in Power Automate.
Once the Power Automated instant flow has been created, select an action to initialize the variable in an array format using the create Array function as displayed below:
createArray('SharePoint','Power BI','Power Automate')
Where,
- CreateArray = Function Name
- SharePoint, Power BI, Power Automate = Array items

- Add a compose action to see the output for the initialized variable in an array format.
- Click save to save the Power Automate flow.

To test the flow, select Test Flow -> Manually -> Run Flow. Once the Power automation flow is triggered and runs. We can see the output in Compose action below:

This is how to create an array function with the initialized variable in Power Automate.
Check Post: How to Initialize Object Variable in Power Automate
Power Automate append to an array variable
Here we will see how we can append to an array variable in Power Automate,
In the Previous heading, you can see that we have created an array using the CreateArray function and initialized a variable. So now we will see how to append an array item to the existing created array variable.
In the below screenshot, you can see that the array variable has been created.

- Now we will add or append the array value to the existing array variable using the Append to array variable action.
- For that, Simply +New step and choose Append to array variable action. And then in the Name section select the existing array variable that we created and in the Value section add the values that you want to append to the existing variable.
- Here, I am going to append the PowerApps as an array value with the existing array variable.

Select +Newstep -> Compose action to see the output of the initialized variable.

Now click on Save&Test and run the flow manually, we can see the result in the compose action output.

This is how to append to an array variable in Power Automate.
Power Automate initialize Array Variable of empty
Let us see how we can initialize Array Variable of empty in Power Automate,
- Once the Power Automated instant flow has been created, select an action to initialize the variable in an array format.
- Enter the name and type of the variable as an array and in the values field add an empty array as [] as highlighted below:

Add a compose action, to see the output for the initialized variable in Power Autome. Click Save to save the flow:

- Once the Power Automate flow has run, in the compose action we can see it displays a link Click to download instead of showing on compose’s output.
- So when we click on the click to download option, it displays

This is how we can initialize variable array of empty in Power Automate flow.
Read Post: How to Initialize Integer Variable in Power Automate
Power Automate initialize an array with multiple values
Here we will see how we can initialize an array with multiple values using the Power Automate flow.
- Once the Power Automated instant flow has been created, select an action to initialize the variable in an array format as displayed below:
- Enter the name and type of the variable as an array and in the values field add the multiple values in it.

- After initializing the array variable, add a compose action to retrieve the array data multiple values from the initialized variable on Power Automate.

- To see the output for the initialized variable in Power Autome. Click Save to save the flow and test -> Manually Test -> Run Flow

- In the below screenshot, you can see that compose action displays the array data with multiple values.

This is how to initialize an array with multiple values using the Power Automate flow.
Moreover, you may like some more Power Automate and SharePoint tutorials:
- How to Initialize String Variable in Power Automate
- Power Automate Condition if a String is Empty
- How to Get Dataverse Created by in Power Automate
- SharePoint Online List Properties Web part
In this Power Automate tutorial, we have learned what is Power Automate Array Variable and how to initialize a variable for an Array data type in Power Automate with different examples.
Moreover, we also learned the below-related topics:
- Power Automate initialize Array Variable
- Power Automate initialize variable array json
- Power Automate initialize variable array of objects
- Power Automate initialize Array Variable of empty
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…