Apply to Each Control Action in Power Automate

In this article, we are going to learn about apply to each control action. Apply to each is used to iterate all the items in a collection. It can be an array, list, or anything which has more than one item inside it.

If you know some other programming languages then apply to each control action is similar to for loop.

Creating the Apply to Each control action flow in power automate

  • Let's create an array in power automate and add apply each control action to traverse the array. Also, store the list of items from an array to a SharePoint list.
  • Go to your SharePoint site. Create a Blank list.
    blank-list-apply-each-power-automate
  • Name the list as Subjects and click on Create.
    subject-list-apply-each-power-automate
  • We have our SharePoint list of Subjects created. sp-list-created-apply-each-power-automate
  • Now, go back to power automate and create a manually triggered flow. Click on the New step.
    manually-flow-apply-each-power-automate
  • Select Initialize variable (Variable) from actions.
    initialise-var
  • Initialize a variable as type Array. Enter the value for the array. Click on the New step.
    myarray-apply-each-power-automate
  • Select Apply to each (Control) from Actions.
    apply-each-power-automate
  • Add the MyArray variable from dynamic contents. Click on Add an action.
    apply-each-myarray-power-automate
  • Select Create item (SharePoint) from actions. Add the site address and select the list. Select the Current item which takes one single value from the array.
    sp-list-added-apply-each-power-automate
  • Save, Test, and Run Flow. It might take few more seconds to run because the control traverses the whole array.
  • After running get back to the SharePoint list. You can see that control has created a record for each item from an array to the list.
    final-list-sp-apply-each-power-automate
0 results
Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions