Power Automate
SECTION 04 · LAB 4.2

Send only the requests
over 1000.

Copy the working Excel flow, then add a condition to decide whether each row should produce an email.

Guided practice · Condition & your first expression

A loop repeats. A condition decides.

In the previous lab, every row produced an email. Now we want emails only for requests whose estimated cost is greater than 1000.

A Condition is a control that compares values and chooses a branch. If the comparison is true, it runs the actions in True. Otherwise, it runs False. A branch can be empty when no action is needed.

Is this row’s estimated cost greater than 1000?
TRUESend the purchase email
FALSENo email for this row

Place the condition inside Apply to each, so it checks the current row on every iteration. All five rows are processed, but only qualifying rows send an email.

BUILD ON LAB 4.1

Keep the original. Create a variation.

Start with Purchases from Excel and the same five-row workbook. Name the copy Purchases from Excel — Greater than 1000. No changes to the workbook are needed.

STEP 01

Copy the working flow

  1. Open My flows and find Purchases from Excel.
  2. Open its menu and select Save As.
  3. Name the copy Purchases from Excel — Greater than 1000, then select Save.
  4. Open the copy and select Edit.

Save As creates a separate flow. The original remains available for comparison. The screenshots use earlier working names; use the name above for your copy.

The copy starts turned off

The copy dialog explains that the new flow is off by default. After editing and saving, enable the copy before testing. The toggle screenshot below shows the off position.

Use Save As to copy the existing flow.
Use Save As to copy the existing flow. · Select the image to enlarge.
Give the copy a name that describes its new rule.
Give the copy a name that describes its new rule. · Select the image to enlarge.
The copied flow is initially off; enable it after saving your changes.
The copied flow is initially off; enable it after saving your changes. · Select the image to enlarge.
STEP 02

Add a Condition inside the loop

  1. Expand Apply to each in the copied flow.
  2. Add an action inside it and search for Condition.
  3. Select Condition under Control.

The copied email action is still there. The screenshot shows the condition below it as an intermediate step. We will move the email into True before testing.

A condition compares a left value with a right value using an operator, such as is greater than. This lab needs one comparison row.

Choose Condition under Control.
Choose Condition under Control. · Select the image to enlarge.
The copied email is still above the new condition at this intermediate stage.
The copied email is still above the new condition at this intermediate stage. · Select the image to enlarge.

Meet fx: the expression editor

So far, we have typed fixed text or selected dynamic content. The fx button opens the expression editor, where you can write a small formula to calculate, transform, or convert a value.

Fixed value

1000: the threshold we type into the condition.

Dynamic content

Estimated cost: the value supplied by the current Excel row.

Expression

float(...): convert that supplied value into a number before comparing it.

Why convert the cost?

In this example, Excel returns the cost as text, such as "1500". Comparing that text directly with the number 1000 causes a String/Integer type mismatch. The float() function converts numeric text into a number, including decimal amounts.

No variable is needed. We only convert the current value for the comparison.

STEP 03

Convert the cost and configure the comparison

  1. Click the condition’s left Choose a value field. Remove any existing Estimated cost token.
  2. Select fx to open the expression editor.
  3. Enter the complete expression below, then select Add or Update.
  4. Set the operator to is greater than.
  5. Enter 1000 in the right field as a number.
item()
The row currently being processed by Apply to each.
['Estimated cost']
The Estimated cost field from that row. Match the column name exactly.
float(...)
Convert the field’s numeric text into a number.
Left valueOperatorRight value
float(item()?['Estimated cost'])is greater than1000

The first screenshot shows expression entry in progress. Enter the full expression shown in the second screenshot. Keep only one comparison row; remove any extra empty rows added accidentally.

Select fx to enter an expression; float alone is not the complete formula.
Select fx to enter an expression; float alone is not the complete formula. · Select the image to enlarge.
The complete expression converts the current row’s Estimated cost to a number.
The complete expression converts the current row’s Estimated cost to a number. · Select the image to enlarge.
STEP 04

Move the email into True

  1. Move the existing Send an email (V2) action into the condition’s True branch, using its drag handle.
  2. Leave False empty.
  3. Confirm there is no email action left above or below the condition inside the loop.
Placement determines behaviour

An email before the condition would still run for every row. Inside True, it runs only when the current cost passes the comparison. An empty False branch simply does no additional work for that row.

Move the copied email action into the True branch.
Move the copied email action into the True branch. · Select the image to enlarge.
STEP 05

Label the qualifying emails

Keep the current-row tokens in the email body and your training mailbox in To. Update the subject to combine Item name dynamic content with the fixed text — greater than 1000.

The screenshot’s subject contains “greated”; use “greater” in your own flow.

Check the full flow: manual trigger → read Excel rows → Apply to each → Condition → email in True. Select Save, return to the flow details, and ensure the copy is enabled.

Make qualifying messages easy to distinguish by changing the subject.
Make qualifying messages easy to distinguish by changing the subject. · Select the image to enlarge.
The final structure has one email action inside True and no actions in False.
The final structure has one email action inside True and no actions in False. · Select the image to enlarge.
STEP 06

Test and compare the outcomes

Use Test → Manually → Test, confirm the connections, and run the copied flow. It should evaluate five rows and send two emails.

ItemCostCost > 1000?Email?
Monitor850FalseNo
Office chairs1500TrueYes
Keyboard150FalseNo
Meeting room screen3000TrueYes
Headset250FalseNo

Expand Apply to each in the completed run. 1 of 5 means the first of five iterations is selected. Use the arrows to inspect other rows, open the Condition result, and see which branch ran. A green check on Condition means it evaluated successfully; it does not by itself mean its comparison was True.

For a nonqualifying row, the email in True is skipped. That is expected behaviour, not a failed email. In Outlook, identify the two new messages by their subject suffix; older messages from the loop-only lab may still be visible.

The run succeeded and Apply to each processed five rows; inspect each condition outcome.
The run succeeded and Apply to each processed five rows; inspect each condition outcome. · Select the image to enlarge.
The new qualifying emails are for Office chairs and Meeting room screen.
The new qualifying emails are for Office chairs and Meeting room screen. · Select the image to enlarge.

If something does not work

Type mismatch
Make sure the left field contains the fx expression, not the original Excel token. Keep 1000 as a numeric threshold.
Conversion error
Check for blank or nonnumeric costs. This lab’s five rows contain valid numeric values; float() needs a value it can convert.
Five emails
Check that the only email action is inside True. An email outside the condition still runs for every row.
Cannot run
Check the copied flow is saved, enabled, and has working Excel and Outlook connections.
SUCCESS CHECK

Repeat the check. Choose the action.

  • The original loop flow remains unchanged.
  • The copy evaluates one condition for each Excel row.
  • An fx expression converts the cost into a number.
  • Five rows are evaluated and two qualifying emails are sent.

Try a variation: change the threshold to 1500. With “is greater than,” Office chairs at exactly 1500 no longer qualifies; only Meeting room screen does. Update the subject to match your new threshold before testing.