For each loop actions
Use the For Each action to go through a list or table of items. It's common to use this action in tasks that contain these structures.
To demonstrate this action, the following section expands on the previous flow. Assume that each employee sends multiple email messages. You need to sum up the expenses in these messages before writing them.
First, add a new variable to hold the sum of each employee’s expenses:

At this point, the flow retrieves all the email messages for a specific employee. Add a For Each action to go through these messages:

When you configure the action this way, %CurrentItem% holds a different email message in each repetition of the For Each loop.
Within the loop, add actions to convert the email text into a number and add it to the employee’s total:

Finally, change the value you write into Excel to the Expense Sum variable (action 11).