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

Creating a summary email from a SharePoint calendar using filter array?

Hi,

 

I am trying to create a Flow that looks up the events on a SharePoint calendar and then send an email containing the events for the upcomming day to an email address.  I've been working through the threads on this forum and although I have got further down the road with this I am still hitting an issue.

 

This is what I have so far, the SharePoint calendar has 4 entries, 2 for each day (today/tomorrow at time of testing)

 

calendar.jpg

 

The flow I've created looks like this:

 

emailsummary.jpg

 

The filter array code is:

 

@Equals(formatDateTime(item()?['EventDate'], 'MM/dd/yyyy'), formatDateTime(utcNow(), 'MM/dd/yyyy'))

 

This flow runs without error but the email I get looks like this:

 

emailresult.jpg

 

As you can see it's bringing back all the events?

 

As a side note, if someone can suggest how I can get the time to just show the short time that would also be great.

 

Any thoughts gratefully received.

 

Rob

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
mgiuliani
Level: Power Up

Re: Creating a summary email from a SharePoint calendar using filter array?

Hi Rob,

 

I built a similar Flow to yours to get the current day's events emailed to me each morning.  The only down side is that I have not figured out how to capture reoccuring events or ones that go multiple days (ie. week off for vacation).  Only the first date registers for those.  I used "Filter Query" under advanced options for the "Get Items" action.  That's what only captures the current day.  I also included how I formatted the time to display in the emails.  The only thing to keep in mind with that portion is if you format your time zone in it, "all day" events will not display as 12:00am to 11:59pm.  Hopefully this gives you some guidance and you can make adjustments as needed.

 

event-flow.pngFilter query: EventDate ge 'utcNow('yyyy-MM-ddT00:00:00Z')' and EventDate lt 'addDays(utcNow(),1,'yyyy-MM-ddT00:00:00Z')'event-flow2.pngRuns successfullyevent-flow3.pngAs displayed in email

Michael

View solution in original post

2 REPLIES 2
mgiuliani
Level: Power Up

Re: Creating a summary email from a SharePoint calendar using filter array?

Hi Rob,

 

I built a similar Flow to yours to get the current day's events emailed to me each morning.  The only down side is that I have not figured out how to capture reoccuring events or ones that go multiple days (ie. week off for vacation).  Only the first date registers for those.  I used "Filter Query" under advanced options for the "Get Items" action.  That's what only captures the current day.  I also included how I formatted the time to display in the emails.  The only thing to keep in mind with that portion is if you format your time zone in it, "all day" events will not display as 12:00am to 11:59pm.  Hopefully this gives you some guidance and you can make adjustments as needed.

 

event-flow.pngFilter query: EventDate ge 'utcNow('yyyy-MM-ddT00:00:00Z')' and EventDate lt 'addDays(utcNow(),1,'yyyy-MM-ddT00:00:00Z')'event-flow2.pngRuns successfullyevent-flow3.pngAs displayed in email

Michael

View solution in original post

Rob_CTL
Level: Powered On

Re: Creating a summary email from a SharePoint calendar using filter array?

Hi @mgiuliani

 

Many thanks for that, I was just looking at the filter query stuff when I got the alert about your reply.

 

I am going to have a play to see if I can get the all day events to display slightly differently but overall I'm very happy - big thanks.

 

Have a good weekend.

 

Rob

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

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 Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 281 members 4,200 guests
Recent signins:
Please welcome our newest community members: