Power automate sharepoint リスト 更新

⭐ PARTNER OF THE BLOG

Microsoft 365 atWork partners with AFI.AI, the developer of modern data protection platform built from the ground up to deliver a fully-fidelity backup for MICROSOFT 365 and GOOGLE WORKSPACE.

Power Automate allows updating SharePoint list items, SharePoint libraries and Microsoft List.

Use Quick Tips and learn how to update SharePoint items.

Power Automate gives you the possibility to implement integration with SharePoint Online list and libraries. Because of that, you are also able to easily integrate with Microsoft Lists.  There are a lot of native integration that you can setup in 2-3 clicks, but if you would like to build an automated process that will update the SharePoint element on the list or document properties in the  SharePoint document library there are few ways you can do it.

The ability to update records saved in SharePoint Online using Power Automate is important from the perspective of business processes you would like to automate using flows. Based on other activities, approvals or actions in Power Apps you would like to update a field in SharePoint. For instance Step or Status of the process.

Another business scenario is to update multiple fields in record or document properties during the process.

In this article you will learn how to use SharePoint flow actions:

  • SharePoint Update item
  • SharePoint Send an HTTP request to SharePoint
  • SharePoint update file properties

Power automate sharepoint リスト 更新

Update SharePoint Online list item using action: Update item

SharePoint action Update Item allows you to update an existing element on SharePoint list or on Microsoft List.

Power automate sharepoint リスト 更新

To update SharePoint list item you need to set:

  • Site address - address of the SharePoint site e.g. https://company.sharepoint.com/sites/myteamsite. It is good to store such addresses in Variables.
  • List Name - the name of the list. Using Variable for it is also recommended
  • ID - Identifier of the list item. In this case, most likely this will be Dynamic content from the trigger of the flow.

When you will set up a connection to the SharePoint element all available fields will be loaded. You can set them using Dynamic content elements or manually implemented values.

Important elements to remember during using Update item SharePoint action in Power Automate:

  • You need to set all required fields
  • You need to set all choose fields
  • Fields that you will not touch in the action (except listed above) will not be updated.

Power automate sharepoint リスト 更新

Update Item action in Power Automate works very well, but sometimes could be not very handful. Especially when you have multiple required or choice fields. If you would like to update only one SharePoint field "HTTP request to SharePoint" will work much better.

Power automate sharepoint リスト 更新

Update only 1 SharePoint list property using action: Send an HTTP request to SharePoint

SharePoint action Send an HTTP request to SharePoint allows executing multiple operations on SharePoint components using HTTP request. One of the most useful operations is updating a specific field in the existing element on SharePoint list or on Microsoft List.

Power automate sharepoint リスト 更新

👉 To be fair using this action is not much low-code approach, but is not a very complex process and it works like a charm!

To Send an HTTP request to SharePoint that will update SharePoint Online list item you need to set:

  • Site address - address of the SharePoint site e.g. https://company.sharepoint.com/sites/myteamsite. It is good to store such addresses in Variables.
  • Method - type of operation that will do the update - POST
  • Uri - API element which you would like to execute - _api/web/lists/GetByTitle('LISTNAME')/items(ID)
  • Headers -  additional information required in the request. In our case we will use:
    • IF-MATCH 
      • *
    • X-HTTP-Method
      • MERGE
    • Content-Type
      • application/json;odata=verbose
  • Body - the body of the HTTP request - {'__metadata': { 'type': 'SP.Data.LISTNAMEListItem' }, 'FIELDNAME': 'VALUE'}
    • In the body, you can set multiple fields. Proper format is: 'Fieldname1': 'Value1', 'Fieldname2': 'Value2'

👉 You need to change highlighted elements to fit to your SharePoint list.

Example of the HTTP request sent to TeamSite site to update Issues list element with unique identifier equal ID. Action updating field Status to Closed value.

Power automate sharepoint リスト 更新

The HTTP request is a little more complex approach than the Update item action but works very well and can update only 1 field on the SharePoint Online list.

Update SharePoint Online library document using action: Update file properties

SharePoint action Update file properties allows you to update existing document metadata on the SharePoint document library.

Power automate sharepoint リスト 更新
To update SharePoint list item you need to set:

  • Site address - address of the SharePoint site e.g. https://company.sharepoint.com/sites/myteamsite. It is good to store such addresses in Variables.
  • LibraryName - the name of the document library. Using Variable for it is also recommended
  • ID - Identifier of the list item. In this case, most likely this will be Dynamic content from the trigger of the flow.

When you will set up a connection to the SharePoint element all available fields will be loaded. You can set them using Dynamic content elements or manually implemented values.

Important elements to remember during using Update file properties SharePoint action in Power Automate:

  • You need to set all required fields
  • You need to set all choose fields
  • Fields that you will not touch in the action (except listed above) will not be updated.

Power automate sharepoint リスト 更新

Update file properties action in Power Automate works very well, but sometimes could be not very handful. Especially when you have multiple required or choice fields. If you would like to update only one SharePoint field "HTTP request to SharePoint" will work better.

Update only 1 SharePoint library document property using action: Send an HTTP request to SharePoint

SharePoint action Send an HTTP request to SharePoint allows using SharePoint API through  HTTP requests. You can update a specific property in the existing file on SharePoint document library.

Power automate sharepoint リスト 更新

👉 To be fair using this action is not much low-code approach, but is not a very complex process and it works like a charm!

To Send an HTTP request to SharePoint that will update SharePoint Online library file you need to set:

  • Site address - address of the SharePoint site e.g. https://company.sharepoint.com/sites/myteamsite. It is good to store such addresses in Variables.
  • Method - type of operation that will do the update - POST
  • Uri - API element which you would like to execute - _api/web/lists/GetByTitle('LIBRARYNAME')/items(ID)
  • Headers -  additional information required in the request. In our case we will use:
    • IF-MATCH 
      • *
    • X-HTTP-Method
      • MERGE
    • Content-Type
      • application/json;odata=verbose
  • Body - the body of the HTTP request - {'__metadata': { 'type': 'SP.Data.LIBRARYNAMEItem' }, 'PROPERTYNAME': 'VALUE'}
    • In the body, you can set multiple fields. Proper format is: 'Fieldname1': 'Value1', 'Fieldname2': 'Value2'

👉 You need to change highlighted elements to fit to your SharePoint list.

Example of the HTTP request sent to TeamSite site to update Documents library file with unique identifier equal ID. Action updating field Status to During review value.

Power automate sharepoint リスト 更新

The HTTP request is a little more complex approach than the Update file property action but works very well and can update only 1 property on the SharePoint Online library.

What's next?

Well done! You did learn how to use Power Automate to updates items on SharePoint Online. Don't stop in here and get a better understanding of Power Platform. Learn how to import data from Excel to SharePoint list, how to get filtered records from SharePoint or how to start with Power Apps.

Do you want to learn more?

I prepared more articles that could help you get a better understanding of Power Automate, Power Apps, Microsoft Lists and SharePoint Online.

Conclusion

Power Automate allows you to quickly update SharePoint list item or SharePoint library document property using available flow actions.

Power automate sharepoint リスト 更新