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 Check Out a Fil...
Power Automate
Suggested Answer

How to Check Out a File in a SharePoint Library Using Power Automate

(0) ShareShare
ReportReport
Posted on by 10
Hello Everyone,
 
I have a file in a SharePoint library that I want to Check Out automatically using Power Automate. I understand the Check out file action requires an integer, and I have the full path and relative paths for the file. But I continue to receive multiple errors for every method I've used (i.e., 404 for HTTP, file not found using queries, etc.) yet I can read files in other subfolders (just not check them out).
 
My question is which is the best way to get the SharePoint file ID from the full or relative path to present to the Check out file action?
 
Please help, I'm stumped.
 
Thank you,
 
Len
Categories:
I have the same question (0)
  • Suggested answer
    Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at
     
    You don't need an ID to use this checkout method. You can also use the file relative path value in a getfilebyserverrelativeurl method.

    Below is an example
    My relative site url is /sites/PowerUsers, make sure you replace that by your relative site url. 
     
    _api/web/getfilebyserverrelativeurl( /sites/PowerUsers/@{variables('LibraryUrl')}/Testdocument.docx')/checkout
     
     
    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, Bluesky profile or Youtube Channel
  • LL-21030320-0 Profile Picture
    10 on at
    Hello Expiscornovus,
     
    Thank you for your reply. I have multiple files in an array that I'm attempting to check out. Would I apply your solution inside of an Apply to each action?
     
    Thanks,
     
    Len
  • LL-21030320-0 Profile Picture
    10 on at
    Hello Expiscornovus,
     
    What does the variable do in your response?
     
    Len
  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at
     
    That variable action is used to store the name of the library as a string. It is not needed in your setup and you can replace it by your library name.

    And in your use case you would loop through the item of your array inside an apply to each loop.


     
    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, Bluesky profile or Youtube Channel
  • LL-21030320-0 Profile Picture
    10 on at
    Hello Expiscornovus,
     
    My original VBA text file list is generating "https://MySite.sharepoint.com/sites/MySite/Shared Documents/MyFolder/MyFolder1/MyFolder2/MyFolder3/MyFolder4/MyFolder5/MyFile.ext" Do I need to reconstruct this path to present it to the HTTP/Check Out action?
     
    If so, when parsing the path to send to the HTTP/Check Out action, do I need to use relative path? Also, when parsing or reconstructing the path, should I use "MySite/Documents/" "MySite/Shared Documents/" or "MySite/Shared%20Documents/"?
     
    I'm having a really hard time with this. I just can't seem to get it to operate correctly.
     
    Thank you for all your help this far.
     
    Len

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

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard