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

Sharepoint Calendar Reminder with E-mail

Trying to create a Flow that checks a Sharepoint Calendar and then sends a reminder a Day before the Event. But every condition I have tried returns a false outcome.

 

So far I have created a Calculated column called Reminder Date using the following formula: =[Start Date]-1 which is set to display Date only and is in dd/mm/yyyy format

And used the following Condition:

 

formatDateTime(triggerBody()?['Reminder Date'],'dd/mm/yyyy') "is equal to"

formatDateTime(utcNow(), 'dd/mm/yyyy')

 

Which returned False. So I tried the following. I created another Calculated Column called datescalculation using the following formula: =TODAY()-[Reminder Date] and made this display as a number value.

 

Then tried to do it a simple as Selecting datescalculation from the Dynamic Content and doing the below:

 

datescalculation "is equal to" 1    -> which also returned false.

 

I have also tried other methods to this each either failing or showing as false. 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
hjevons
Level: Powered On

Re: Sharepoint Calendar Reminder with E-mail

I resolved this myself by adding a filter to the Get Items as below:

 

EventDate eq 'formatDateTime(addDays(utcnow('yyyy-MM-dd'),1),'yyyy-MM-dd')'

 

The adding a Apply to each 'Item' send and e-mail.

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: Sharepoint Calendar Reminder with E-mail

Hi @hjevons ,

 

How is your flow created? Could you share a screenshot of the flow?

According to your description, it seems that you would like to send a reminder email a day before the event start date.

If you already have created a custom calculated column in the calendar, you could try the following flow.

Before starting the flow, I have created a calculated column with formula: [Start Date]-1 which is set to Date only and named as CalculatedDate.

Then I started the flow with the button trigger, get items from the calendar. Add a condition to check if the CalculatedDate is equal to Today’s date.

 

formatDateTime(items('Apply_to_each')?['CalculatedDate'],'yyyy-MM-dd')

is equal to

utcNow('yyyy-MM-dd')

 

Under if yes branch, add an action to send the reminder.

1.PNG

While your scenario could also be achieved without adding a calculated column in the calendar. Please consider using the function adddays to check if the start date is equal to today or not.

For testing, add a condition 2 with the following formula:

 

addDays(items('Apply_to_each_2')?['EventDate'],-1,'yyyy-MM-dd')

is equal to

utcNow('yyyy-MM-dd')

Then under if yes branch send out the reminder.

2.PNG

Please take a try with it.

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hjevons
Level: Powered On

Re: Sharepoint Calendar Reminder with E-mail

Hi Mabel,

 

Thank you for the deatilled response, I have been using a file being created in a folder as a trigger rather then a button, which has been working.

 

I have tried the Adddays as you have mentioned above but I still get a False response even though I have a test even created for tomorow.

 

2019-02-25_11-24-06.jpg

 

 

Does it matter that in my list my Dates appear in a dd/mm/yyyy format and not a yyyy-mm-dd format?

 

Here is an example of one of my events:

 

2019-02-25_11-46-29.jpg

 

 

 

hjevons
Level: Powered On

Re: Sharepoint Calendar Reminder with E-mail

After looking at the code for what the Get Items outputs it seems it is only looking for 100 events.

 

Our calendar has existed since 2008 and some of the evens re-occur from back then, so it is checking all of the dates from back then.

 

I have now set Pagination on to allow the get to find all the items, but I am still getting a false result? 

 

Even though in the Get Items I can find the result, see below: 

 

"Title": "test",
"EventDate": "2019-02-27T00:00:00Z",

hjevons
Level: Powered On

Re: Sharepoint Calendar Reminder with E-mail

I resolved this myself by adding a filter to the Get Items as below:

 

EventDate eq 'formatDateTime(addDays(utcnow('yyyy-MM-dd'),1),'yyyy-MM-dd')'

 

The adding a Apply to each 'Item' send and e-mail.

View solution in original post

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: 498 members 5,335 guests
Please welcome our newest community members: