SharePoint is a powerful collaboration tool that allows teams to share and manage content seamlessly. However, automating repetitive tasks can enhance productivity even further. One such task is checking out documents.

This blog will guide you through automating the document checkout process in SharePoint using Power Automate and a “Send HTTP Request to SharePoint” action.

Step 1: Create a New Flow in Power Automate
Navigate to Power Automate and create a new instant cloud flow with a manual trigger.

Step 2: Create two Compose actions to hold your site address and server-relative URL of the document you want to checkout.

Step 3: Initialize the Checkout Process
Add a new “Send an HTTP request to SharePoint” action
Configure the action with the following details:

Site Address: Output from Compose action

Method: POST

Uri: _api/web/GetFileByServerRelativeUrl('Output from Second Compose Action')/CheckOut

Headers: 
{
  "Accept": "application/json;odata=verbose",
  "Content-Type": "application/json;odata=verbose"
}

View the below flow to see how your flow should look:

Step 4: Final Steps and Testing
Save the flow and test it by uploading or modifying a file in the specified SharePoint folder. Check the document in SharePoint to confirm it is checked out.

Leave a Reply

Your email address will not be published. Required fields are marked *