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, or update site/items/files/folders, or to make any changes in the site or any update within SharePoint for which a Rest endpoint is available. So, you will 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:
- Create List Item
- Update List Item
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, then you wont be able to do it using Create Item, you will need to use REST API. Create Item will update both the name and URL with the link you provided in the hyperlink column.
So, add the Send HTTP Request to SharePoint action to your flow and configure your action as below:
Let us understand the parameters of this action:
- Site Address: Provide the Site URL where your list resides.
- Method: POST (as we want to make changes in SharePoint)
- URI: _api/lists/getbytitle(Documents)/items/ (here in place of documents, put your List Title)
- Headers:
- content-type: application/json;odata=nometadata
- accept: application/json;odata= nometadata
- Body:
- Here is the main part, the values you need to set for the columns to create the list will go here, so in my example, I am setting four-column values: Title, Link, Notes, and Decision
- Title: This is a single line of text column so it will be a simple text value
- Link: This is a Hyperlink type of column, so you need to provide the value in the following format: