Here we will learn this by iterating an Array elements in Power Automate. This can be applied to Get Items in SharePoint or List Items in Excel Table.
Step-1: Create a manual Trigger in the flow.
Step-2: Initialise a variable with name: Count and type Integer to track the iteration (loop) count.
Step-3: Create an Array variable with name: “Array1” = [“Bharath”,”Krishna”,”Gopal”]
Step-4: Now lets use Apply to Each
Step-5: Inside of Apply to each we need to increment the Count variable by 1 to capture the number of iterations now
Step-6: Now Save the Flow and test run on right side.
Step-7:After running successfully. We will get count as 3 in Count variable as there are three array elements in Array1.
You can use this Count wherever you want in flow now. Use this Count in “Compose” outside of Apply to each by creating new step.