Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Solution
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

Create easily the condition for Power Automate if(…) expression

Posted on February 26, 2023February 26, 2023 by Tom

“I’d like to use the if(…) expression but I don’t know how to create the condition, is there some trick in the Power Automate designer?”


Recently I published an article on replacing the ‘Condition’ actions with if(…) expressions to simplify a flow. Instead of a bunch of conditions and repeating actions you can have just a single action with if(…) expressions. But creating the right condition inside if(…) is a bit more complicated than using the standard action. How do you “rewrite” the condition? What should you “type in” as the first parameter of the expression?

Use the ‘Filter array’ action to create the condition

As with the trigger conditions, you can use a small trick and let the designer create the condition for you. Add the ‘Filter array’ action into your flow and recreate the condition you want to replace with the if(…) expression.

Click on ‘Edit in advanced mode’ to transform the condition inside ‘Filter array’ into text.

Remove the @ at the beginning and take the rest, that’s the condition to use as the first parameter in if(…).

Power Automate condition if expression

In this example to check whether a value is less than 3 it’d look as below.

if(less(outputs('Compose_-_Value'), 3), <ifTrue>, <ifFalse>)

Repeat the same process for all the ‘Condition’ actions you want to replace and build the whole expression step by step.

Summary

It might be a bit confusing when trying to replace the Power Automate ‘Condition’ with the if(…) expression, but it’s not that hard. If you use the workaround with the ‘Filter array’ action you don’t need to write the whole condition manually. Recreate the condition 1:1 in that action, switch to the text mode, remove the @, and the condition is ready. You can even combine multiple conditions together using this approach, just build it slowly, condition after condition.


πŸš€ Master Power Automate

Join 2,100+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

1 thought on “Create easily the condition for Power Automate if(…) expression”

  1. Pingback: Reduce the number of variables in your Power Automate flow

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

πŸš€ Master Power Automate

Join 2,100+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Still exchanging emails to get things approved?

Get the Approval Process solution and the Task Delegation App to skip the hard part and deploy an automated, fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundleβ€”everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes