cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Patron
Post Patron

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

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

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

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?

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

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

Post Patron
Post Patron

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

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (28,155)