Skip to main content

Notifications

Community site session details

Community site session details

Session Id : GrK1f4fEWl9ctfi72t6uzX
Power Automate - Building Flows
Answered

Trying to make a flow to send a document for review from Sharepoint if it hasn't been modified in a certain time period

Like (0) ShareShare
ReportReport
Posted on 31 May 2019 18:56:49 by 8

I am trying to create a flow for our standard operating procedures on SharePoint to automatically send for review and approval when they have not been modified in a year. I have started the automated flow with the "When a file is created or modified" in Sharepoint and wanted to add a condition based on the modified field but I am unsure how to set the condition up. Can anyone help me with this?

 

 

  • Community Power Platform Member Profile Picture
    on 18 Jan 2021 at 19:48:36
    Re: Trying to make a flow to send a document for review from Sharepoint if it hasn't been modified in a certain time period

    Great Thread. Where I am getting stuck is when I get call Get Files "Properties Only" for a sharepoint folder which has 2 excel files, when I see the output it seems blank. So when the condition kicks in, it does not give me error and also does not have any email sent. Does anyone know why value is blank

     

    Capture2.JPG

  • ScottShearer Profile Picture
    25,223 Most Valuable Professional on 12 Feb 2020 at 21:23:46
    Re: Trying to make a flow to send a document for review from Sharepoint if it hasn't been modified in a certain time period

    @PaulDerby 

    Here is a link to a post on this site that details how to accomplish your goal.  The solution uses a list but it would be the same concept for a library.

     

  • PaulDerby Profile Picture
    6 on 12 Feb 2020 at 21:10:06
    Re: Trying to make a flow to send a document for review from Sharepoint if it hasn't been modified in a certain time period

    @ScottShearer 

     

    Hi Scott - 

     

    Created a very similar FLOW to the one outlined here and it's working well - just looking for input to improve it by one step and struggling somewhat when it comes to the Array piece - (maybe method other than an Array will work?) 

     

    Flow analyses Doc Library Review Date - compares to current date(TODAY) and if condition (Less Than or Equal ) is met, will fire off an automated email advising that there is a Document due for review.

    This is a "one e-mail per document", but one of the Libraries in the scope of this FLOW has 1600 docs in it with about 15 authors- so was hoping to add all docs due for a review by each Document Owner to a single e-mail rather than killing their inbox with dozens of emails.

     

    I tried to create an Array to include the Docs for review by Owner but the output only seems to copy each document into an array with the same number of identical entries ( the number of entries matches the number of individual docs, so I know I'm close, just not sure if i'm positioning the Array properly in the Apply-to-Each module) - Basic flow is below - can you advise where to put the array and how to reference/call it in the email body ( the Output of the Array didn't appear in the Dynamic Content ) 

    DocReview.PNG

     

    Regards,

    Paul

  • Verified answer
    v-zhos-msft Profile Picture
    on 03 Jun 2019 at 07:42:12
    Re: Trying to make a flow to send a document for review from Sharepoint if it hasn't been modified in a certain time period

    Hi @EricKaye ,

    It seems you want to check whether the document has been modified in one year.

    If the document hasn't been modified in one year, you want to send the document for review.

    I have made a test on my side, please take a try with the following workaround:

    Here I use the 'Recurrence' trigger, it will run one time every month to check the document.

    The expression in the codition is:

    addDays(items('Apply_to_each')?['Modified'],365,'yyyy-MM-dd')
    is less than 
    utcNow('yyyy-MM-dd')

    Capture6.PNG

    Best Regards,

    Community Support Team _ Zhongys

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

     

  • EricKaye Profile Picture
    8 on 31 May 2019 at 20:00:12
    Re: Trying to make a flow to send a document for review from Sharepoint if it hasn't been modified in a certain time period

    @ScottShearer 

     

    Thanks for quick response to my question! You may have to bear with me on this as this is my first time using Flow and I am trying to understand the logic behind it. 

     

    I have started creating a reoccuring flow like you suggested with your comment, finished adding the query you suggested but I am lost after that. Should I look into sending an email / approval request to the approver of the document and have that automatically updated the SharePoint document workflow status?

     

    I am also interested in the other ways that this could be done. 

     

    Thanks again for all your help! 

  • ScottShearer Profile Picture
    25,223 Most Valuable Professional on 31 May 2019 at 19:40:45
    Re: Trying to make a flow to send a document for review from Sharepoint if it hasn't been modified in a certain time period

    @EricKaye 

    I believe you should start with a recurrence trigger rather than a Created or Modified trigger. A Flow can only be running for 30 days and then it will be cancelled.

     

    Schedule the Flow to run periodically (Daily? Weekly?) and use a Get Files (properties only) action.  In that action, configure a filter query that will filter out any documents that have not been modified in over a year.

    I haven't tested this, but the filter query should look something like this:

    Modified le 'addDays(utcNow(),365,'yyyy-MM-dd')'

     

    The text inside of the single quotes is an expression and must be entered in the expression window.  The single quotes are required.

     

    The problem is that if you loop through the list and start approvals, the Flow will pause on each individual approval until action is taken.  You might want to create an entry in a separate list for each item.  Then start an approval on the items in the new list.  The items in the new list can be linked to the original document.....  There are other ways of approaching this as well.

     

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 66 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 65

#3
rzaneti Profile Picture

rzaneti 41 Super User 2025 Season 1

Overall leaderboard
Loading started