cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
texmexdaddy
Regular Visitor

schedule an email reminder one time per month

Hello  -  I am using one of the templated flows to send a reminder email from Outlook.    The only customization I need is to have it be sent out once per month, on the 12th of each month.   I tried adding this trigger, but when I add this, the flow never seems to work.    The odd part is that it does not show any errors, but when I check the flow history, it does not show up even though if I "test" the flow it says it ran successfully.    If I delete this trigger and do a manual test, the flow works fine.   

 

@equals(utcnow('DD'),string(12))

 

I also tried using 'MM' but that had the same result as above.    What am I missing?

2 ACCEPTED SOLUTIONS

Accepted Solutions
FlowHawk
Helper II
Helper II

Try this: @equals(utcnow('dd'), '12')

View solution in original post

That is not easily done 😅 What I would do if I were in your shoes, is set the flow to trigger on every Wednesday, then set the trigger condition to check if the date 14 days ago is still in the same month as today's date, then check if the date 21 days ago is not in the same month as today's date. That would narrow to the third Wednesday.

 

Something like this:

@And(equals(formatDateTime(addDays(utcNow(),-14),'MM'),utcNow('MM')),not(equals(formatDateTime(addDays(utcNow(),-21),'MM'),utcNow('MM'))))

 

I did it to check if today was the second Monday with the following:

and(equals(formatDateTime(addDays(utcNow(),-7),'MM'),utcNow('MM')),not(equals(formatDateTime(addDays(utcNow(),-14),'MM'),utcNow('MM'))))

 

Which evaluated to true. I switched it to check if today was the third Monday:

and(equals(formatDateTime(addDays(utcNow(),-14),'MM'),utcNow('MM')),not(equals(formatDateTime(addDays(utcNow(),-21),'MM'),utcNow('MM'))))
 
Which evaluated to false. I believe that would work.

View solution in original post

4 REPLIES 4
FlowHawk
Helper II
Helper II

Try this: @equals(utcnow('dd'), '12')

@FlowHawk   That small changed seemed to work!    Thank you.   Just out of curiosity, if I wanted to set the interval to let's say the 3rd Wednesday of each month, do you know how to do that?  

 

flow.jpg

That is not easily done 😅 What I would do if I were in your shoes, is set the flow to trigger on every Wednesday, then set the trigger condition to check if the date 14 days ago is still in the same month as today's date, then check if the date 21 days ago is not in the same month as today's date. That would narrow to the third Wednesday.

 

Something like this:

@And(equals(formatDateTime(addDays(utcNow(),-14),'MM'),utcNow('MM')),not(equals(formatDateTime(addDays(utcNow(),-21),'MM'),utcNow('MM'))))

 

I did it to check if today was the second Monday with the following:

and(equals(formatDateTime(addDays(utcNow(),-7),'MM'),utcNow('MM')),not(equals(formatDateTime(addDays(utcNow(),-14),'MM'),utcNow('MM'))))

 

Which evaluated to true. I switched it to check if today was the third Monday:

and(equals(formatDateTime(addDays(utcNow(),-14),'MM'),utcNow('MM')),not(equals(formatDateTime(addDays(utcNow(),-21),'MM'),utcNow('MM'))))
 
Which evaluated to false. I believe that would work.
texmexdaddy
Regular Visitor

@FlowHawk   Thanks FlowHawk!   

 

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

Users online (2,443)