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
Advocate I
Advocate I

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
Advocate I
Advocate I

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

View solution in original post

@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.

View solution in original post

texmexdaddy
Regular Visitor

@FlowHawk   Thanks FlowHawk!   

 

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,114)