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

Create a Flow to run from a SharePoint doc library review date

I have a SharePoint document library with Review Date and Document Owner columns . I want to create a Flow that sends an email to the Document Owner when the Review Date is reached. Any flow I've tried works but I cannot get a condition of 'review date = today' to work. Any ideas?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Create a Flow to run from a SharePoint doc library review date

@thamilton:

 

Below is an example of a Flow that runs successfully and should meet your needs.

In my Flow, I am using an OData filter so that only documents that have a due date of today are returned - this is a better way than retrieving all documents and using a condition/if statement.

 

When using an OData filter to filter SharePoint data, you need to use the internal column name rather than the display name (the name you see).  The two are not always the same.  To get the internal column name, go to library settings and click on the column.  The column name will be at the end of the URL.

 

I am formatting the date to match the SharePoint format.  Please note the single quotes around the expression.

 

Let me know if you need additional help.

 

DocLibFilter1.jpgDocLibFilter2.jpg

 

If this meets your needs, please mark your post as Solved.

 

Scott

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

Scott

View solution in original post

Community Support Team
Community Support Team

Re: Create a Flow to run from a SharePoint doc library review date

Hi @ScottShearer,

 

Have you take a try with @ScottShearer's solution.

 

iI agree with @ScottShearer's solution, please take a try with his solution and let me know if your problem could be solved.

 

Best regards,

Alice

View solution in original post

6 REPLIES 6
Super User
Super User

Re: Create a Flow to run from a SharePoint doc library review date

In your condtition control it should be Review Date is equal to utc(Now()).

 

Rob

Super User
Super User

Re: Create a Flow to run from a SharePoint doc library review date

@thamilton:

 

Below is an example of a Flow that runs successfully and should meet your needs.

In my Flow, I am using an OData filter so that only documents that have a due date of today are returned - this is a better way than retrieving all documents and using a condition/if statement.

 

When using an OData filter to filter SharePoint data, you need to use the internal column name rather than the display name (the name you see).  The two are not always the same.  To get the internal column name, go to library settings and click on the column.  The column name will be at the end of the URL.

 

I am formatting the date to match the SharePoint format.  Please note the single quotes around the expression.

 

Let me know if you need additional help.

 

DocLibFilter1.jpgDocLibFilter2.jpg

 

If this meets your needs, please mark your post as Solved.

 

Scott

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

Scott

View solution in original post

Community Support Team
Community Support Team

Re: Create a Flow to run from a SharePoint doc library review date

Hi @ScottShearer,

 

Have you take a try with @ScottShearer's solution.

 

iI agree with @ScottShearer's solution, please take a try with his solution and let me know if your problem could be solved.

 

Best regards,

Alice

View solution in original post

thamilton
Level: Powered On

Re: Create a Flow to run from a SharePoint doc library review date

Hi Scott,

 

Sorry, i've only now got round to trying out your solution but the flow is failing and stating the expression is not valid. I'm getting the column name from the address bar in the Edit Column page and my filter query is

 

Review%5Fx0020%5FDate eq formatDateTime(utcNow(),'yyyy-MM-dd')

 

Any ideas?

Super User
Super User

Re: Create a Flow to run from a SharePoint doc library review date

Make sure the expression part of the filter has ' before and after it. You can see this in the images earlier in the thread.

 

Rob
Los Gallardos

thamilton
Level: Powered On

Re: Create a Flow to run from a SharePoint doc library review date

I do have ' around the expression, my query matches the example above exactly bar the date field name

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,405)