cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Frequent Visitor

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

6 REPLIES 6
Highlighted
Community Support
Community Support

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.
Highlighted
Frequent Visitor

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

 

 

 

Highlighted
Frequent Visitor

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

Highlighted
Frequent Visitor

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

Highlighted
New Member

Re: Sharepoint Calendar Reminder with E-mail

Hi,

 

Tried using your filter for 'Get Items' but getting an error:

 

The expression "EventDate eq 'formatDateTime(addDays(utcnow('yyyy-MM-dd'),30),'yyyy-MM-dd')'" is not valid.

Highlighted
New Member

Re: Sharepoint Calendar Reminder with E-mail

How do I turn pagination on so that the get function is not limited to the first 100 items?

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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!

Top Solution Authors
Top Kudoed Authors
Users online (6,707)