cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

Date Checker Flow

I've created a Flow that sends an email if today's date equals a contract termination date.  the purpose of the flow is to send an email out when the contract termination date is equal to 90 days from a termination date that is entered into a SharePoint list.  In the SP list, there are also columns that if checked the flow doesn't check them.  There are currently 7 items entered in the SP list with 1 of them set not to run. 

 

When the flow runs it's sending an email out 6 times rather than just sending it 1.  I know it has to be how I have the flow configured but I cannot find why.  I've copied the flow below, can someone help me out.  

 

The idea process is it runs every day and if the dates match the conditions then send an email out for that 1 item.  Hopefully, that makes sense.  

dateflow1.png

1 ACCEPTED SOLUTION

Accepted Solutions
Helper III
Helper III

I figured out the issue, for some reason it was checking each condition individually.  Deleting and starting over i was able to set it up correctly and get it working.  

View solution in original post

4 REPLIES 4
Community Support
Community Support

Hi @eenochs ,

 

It seems that you have nested Conditions in the flow.

 

Condition 4 is used to check whether the two columns are checked. Condition is used to check if the terminate date is equal to certain date. Condition 3 is used to check whether two dates are equal (the image is not clear).

 

By the way, what are the functions used in Condition and Condition 3?

 

From your description, it looks like that you get an email 6 times, are these emails for different items or for one item?

 

As far as I know, emails will be sent out when the conditions meet. Please check if you have multiple items that match the condition.

 

I then made some test on my side, when the conditions meet, only one email will be sent out for the specific item that match the condition.

 

The functions used in Condition 2 is:

 

formatDateTime(items('Apply_to_each')?['Date'],'yyyy-MM-dd')

is equal to

addDays(utcNow(),30,'yyyy-MM-dd')

 

 

The function used in Condition 3 is:

 

formatDateTime(utcNow(),'yyyy-MM-dd')

is equal to

Date (dynamic content from Get items)

 

A screenshot for your reference:

1.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Helper III
Helper III

Thank you for the reply, Yes i get 6 emails for the 1 item that is equal to true.  I believe based on how i have this setup its the correct action.  My question now is if this is the best route to go.  What i'm trying to do is send an email based off dates.  There are three dates it will check.  Termination date equals to 90, 60, 30 days.  There is also a check if the item is not renewing which is a yes/no box.  

 

Maybe conditions aren't the right route to go because it seems like no matter it will check the first condition (If it should renew) and run through each time with the nested conditions underneath.  

Hi @eenochs ,

 

According to your description, you want to send an email when the contract terminate date is equal to 90 days from a termination date in the list.

 

But I am not sure with “termination date equals to 90, 60, 30 days”. Do you want to send an email for each termination date?

 

What’s the trigger of your original flow?

 

Could you share a screenshot on your list?

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Helper III
Helper III

I figured out the issue, for some reason it was checking each condition individually.  Deleting and starting over i was able to set it up correctly and get it working.  

View solution in original post

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (70,424)