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

Community site session details

Session Id : QCE4l+3zeGZToaZBDO9F3J
Power Automate - General Discussion
Answered

excluding public holidays and weekends to send email

Like (0) ShareShare
ReportReport
Posted on 18 Jun 2024 06:03:46 by 16

Hi All, 

Can someone please help me with the idea that I have created a flow which send email once a month excluding weekends but i need help how can I exclude Public Holiday? 

aliska1bogati_0-1718690571611.png

 

I have the same question (0)
  • aliska1bogati Profile Picture
    16 on 20 Jun 2024 at 06:35:01
    Re: excluding public holidays and weekends to send email

    Hi Sunshine, 
    Thank you for this guide. 
    Could you please help me how can I exclude Friday, Saturday and Sunday, at the moment I am using delay for Saturday and Sunday with the expression how can I run the flow? 

  • Verified answer
    v-yetonggu-msft Profile Picture
    on 18 Jun 2024 at 07:17:12
    Re: excluding public holidays and weekends to send email

    Hi @aliska1bogati ,

    You might consider creating an Excel Table for weekdays。

    Like this:

    vyetonggumsft_3-1718694721514.png

    Flow Configuration:

    First, use the Filter array to determine whether today is a working day, if today is a working day, then send an email, if not, we put the difference between all the workdates in the excel table and today's date into an array, and then we filter out the records less than 0 in the Date array, and then delay the minimum difference in days, and the day when the email is sent is the next working day.

    vyetonggumsft_1-1718693879243.png

    utcNow('yyyy-MM-dd')

    vyetonggumsft_2-1718693960123.png

    length(body('Filter_array'))
    div(sub(ticks(items('Apply_to_each')?['workday']),ticks(utcNow('yyyy-MM-dd'))),864000000000)
    item()?['Date']
    First(sort(body('Filter_array_2'),'Date'))['Date']

    Best Regards,

    Sunshine Gu

  • Chriddle Profile Picture
    8,141 Super User 2025 Season 2 on 18 Jun 2024 at 06:22:03
    Re: excluding public holidays and weekends to send email

    Here I perform an “OffDayCheck” which determines whether the dates are on a weekend or in a “holidays” list.

    This might give you some inspiration.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 725 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 363 Moderator

#3
Power Apps 1919 Profile Picture

Power Apps 1919 341

Last 30 days Overall leaderboard
Loading complete