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 / Check if SharePoint do...
Power Automate
Answered

Check if SharePoint document is checked in

(0) ShareShare
ReportReport
Posted on by 10

Hi,

I have an approval flow that a user may trigger from a doc.library.

Is it possible to only make that Flow menu item to start the approval flow visible when the selected item is checked in, and not visible otherwise?

 

Or/and..

How to check if a SP document is checked in in the Flow?

And how to check it in?

Categories:
I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    HI jklevela,

     

    I am sorry but I couldn't understant the first part of your question. For the second one, yes there is a way via HTTP cal to your sharepoint site collection to check if the document is checked out or not:

     

    Make a simple get HTTP call to: 

    https://{base url}.sharepoint.com/sites/{site name}/_api/web/GetFolderByServerRelativePath(decodedurl='/sites/{site name}/{folder name}')/Files

     

    Then will list you all the documents and if you don't know the id or you want to make it more dynamic,  filter directly by name or for eah one, check which one your are interested.

     

    The property "d:CheckOutType " eq to 0 indicates this is checked out. For more information (who, when?)  extend your call (once you have the reference of the file) with:

     

    Web/GetFileByServerRelativePath(decodedurl='decodedurl='/sites/{site name}/{folder name}')/{file name.extension}')/CheckedOutByUser

     

    Hope it helps 🙂

  • Verified answer
    v-bacao-msft Profile Picture
    Microsoft Employee on at

    Hi @jklevela,

     

    Currently there is no direct action in Flow to be able to check in the files in the SharePoint library.

    Please vote for similar idea:

    https://powerusers.microsoft.com/t5/Flow-Ideas/Allow-to-check-in-check-out-and-publish-files-in-a-SharePoint/idi-p/11256

    Here are some users who seem to use Send http request to SharePoint action to implement the check-in file operation, you could use as a reference:

    Please refer to the link below, which mentions how to check in the file in the SharePoint library:

    https://support.office.com/en-us/article/check-out-check-in-or-discard-changes-to-files-in-a-library-7e2c12a9-a874-4393-9511-1378a700f6de

    As to checking if the file has been checked in, you could try to use Send http request to SharePoint action to see if the file has been checked out.

    Use the following Expression to get the CheckoutUserId. If it is empty, the file has been checked in. No one has checked out this file yet.

    body('Send_an_HTTP_request_to_SharePoint')['d']['CheckoutUserId']

    Image reference:

    11.PNG

    Please take a try.

     

    Best Regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Use 'No' container in the case where you are checking if the document is checked in for the example below.

    You could also use 'Yes' container if you change the Condition to validate that 'Checked Out' is false.

    1.PNGCheck in and Check out function 

    Check if SharePoint document is checked in 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 251 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 239

#3
Expiscornovus Profile Picture

Expiscornovus 220 Most Valuable Professional

Last 30 days Overall leaderboard