cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Tbruns Helper IV
Helper IV

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

5 REPLIES 5
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 Helper IV
Helper IV

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?

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 Helper IV
Helper IV

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

Tbruns Helper IV
Helper IV

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

How can I get this flow to not send an email when there are no events on the calendar?

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (7,517)