cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tbruns
Level: Powered On

Flow will not give me all dates that are entered on a Sharepoint Calendar

Hello!

I am needing to create a Flow that sends an email out Monday-Friday (each day) showing who is on vacation from our Sharepoint Calendar. I have a Flow that works but it is only sending the first day of vacation and not each day if the event is recurring.

Example: Tom enters vacation on the sharepoint calendar starting Monday 2/11/2019 and ending Friday 2/15/2019. I need the flow to send an email all 5 days showing that he is on vacation.

Also how do you make Flow only send an email during the work week and not on weekends? 

I appreciate all assistance!

02-11-2019 2-52-45 PM.jpg02-11-2019 2-52-56 PM.jpg02-11-2019 2-53-07 PM.jpg02-11-2019 2-53-15 PM.jpg

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Flow will not give me all dates that are entered on a Sharepoint Calendar

It looks like you don't have single quotes at the end of your dates.

 

It should be

EventDate le '2019-02-08' and EndDate ge '2019-02-14'

 

See how the date is enclosed in single speech marks?

 

- Mark

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Flow will not give me all dates that are entered on a Sharepoint Calendar

Yeah. Your date filters are wrong.

You are just filtering items where the Start Date is today. If the start date was yesterday, or two days ago, then it won’t match.

Your filter needs to be:
(Where the start date is less than or equal to today) AND (the end date is greater than or equal to today)

Personally, I’d also put that as a filter OData expression in the SharePoint Get Items action. This would look something like:
StartDate le ‘@{formatDateTime(utcNow(),’yyyy-MM-dd’)}’ and EndDate ge ‘@{formatDateTime(utcNow(),’yyyy-MM-dd’)}’

Of course you need to change a few things. Change the StartDate and EndDate column references to the actual “internal name” of your SharePoint columns, fix up the stoopid single quotes (‘’) that my iPhone puts in, and put the @{} bits as expressions in the filter box.

Hope this helps

- Mark
Tbruns
Level: Powered On

Re: Flow will not give me all dates that are entered on a Sharepoint Calendar

I am sorry I cannot get it to work. In the Filter Query of the Get Items I have this.02-12-2019 12-53-18 PM.jpg

 

What am I doing wrong?

Highlighted
Super User
Super User

Re: Flow will not give me all dates that are entered on a Sharepoint Calendar

It looks like you don't have single quotes at the end of your dates.

 

It should be

EventDate le '2019-02-08' and EndDate ge '2019-02-14'

 

See how the date is enclosed in single speech marks?

 

- Mark

View solution in original post

Tbruns
Level: Powered On

Re: Flow will not give me all dates that are entered on a Sharepoint Calendar

Thank you! I wish I had someone to assist me like that all the time! Woman Happy

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (6,999)