cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
acharge37
New Member

Flow - SharePoint Send email on Document Review Date

Hello all

 

Hope you can help please. 

 

I've created a similar Flow and need some help, I need Sharepoint to Send an email to alert -60 days before Next Review Date.

 

The email comes through with the correct details, but it just comes back with all documents in that field rather than 60 days before.

 

Can this also be set global over all sites or per folder? 

 

String being used when on advanced: @not(equals(items('Apply_to_each')?['Next_x0020_Review_x0020_Date'], formatDateTime(adddays(utcnow(), -3), 'yyyy-MM-dd')))

Over Due Date 1.pngOver Due Date 3.pngDue Date 4.png

5 REPLIES 5
v-yuazh-msft
Community Support
Community Support

Hi @acharge37,

 

If you want to send an email 60 days before the Next Review Date of each file, please refer to screenshot below to create the flow:

Capture.PNG

 

Note:

1. Choose the frequency to every day in the "Recurrence" action.

2. The expression in the Condition as below:

@equals(formatDateTime(addDays(utcNow(), 60), 'yyyy-MM-dd'), formatDateTime(items('Apply_to_each')?['Next_x0020_Review_x0020_Date'], 'yyyy-MM-dd'))

Best regards,

Alice

Hello Alice

 

Thanks for your help, I have changed the string as advised but now I get this error,

 

Could you advise please?

 

Thank you

 

Flow Failed 2.PNGFlow failed.PNG

Hi @acharge37,

 

Could you please share more details about the error message in your run failed flow?

Does your flow run failed with error message as below:

Capture.PNG

 

If yes, that means you have some items with a null value in the Next Review Date column, and you could add a Condition 2 to check if the Next Review Date column is null, the screenshot of the flow should as below:

Capture.PNG

 

The expression in the Condition 2 as below:

@not(empty(items('Apply_to_each')?['Next_x0020_Review_x0020_Date']))

 

The flow would run successfully as below:

Capture.PNG

 

Best regards,

Alice

 

 

Hello Alice Thanks for the below, but I'm now confused, please could you advise the complete flow with the two different conditions and where they go.

Condition 1 - @equals(formatDateTime(addDays(utcNow(), 60), 'yyyy-MM-dd'), formatDateTime(items('Apply_to_each')?['Next_x0020_Review_x0020_Date'], 'yyyy-MM-dd'))

 

Condition 2 - @not(empty(items('Apply_to_each')?['Next_x0020_Review_x0020_Date']))

 

This is my whole flow below, are you able to take a screen shot of your working flow plesae, really apprciate this help as my testing today hasnt workined

 

1.png2.png3.png

 

 

Hello @v-yuazh-msft

 

would you be able to help please?

 

Thanks

 

Andrew

Helpful resources

Announcements
Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,651)