If you want to make any changes in SharePoint from Power Automate, the REST API is one of the best options to use. Sharepoint has its own REST APIs that can be used to create site/items/files/folders, update site/items/files/folders, or make any changes in the site or any update within SharePoint for which a REST endpoint is available. You can use the "Send HTTP Request to SharePoint" action to send REST API calls to perform any operation in SharePoint.
So First we will go through some basic operations as follows:
There is already a built-in action in Power Automate called “Create Item” to create a new list item in the SharePoint list, but creating a new List Item using REST API call from Power Automate gives you more control and flexibility. For example, if you want to update the hyperlink column to have name “Microsoft” with link www.microsoft.com, you cannot do it using Create Item. Instead, you need to use REST API. Create Item will update both the name and URL with the link you provided in the hyperlink column.
Go ahead and add the “Send HTTP Request to SharePoint” action to your flow and configure your action as shown below.
Let us understand the parameters of this action:
"Link": {
"Description": "<Title of the link>",
"Url": "<actual link>"
}
Full Body Parameter value
{
"Title": "value",
"Link": {
"Description": "Microsoft",
"Url": "http://www.microsoft.com"
},
"Notes": "value",
"Decision": "value"
}
There is already a built-in action in Power Automate called “Update Item” to update existing list item in SharePoint list, but updating List Item using REST API call from Power Automate gives you more control and flexibility. For example, an Update Item action requires you to update all the mandatory columns even if you don’t want to update those columns. Using REST API you are required to update only those columns that you need to update. So, add “Send HTTP Request to SharePoint” action to your flow and configure your action as shown below.
body parameter.
Full Body Parameter value
{
"Status":"Approved"
}
That’s it for now folks. Thanks for reading the blog. There are many other REST APIs that I need to document, which I will post on the blog in coming weeks.