Showing results for 
Search instead for 
Did you mean: 

Allow Condition Action BEFORE trigger instead of adding trigger conditions to trigger settings

You should allow users to enter a Condition action BEFORE the trigger, so they can use a no-code solution to adding the trigger conditions.  I'm being forced to figure out how to code all of this and get it into the trigger conditions in the trigger settings. (see screen shots). I know I can add an array and hit Advanced to convert each individual expression, then delete the array action.  But that doesn't help me code all the and/or nesting into the single "and-based" trigger condition fields.  Plus I already had 1 trigger condition in the trigger, so I had to combine it with all the the conditions in the screen shot below in order to stop my flow from running and cancelling constantly.


If Microsoft would allow a Condition Action to be added first thing in the flow, instead of giving the error "You cannot use an action as a trigger, please select a trigger" it would solve the problem.  You could add all your and/or conditions into the Condition Action UI, and then add your trigger under the Yes branch.  Gosh, you could even add a different trigger under the No branch.  If this can't be done with the existing condition action because of the way actions work, you could create a special Trigger Condition Action and that works similarly and allows us to add it before the trigger and configure the conditions using UI instead of code expressions, and then have Yes/No branches. 


One workaround would be if there was a button on a Condition Action that would allow us to convert the whole thing to a nested expression.  Similar to how it works on an Array.  Then we could just copy/paste the entire thing into one field in the trigger condition instead of creating separate expressions and trying to figure out how to do the and/or nesting to combine it all together.


A second workaround would be if Microsoft would add "or" functionality to the trigger condition that is in the trigger settings, and allow for nesting of and/or with UI and not code.  They could just expand the capability in the settings trigger conditions to be similar to what they include in the Condition action UI.


This is supposed to be a low code/no code solution, correct?  I had to rely on a power user in the forums who was kind enough to convert this and add to it the code I already had in the trigger.  Our developers at the bank don't understand Power Automate code.  It's such a simple thing that you might want trigger conditions that I think it could be easier and designed with the expectation that people will need to do it quite often and want a no-code solution.

Condition action UI                                           vs.Trigger Condition that Power User was kind enough to figure out that I have to add to Trigger Condition.





Status: New
Dual Super User

I don't think you will see the ability to add a condition before the trigger.  The trigger is what starts the run of the flow.  So to add a condition action before the trigger would require that the flow already be running before it is triggered. 


Instead you could accomplish the same thing if the Add Condition in the settings of the trigger had a more advanced editor, like the one used in the condition action.  

Helper III

@Pstork1 Yes, probably not.  My comments are a little long but towards the end I also mention improving the UI in the trigger condition in the trigger settings, OR creating a UI for a condition with Yes/No branches that is not an action . . . behind the scenes it could function like some type of a Scope container that runs behind the scenes the same way as the existing trigger condition, but just looks more like a condition with branches visually.