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

Document review required notification in SarePoint Online

I am looking to send an email to a document owner when a file, in a document library sub-folder is up for review.

I am getting the following error with the filter array I tried to establish if the document review date has passed: 

 

The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@less(item()?['ReviewDate'], addDays(utcNow(), 0, 'yyyy-MM-dd'))' failed: 'The template language function 'less' expects two parameter of matching types. The function was invoked with values of type 'Null' and 'String' that do not match.'.

2 REPLIES 2
ScottShearer
Super User
Super User

@AMorton 

Try this as your filter query in your Get Files action:

ReviewDate eq 'formatDateTime(utcNow(),'yyyy-MM-dd)'

 

Note that the bold text is an expression and must be entered in the expression window and enclosed in single quotes.

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

Thanks Scott, That worked to get the flow to run. It sent me an email response though for every file in the library, not just the ones where the review date has passed?

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,988)