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

Flow to send an email when SharePoint item is due in 7 Days

Hi All,

 

I'm currently trying to create a flow that sends an email notification when a SharePoint list item is due 7 days from today's date. I've currently tried several expressions that are pulling through the date but don't seem to be filtering out results that are due in 7 days - they're just pulling through everything that has a date. 

 

At the moment my steps are as follows:

 

- Recurrence

- Initialize Variable (Name: Alert Date. Type: String. Value: 

addDays(utcNow(),7,'MM/dd/yyyy')
-Get Items
- Appy to Each (Value)
- Condition (@lessOrEquals(items('Apply_to_each')?['RiskEventDate'], formatDateTime(adddays(utcnow(), 7)))
- If yes, send an email
 
I Have attached screenshots of my flow below.
 
Any help would be greatly appreciated.
 Flow screenshot 1.PNG
Flow Screenshot 2.PNG
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Flow to send an email when SharePoint item is due in 7 Days

Hi @DI123,

 

You could filter directly using Filter array contained in Get Items.

In the filter condition, I feel that we need to add another part. If only the setting is less than or equal to, those items that have expired will also be inclueded, so I added a part greater than or equal to.

I have made a test on my side and the flow works well. Please take a try with the following workaround.

The two expressions are:

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

formatDateTime(addDays(utcNow(),7),'yyyy/MM/dd')

Note that they have single quotes on the outside.

Image reference:

63.PNG

Please take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Flow to send an email when SharePoint item is due in 7 Days

Hi @DI123,

 

You could filter directly using Filter array contained in Get Items.

In the filter condition, I feel that we need to add another part. If only the setting is less than or equal to, those items that have expired will also be inclueded, so I added a part greater than or equal to.

I have made a test on my side and the flow works well. Please take a try with the following workaround.

The two expressions are:

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

formatDateTime(addDays(utcNow(),7),'yyyy/MM/dd')

Note that they have single quotes on the outside.

Image reference:

63.PNG

Please take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

DI123
Level: Powered On

Re: Flow to send an email when SharePoint item is due in 7 Days

That worked perfectly.

 

Thank you!

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: 390 members 3,014 guests
Please welcome our newest community members: