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

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

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
Highlighted
Skilled Sharer
Skilled Sharer

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
Highlighted
Helper V
Helper V

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

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

Highlighted
Helper V
Helper V

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

Highlighted
Helper V
Helper V

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
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Top Kudoed Authors
Users online (4,783)