Get startedGet started for free

Conditions and Switch

1. Conditions and Switch

So far, every action has run in a straight line, one after another. Branching logic with Conditions and Switch lets your flows make decisions instead, and that's the topic for this lesson.

2. Where to find them

Both Condition and Switch live under Control in the action picker. Click the plus to insert an action, then search by name or pick Built-in then Control.

3. The Condition action

A Condition evaluates a rule and sends your flow down one of two paths. For example, if the value is equal to "Approved" the flow sends the approval email, and if it's false the flow sends the rejection instead. Every Condition has exactly two branches, called True and False, which are labeled Yes and No in older designs. The flow always takes one path and skips the other entirely.

4. Setting up a Condition

When you add a Condition action, you see a card with three slots: a left value, an operator, and a right value.

5. Setting up a Condition

The left value is what you want to check, usually a dynamic content token from an earlier step or a variable.

6. Setting up a Condition

The operator dropdown gives you the key options, which include is equal to, is not equal to, contains, does not contain, is greater than, is less than, is empty, or is not empty, so pick the one that matches the question you're asking.

7. Setting up a Condition

The right value holds the comparison, so once all three are filled, Power Automate evaluates the rule every run.

8. Combining rules with AND / OR

One Condition can hold more than one rule. Click Add row to drop in another check, then toggle the AND/OR dropdown between rows. Pick And if all rules must be true, or Or if any single one is enough. For mixed logic like "status is Pending and amount greater than 1000 or flagged is true", use Add row group to wrap rules together. That's cleaner than nesting Conditions for most decisions you'll build.

9. Grey means skipped, not failed

Here's what a Condition looks like after it runs. The True branch's action carries a green checkmark, which tells you that it ran. The False branch's action carries a grey dash, which means it was skipped. And remember that grey means skipped, not failed, which is the most common confusion in run history. Skipped is not an error, it just means the Condition never sent the flow down that branch.

10. Common mistakes

Three mistakes catch everyone. Case sensitivity means "Approved" with a capital A is not the same as "approved" in lowercase. Trailing spaces mean an invisible space at the end of "Approved" will fail the Condition. And type mismatches mean comparing the string "5" to the number 5 can produce unexpected results. The fix for the first two is to use toLower to normalize capitalization, and trim to strip whitespace, before your Condition evaluates.

11. The Switch action

What if you need more than two paths? That's where Switch comes in. A Switch takes one value and matches it against multiple cases. For example, if the status is Pending the flow notifies the team, if it's In Transit it updates the tracker, and if it's Delivered it closes the ticket. The Default case catches anything that doesn't match, like a typo or a new status you didn't anticipate, which makes it your safety net.

12. Condition vs. Switch

When should you use which? Condition is for two outcomes, like yes or no, or true or false. Switch is for three or more distinct values to match against. If you need a range check, like checking whether an amount is greater than 100, use a Condition. Switch only matches exact values. You could nest Conditions for multiple outcomes, but it gets messy fast. If you find yourself nesting more than two Conditions, Switch is almost always cleaner.

13. Let's practice!

Now it's time to build your first Condition and see how branching logic makes your flows smarter.

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.