Purchases from Excel
Read five purchase requests from an Excel table. Use a loop to send a separate email for each row.
Guided practice · Your first controlFrom one request to several
Our previous flows handled one request at a time. Now the workbook contains five requests. We want to repeat the same email action for each request, using that row’s details.
An email action does a task. A control organizes how actions run—for example, whether they repeat or which path they follow. Our first control is Apply to each.
A loop is a container for repeated work.
Apply to each receives a collection of items and runs the actions inside it once for each item. Each repetition is called an iteration. In this lab, one Excel row is one item.
- PR01 · MonitorMonitor email
- PR02 · Office chairsOffice chairs email
- …repeat for all five rowsFive emails in total
The current row is the row being processed in that iteration. The same email action uses a different item name, cost, and business reason as the loop moves through the rows.
Read once. Repeat for each row.
Manually trigger a flow → List rows present in a table → Apply to each → Send an email (V2).
The Excel action reads the table once. The email action sits inside the loop and runs once per row.
Before you begin
Use the training environment assigned by your IT team. You need OneDrive for Business, permission to use the Excel Online (Business) connector, and an Outlook training mailbox.
The workbook contains five sample requests in a real Excel Table named PurchaseRequests. A worksheet and a table are different: the connector asks for the table name, not the worksheet name.
Upload the workbook to OneDrive
- Download PurchaseRequests.xlsx using the link above. Open it to review the five rows, then close it.
- Open OneDrive from the Microsoft 365 app launcher.
- Create or open a Training folder in My files.
- Select Create or upload → Files upload and upload the workbook.
- Confirm that PurchaseRequests.xlsx appears in the folder.
The file will be read from OneDrive for Business, not from its original location on your computer.




Create Purchases from Excel
- In Power Automate, select Create → Instant cloud flow.
- Name the flow Purchases from Excel.
- Select Manually trigger a flow and create the flow.
No manual inputs are needed. The data will come from the workbook.
Later screenshots show the earlier working name “email from excel.” Use Purchases from Excel throughout your lab.

Read the rows from the Excel table
- Add an action below the trigger.
- Search for List rows present in a table and choose it under Excel Online (Business).
- Sign in with your training account if prompted.
- Set Location to OneDrive for Business.
- Set Document Library to OneDrive.
- Browse to /Training/PurchaseRequests.xlsx.
- Select the PurchaseRequests table.
This action returns the table’s rows together. That collection is often called an array. We will give it to Apply to each so the flow can work on one row at a time.




Add the Apply to each control
- Add the next step below the Excel action.
- Search for Apply to each and select it under Control.
- In Select an output from previous steps, open dynamic content.
- Choose the row collection returned by List rows present in a table. In the screenshot it is labeled body/value; your designer may display value.
This tells the loop what to repeat over. Do not select a single column such as Item name as the loop’s collection.


Put the email action inside the loop
- Select the + inside the Apply to each container.
- Add Office 365 Outlook → Send an email (V2).
- Set To to your own training mailbox.
- Use the current Excel row’s Item name dynamic content as the subject.
- Build the body below using the matching Excel dynamic content tokens.
A purchase request has been submitted. Item: [Item name] Estimated cost: [Estimated cost] Business reason: [Business reason]
Select tokens from dynamic content rather than typing the bracketed names. Inside this loop, they refer to the row currently being processed.
An action inside Apply to each runs for every row. An action after the loop runs after the loop finishes. Check the container boundary in the full-flow screenshot.


Save and run the flow
- Select Save and correct any configuration errors.
- Select Test → Manually → Test.
- Check that both Excel Online (Business) and Office 365 Outlook connections are ready, then select Continue.
- Select Run flow on the next panel.
With five data rows and one email action inside the loop, expect five emails per run. Running the flow again sends another set; this lab does not mark rows as already processed.

Inspect the five iterations and the emails
Open the completed run and expand Apply to each. The screenshot shows 1 of 5: you are viewing the first of five iterations in one flow run. Use the arrows to inspect the other iterations and expand their email actions to compare the values.
Check your Outlook training mailbox for five emails, with subjects corresponding to Monitor, Office chairs, Keyboard, Meeting room screen, and Headset. Open individual messages to verify their costs and reasons. The mailbox screenshot below shows part of the received set.


One flow run. Five repetitions.
- The Excel action reads the PurchaseRequests table.
- Apply to each receives the collection of rows.
- The email action is inside the loop and uses the current row.
- The completed run has five iterations and produces five emails.
Think about it: if the table had seven data rows, how many times would this email action run? Seven—once for each row.
If something does not work
- No table
- Check that the workbook contains an Excel Table named PurchaseRequests and that you selected the correct file. A formatted cell range alone is not enough.
- Wrong count
- Check the table’s data rows and the Excel action output. Blank rows included in the table can also be returned.
- Extra loop
- Check the full structure: one Apply to each around one email action. If the designer adds another loop, review which collection or dynamic value you selected.
- Same details
- Make sure the email uses Excel row tokens, rather than the fixed text or manual-trigger inputs from an earlier lab.
A loop repeats the work. A condition can decide what should happen for a particular row—for example, whether its estimated cost is greater than 1000.