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 / Flow that checks if a ...
Power Automate
Unanswered

Flow that checks if a File is locked

(1) ShareShare
ReportReport
Posted on by 988

Could I create a flow that checks if a file is locked after a certain Status Value and then send an email to the user that has the file locked.

Categories:
I have the same question (0)
  • Verified answer
    trice602 Profile Picture
    15,402 Super User 2025 Season 2 on at

    Hi @kmw1130 ,

     

    Here's a similar flow you may be able to adopt.  Here. I on recurrence, I check all files in a folder and check two things:

     

    1) Is the file checked-out;

    2) Is the last modified date less than or equal to UTCnow -7 days.

     

    If true, send the person who has the file checked out an email, nudge reminder...

     

    Please let me know if this framework will work for you!

     

    trice602_0-1692386220454.png

     

     

  • trice602 Profile Picture
    15,402 Super User 2025 Season 2 on at

    Update - would be less than or equal to...

  • Laura3 Profile Picture
    71 on at

    Hi, I haven't tried this because I'm looking for something similar but not exactly the same, but I'm hoping you'd be able to help me. 

    I want to create a flow that checks for documents in a folder and if they are not locked, delete them, if they are locked leave them as they are. Should be simple enough but I don't know the syntax for checking if they are locked. Can you help? 

  • trice602 Profile Picture
    15,402 Super User 2025 Season 2 on at

    Hi @Laura3 ,

     

    It is going to be very similar to the above example I provided except, in the condition you would only check if the file is checked out to be true and then instead of send email, it would be delete file on the NO side.  As this loops through each file in the apply to each, it will check if the file is checked out (aka locked) and then if not true delete it.

     

    Please mark as a solution if this helps you get going!

     

     

     

     

  • Laura3 Profile Picture
    71 on at

    Thanks @trice602 , sadly no it hasn't worked for me. Also I don't know if in the language there is a difference between a file 'checked out' or locked because it's in use or open by anybody (including the system itself when the file has been uploaded in the last 6 minutes). 

    If you have any insights, I'd be grateful, otherwise than you for trying at least. 

  • HKICE Profile Picture
    237 on at
    The question was to find if a file is "Locked", that is different than if a file is "Checked out". 
     
    A "Locked" file is one where someone opens a file without checking out ... then the file will be "Locked" until the person closes it.  If someone tries to open that same file you will get an error message like this:
    The file \”https://MySite.sharepoint.com/Shared Documents/Document001.docx\” is locked for shared use by JohnDoe@SomeCompany.onmicrosoft.com.
     
    If the file is "Checked out" you will get this:
    The file "[file name]" is checked out or locked for editing by "[username]"
     
    The response flagged as verified answer is correct only if you are looking to find out if a file is "Checked out"

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

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard