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 / How to know if a file ...
Power Automate
Answered

How to know if a file is being modified by user

(0) ShareShare
ReportReport
Posted on by 104

I'm currently using a flow which create a notification in a Teams channel when a file is create in a SharePoint library.

I would like to extend the function to also have a notification when the files are modified.

The problem is it create a large amount of notifications even the user modifiy up to a 1 tipo in the file.


So I would like to restrain the notification with this idea : IF file is <in use> THEN abort notification.

 

I went through all "get file property" actions, but could not find which property I could use to put in place my code.

Categories:
I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @MJKjoachim 

     

    May be i am confused a little, what u meany by 1 tipo here?

     

    Also could you elaborate this? So I would like to restrain the notification with this idea : IF file is <in use> THEN abort notification.

     

     

  • MJKjoachim Profile Picture
    104 on at

    Hello @Nived_Nambiar ,

    Thank you for your feedback.

    What I mean is during preliminary test of my flow, I could see there is a lot of notifications which are triggered by flow as soon as anything is modified by user.

    For example, this will result as an enormous amount of notification when the user is modifying a file from a blank file.
    This huge amount of notifications will drown the chat in Teams and lose the user in all these notifications.

     

    So my point is to block the notification if I can detect that the file is still opened or used by a user.

    The notification will be done only when the user quit and close the file.

  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @MJKjoachim 

     

    Try this approach

     

    Nived_Nambiar_0-1682308200808.png

     

    Nived_Nambiar_1-1682308224824.png

     

     

    Hope this helps 🙂

     

  • AnathiMj Profile Picture
    29 on at

    Please check if you are not doing any updates in the flow which will always trigger your flow

  • MJKjoachim Profile Picture
    104 on at

    Dear @Nived_Nambiar ,

    I tried the solution you proposed but unfortunately, the library where the file is stored do not have the checkin/out mendatory.
    It means the file will be in checkout status = false when user modify it.

  • MJKjoachim Profile Picture
    104 on at

    Actually, I tried a workaround the "Modified" timestamp.
    To limit the number of notification, I calculated the difference of time between the Modified and UTCNow.
    if the time is bigger than 5min, I post a message.


    UTCticks = ticks(UTCNow())
    Modifiedticks = ticks of "Modified" of the file passed through a timezone convertion

    Expression = div(sub(variables('UTCticks'),variables('Modifiedticks')), 600000000)


    The problem I didn't think about is the flow trigger is the modification itself, so the time difference will be always less than 5min...

  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @MJKjoachim 

     

    I thought checkout would work

     

    Since you said using modification, you have to make the flow to run a specified time instead of trigger flow then 

     

    But one question there is, does modified duration give any sign that file is closed ?

     

  • Verified answer
    MJKjoachim Profile Picture
    104 on at

    Actually I was thinking that if the file has been not modified since 5min, it means probably the file is not editing anymore.

    As we do not have any way to valid if the file is opened or closed, I postpone my idea for later.

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard