web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to trigger an acti...
Power Automate
Unanswered

How to trigger an action on last Monday and Wednesday of the month (if the last week has Thursday)

(0) ShareShare
ReportReport
Posted on by 4

Trigger criteria:

- Need to trigger an action (send a Teams message for example) on last Monday and last Wednesday of each month.

- But last week of the month must have Thursday

- If month ends on Wednesday, we use the week prior and send message on that week's Monday and Wednesday

 

How do I do this? 

 

ps. BTW there's no easy way to trigger an action on the specific last day of the month. Please add this feature in "Recurrence". 

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    on at

    Hi @microsoftuser10 ,

     

    Please create a se flow and set the trigger's condition to to :

     

    @if( 
     and(less(dayOfWeek(addSeconds(addToTime(startOfMonth(utcNow()),1,'Month'),-1)),4),not(equals(dayOfWeek(addSeconds(addToTime(startOfMonth(utcNow()),1,'Month'),-1)),0))),
     or(equals(startOfDay(utcNow()),startOfDay(addDays(addSeconds(addToTime(startOfMonth(utcNow()),1,'Month'),-1),sub(-6,dayOfWeek(addSeconds(addToTime(startOfMonth(utcNow()),1,'Month'),-1)))))),equals(startOfDay(utcNow()),startOfDay(addDays(addSeconds(addToTime(startOfMonth(utcNow()),1,'Month'),-1),sub(-4,dayOfWeek(addSeconds(addToTime(startOfMonth(utcNow()),1,'Month'),-1))))))),
     or(equals(startOfDay(utcNow()),startOfDay(addDays(addSeconds(addToTime(startOfMonth(utcNow()),1,'Month'),-1),sub(1,dayOfWeek(addSeconds(addToTime(startOfMonth(utcNow()),1,'Month'),-1)))))),equals(startOfDay(utcNow()),startOfDay(addDays(addSeconds(addToTime(startOfMonth(utcNow()),1,'Month'),-1),sub(3,dayOfWeek(addSeconds(addToTime(startOfMonth(utcNow()),1,'Month'),-1)))))))
    )

     

    vbofengmsft_0-1666594332546.png

    vbofengmsft_1-1666594355383.png

     

    Best Regards,

    Bof

     

     

  • microsoftuser10 Profile Picture
    4 on at

    Thanks Bof, appreciate the response.

     

    Can you explain the logic please?

    Also did you mean to set the interval as 1 and frequency as "day"? 

  • v-bofeng-msft Profile Picture
    on at

    Hi @microsoftuser10 ,

     

    Also did you mean to set the interval as 1 and frequency as "day"? 

    Yes.

    Can you explain the logic please?

    Check if month ends on Wednesday/Tuesday/Monday

    • If Yes. Check if today is the prior week 's Monday or Wednesday
    • If No. Check if today is the last week 's Monday or Wednesday

    If the condition is true , then trigger the flow

     

    Best Regards,

    Bof

  • microsoftuser10 Profile Picture
    4 on at

    I had setup the power automate flow job and it triggered on Tuesday. Did you test it? 

    What I wanted is - trigger it on Monday and Wednesday (the last week of the month *if* last week has Thursday otherwise go back a week).

  • v-bofeng-msft Profile Picture
    on at

    Hi @microsoftuser10 ,

     

    Show me your trigger please.


    Best Regards,

    Bof

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 398 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 323 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 183 Most Valuable Professional

Last 30 days Overall leaderboard