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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Building a flow to che...
Power Automate
Answered

Building a flow to check if a file was modified in the last 30 minutes

(0) ShareShare
ReportReport
Posted on by 157

I am building a flow that sends notifies people when a particular file in a Sharepoint document library is modified, which I have working. However, it literally sends hundreds of emails, as I assume it triggers whenever the autosave kicks in.

 

The best way I can think to minimize the volume of emails is to check if the modified time was within, say... the last 30 minutes using utcNow() and comparing this to the 'Modified' column in Sharepoint? I'm just not sure how the expression would look. Would I need to use:<code>@greater</code> ? Please could I have some help?

Categories:
  • Paulie78 Profile Picture
    8,424 Moderator on at

    Why not disable that trigger completely and just run the flow on a recurrence schedule and check if the file was updated in the last 60 mins? That would seem simpler to me.

     

    Or run it every half hour and check the last 30 mins. 

  • Jay-Encodian Profile Picture
    2,920 on at

    @FreddieV 

    agree with @Paulie78 ,that was my first thought.

    You could consider SharePoint alerts... you can then just setup to send a daily summary and no need for a Power Automate flow.

  • FreddieV Profile Picture
    157 on at

    Thanks for the reply, this does make more sense, but I am still unsure how the expression would look, or even how the fow would now look. How would it check that the document was updated?

     

    Screenshot 2020-11-25 at 17.07.36.png

     

    I can't see how this would work.

  • Verified answer
    cdn4lf Profile Picture
    182 on at

    @FreddieV  you'll need to first get all items within the library.

     

    From there, you'll need to compare the modified date to the utc date - 1 hour

     

    Screenshot 2020-11-25 124004.png

     

    From there, you should be able to send your emails

  • FreddieV Profile Picture
    157 on at

    Thanks very much for your help. Which is the value in the condition....greater than or equal to?

  • Paulie78 Profile Picture
    8,424 Moderator on at

    I would do something like this:

    lastModified.PNG

    The output of "Minutes Since Last Modified" can be used in your subsequent conditions. The expression I used was:

    div
    (
     div
     (
     mul
    	(
    	 sub
    	 (
    		 ticks(utcnow()),
    		 ticks(outputs('Get_file_properties')?['body/Modified'])
    		 ),100)
    	,1000000000)
     ,60
    )

    Output looks like this:

    lastModifiedResult.PNG

    So you can just follow that with a simple condition like:

    lastModifiedAction.PNG

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard