cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mxh7875
Level: Powered On

Flow sends emails regardless of conditions

I am trying to create a Flow that will check list items to see if a column is empty AND if a due date in another column has passed, and if true, send an email for each of those specific list items.  The list has 15 items and only 3 items meet both criteria.  No matter what I do the flow sends an email for all 15 items, regardless of the condition.  What am I missing?

 

 And I can't find the "editor's toolbar." to post my images of the flow. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
mxh7875
Level: Powered On

Re: Flow sends emails regardless of conditions

ID10T error, 

 

Original condition was @and(empty(triggerBody()?['OSC Ref #']),greater(utcNow(), items('Apply_to_each')?['Due_x0020_Date']))

 

There was no trigger body, as the Flow began with a recurrence, not "get items," so the empty criteria wasn't being checked.

 

Rewrote condition to @AND(empty(items('Apply_to_each')?['OSC_x0020_Ref_x0020__x0023_']),greaterOrEquals(utcNow(), items('Apply_to_each')?['Due_x0020_Date']))

 

Now all conditions are being checked, emails only send for each overdue item w/o a "OSC Ref #"

View solution in original post

1 REPLY 1
Highlighted
mxh7875
Level: Powered On

Re: Flow sends emails regardless of conditions

ID10T error, 

 

Original condition was @and(empty(triggerBody()?['OSC Ref #']),greater(utcNow(), items('Apply_to_each')?['Due_x0020_Date']))

 

There was no trigger body, as the Flow began with a recurrence, not "get items," so the empty criteria wasn't being checked.

 

Rewrote condition to @AND(empty(items('Apply_to_each')?['OSC_x0020_Ref_x0020__x0023_']),greaterOrEquals(utcNow(), items('Apply_to_each')?['Due_x0020_Date']))

 

Now all conditions are being checked, emails only send for each overdue item w/o a "OSC Ref #"

View solution in original post

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,039)