web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / SharePoint list elemen...
Power Automate
Answered

SharePoint list element older than ... days/weeks/months then send email to element creator

(0) ShareShare
ReportReport
Posted on by

We are badly looking for support/help to setup a Flow (template):

1)

If a SharePoint list element is older than a certain period (days, weeks or months) then send an email with hyperlink of the element to the creator of the element, or to the admin or...

2)

same as above but with the trigger "not changed since period (days, weeks or months)"

 

We warmly welcome any support/solution - thx danh

Categories:
I have the same question (0)
  • MattWeston365 Profile Picture
    1,701 on at

    Hi danh, you could set something like this up using a Recurrence trigger, if you want to schedule it, or you could run it from a Flow button if it's something you wish to run ad-hoc.

     

    My Flow is posted below. It starts off by Getting all of the items from a list (the same logic could apply to a library), and will filter the query based on the modified date being older than 10 days. For that, I have used an expression to subtract 10 days from the current date, using the addDays expression.

     

    Alternatively you could use the subtractFromTime expression which would look something like this subtractFromTime(utcNow(),10,'Day')

     

    Once I've got my list items returning, I can just send out an email to inform the creator that they need to update their content.

     

    ContentOlderThan10Days.PNG

  • Community Power Platform Member Profile Picture
    on at

    Hi - thank you - I did not turn it on yet. It took me quite some time to realize that the Try block  is "Scope", Modified le is "less or equal" 😉 But what is Catch - Scope?

    Though I hope you can advice me one more time.

    I setup a basic list "test" and instead of period days etc. I use the interval of 10 minutes.

    Recurrence trigger is fine.

    Filter query: addMinutes(utcNow(),-10)

    TEst - all fine, until I click on "See flow run activity", this returns  Status Failed => Scope =>

    ActionFailed. An action failed. No dependent actions succeeded.
    Get items - BadRequest
    Body
      "status": 400,
      "message": "The expression \"Modified 2019-04-10T13:01:02.0480549Z\" is not valid.\r\nclientRequestId: 2a0aecf3-4450-4dce-88b6-e5bd2fab09ce\r\nserviceRequestId: c598d19e-70ed-8000-e280-f02a64dc2a6f"
    Can you please help again - thx
  • Verified answer
    MattWeston365 Profile Picture
    1,701 on at

    Hi @Anonymous sorry for not being more clear in my response.

     

    Try / Catch

    This is a pattern which I've always followed since the introduction of scopes, they allow me to graciously handle any errors which may be thrown when my Flow is running. The Try scope contains all of my logic, and the Catch scope is configured to only run if something in Try fails. My Catch scopes always contain an email to me to tell me that the Flow has failed, a link to the entry in the Flow history, and some basic information from the trigger so that I can track down any problems.

     

    Yes, le is less that or equal to, likewise ge is greater than or equal to. You can find more info about the operators in section 4.5 on the following link:

    https://www.odata.org/documentation/odata-version-2-0/uri-conventions/

     

    The message to me implies one of two things, either the operator hasn't been included i.e. "le" or the datetime you're comparing against hasn't got single quotes around it. ' '

     

    So just make sure that your query looks like this:

    Modified le '<your expression>'

     

    If that still doesn't work, please post a screenshot of your Flow and we'll nail it pretty quickly 🙂

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    Thank you very much 😉 I 'll definitely invest time in learning Flow - thx danh


    @MattWeston365 wrote:

     


     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard