This blog explains how we can use append to an array variable to create an array in Power Automate.
Use Case: In my example, I am retrieving contacts of dataverse and then creating an array of email addresses of retrieved contacts.
Steps to be followed:
- Search for “Initialize Variable” action and select that.
- Give Name to your variable and select Type as Array.
- Use “List rows” action to retrieve the contacts from dataverse.
- Select “Apply to each” action.
- In Apply to each action, pass value of List rows action from the dynamic content.
- Add “Append to array variable” action inside the “Apply to each”.
- In Append to array variable action Enter Name and Value.
- Name: Select the Name of the variable which we created earlier.
- Value: Pass the email address of the contact.
- Add Compose action and pass the “Contact Email Address” variable from the dynamic content in Inputs of Compose.
Running the Flow:
I hope you find this helpful!! 😊😊