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

Community site session details

Session Id : QpHzDeXEHCPI/3hw08V2pF
Power Automate - Building Flows
Answered

Sharepoint - Send mail if no new files added to sharepoint

Like (0) ShareShare
ReportReport
Posted on 19 Aug 2021 11:51:26 by 31

Is it possible to set up a flow where I check a sharepoint folder for new files, based on amount of days since last file.

 

So for example: Check if there has been added any new files to a specific folder in the last 8 days.

If there has don't send email.

If there hasn't send email.

 

Thanks in advance.

  • Pstork1 Profile Picture
    67,158 Most Valuable Professional on 20 Aug 2021 at 12:04:54
    Re: Sharepoint - Send mail if no new files added to sharepoint

    The error is about the length() statement in the condition.  Re-do that one to get rid of the error.  

  • NJessen Profile Picture
    31 on 20 Aug 2021 at 08:30:15
    Re: Sharepoint - Send mail if no new files added to sharepoint

    Thank you for helping!

     

    I'm now getting an error message.

     

    I've tried posting exactly what you had in filter query in, but I get the same error.

    I've tried all the things I could come up with in the query filed but nothing worked.

    I also tried writing "modified ge 'inserted add days formula' - gave same error

    NJessen_0-1629448112853.png

     

     

     

  • Pstork1 Profile Picture
    67,158 Most Valuable Professional on 19 Aug 2021 at 14:35:21
    Re: Sharepoint - Send mail if no new files added to sharepoint

    Your filter query is incorrect in the get files properties only.  It needs to include the name of the field and the operation.  Like this:  Make sure to add the single quotes around the AddDays() function.

    image.png

    You should also have a condition to test the size of the array returned to see if you need to send the email or not.

    image.png

  • NJessen Profile Picture
    31 on 19 Aug 2021 at 13:15:36
    Re: Sharepoint - Send mail if no new files added to sharepoint

    Thank you for your reply!

    This makes sense, however I cannot manage to make it work.

     

    This is my attempt: I can click test but I never seem to get any mail.

     

    I'd like the mail to be sent in case the folder has no files updated in the last 7 days.

    If any file has been updated in the last 7 days do nothing.

     

    flow.png

     

    Sorry for the inconvenience.

  • Verified answer
    Pstork1 Profile Picture
    67,158 Most Valuable Professional on 19 Aug 2021 at 12:31:00
    Re: Sharepoint - Send mail if no new files added to sharepoint

    1) Build a flow with a recurrence trigger to run at whatever interval you want to check for new files

    2) Get all the files in a folder where the created date is greater than AddDays(UTCNow(), -8)

    3) If the array returned has a length of 0 (no files found) send the email.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete