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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Flow to get employees ...
Power Automate
Unanswered

Flow to get employees off for next day

(0) ShareShare
ReportReport
Posted on by 6

Hi!

 

I am attempted to create a flow which goes into my OOF calendar on my sharepoint site and gathers all the employees listed for the next day. I want this to run at 9am and send an automated email to the supervisor with the employees off for the next day, but ran into some issues with the dynamic input within the filter array action. 

@and(
 greaterorequals(adddays(utcnow(),1,'yyyy-MM-dd'),formatDateTime(item()?['EventDate'],'yyyy-MM-dd')),
lessorequals(adddays(utcnow(),1,'yyyy-MM-dd'),formatDateTime(item()?['EndDate'],'yyyy-MM-dd'))
)

This is what I am currently using but for some reason the email i get is just a list of all the holidays for the year. Anybody have any idea how i could fix this?

 

Thanks!

Categories:
  • ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @ahlbornj:

     

    I suggest using an Exchange shared calendar or a Teams/Group calendar rather than a SharePoint calendar for this purpose.  The reason is that getting the data you want from the calendar is much more complicated that you might think.  One reason for the complexity is how SharePoint stores calendar information for repeating events.

     

    If you use an exchange-based calendar, the supervisor could just add the calendar to Outlook.  In addition, you may be able to add the Team/Group calendar to the SharePoint site.

     

    If you elect to stay with a SharePoint calendar, your best bet may be to use the HTTP action for SharePoint and make a call to retrieve the calendar info.  You can then format the data received and send out in an email.

     

    Scott

     

     

     

  • v-bacao-msft Profile Picture
    Microsoft Employee on at

    Hi @ahlbornj,

     

    I use your formula on my side to filter out the next day's data, but I don't specify the Category Type. You can add one more condition to the formula:

    @and(equals(item()?['Category']?['Value'], 'Holiday'),greaterorequals(adddays(utcNow(),1,'yyyy-MM-dd'),formatDateTime(item()?['EventDate'],'yyyy-MM-dd')),
    lessorequals(adddays(utcNow(),1,'yyyy-MM-dd'),formatDateTime(item()?['EndDate'],'yyyy-MM-dd')))

     

    As for the email you said, it shows a whole year of data, it may be that the value you used when configuring Create Html table action is from Get items action.

    Please use the value of Filter array output to be configured in Create html table action.

    Please take a try again.

     

    Best Regards,

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 298 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard