How can we update managed metadata column in SharePoint using REST API in Power Automate?
3 Answers
Before updating, you will first need to get the GUID of required term. A simple request will be like below:
‘__metadata’: {
‘type’: ‘SP.Data.YourListTitleListItem’
},
“TermFieldName”:{
“Label”:”Test Value 1″,
“TermGuid”:”GUID of the Term”,
“WssId”:-1 //which make sure to create an entry in TaxonomyHiddenList if not added.
}
-
-
dude, this WssId = -1 creates a new entry on TaxonomyHiddenList is the real gold here. I don't find this documented anywhere but this works! For my use case we have a list which has a reference column to a managed metadata field, and the REST API requires an entry on TaxonomyHiddenList for the updates/inserts to our list work right. Could not figure out how to add to the hidden list programmatically, but this works! Jun 27, 2022 at 16:15
You have to use Send an HTTP request to SharePoint
with the below API
/_api/web/lists('Libray-List Name')/Items(ItemID)
Ref: Updating a row with METADATA FIELD in Rest API
Also, this guide would help you to understand and work with Automate and Managed Metadata fields
Read more at
-
i tired below test is success but its not updating even in version history it show my name but no updates { "__metadata": {"type": "SP.Data.ControlDocumentsItem"}, "Published": 'Yes', "ApprovalStatus":'Publish', "Title":'@{items('Apply_to_each_2')['Title']}', "Business": { "__metadata": {"type":"SP.Taxonomy.TaxonomyFieldValue"}, "TermGuid":'@{items('Apply_to_each_2')['Business']['TermGuid']}', "Label":'@{items('Apply_to_each_2')['Business']['Label']}', "WssId":'-1' } }– kumarJan 21, 2021 at 11:17
If you have a GUID of managed metadata term then you can use SharePoint REST API to update managed metadata column in SharePoint using Power Automate.
Check below articles for detailed steps: