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

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
Highlighted
Community Support
Community Support

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
Highlighted
Community Support
Community Support

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

Regular Visitor

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

That worked perfectly.

 

Thank you!

Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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
Users online (10,110)