Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Template
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

How to update SharePoint managed metadata column (Power Automate)

Posted on October 27, 2021October 31, 2021 by Tom

“What if you want to update the SharePoint managed metadata column with Power Automate? I have a Content Type and it has a managed metadata site column.”


The managed metadata SharePoint column is probably the most complicated one to update. You can’t just take the term name and update it. You must use the term id in the update action. An id that has a similar format as the Microsoft 365 group id, but is a bit harder to get. The reason is that you don’t need just the term id, you need id of the term group and term set too. Without them you can’t get the term id that’s necessary for the update.

Get the term group and term set id

Since the managed metadata column forces you to select the source term set, this id collection is a one time task. You need to extract the id’s only once and then reuse them in the flow.

Term group id

For this id collection you can build a separate flow, which you can delete after you get the id’s. Start from the manual trigger, and add the ‘Send an HTTP request to SharePoint’ action. You’ll use it to get the first id, the term group id.

Method: GET

Uri: _api/v2.1/termStore/groups?$filter=name eq '<term group name>'

Note: < … > is a placeholder, replace it including the < and >.

Run the flow and check the run history. In the http action result will be a single term group, including its id.

Power Automate update managed metadata SharePoint

Term set id

Now, when you’ve got the term group id, you can use it to get the term set id. Add another ‘Send an HTTP request to SharePoint’ action in that flow. In this request you’ll extract all term sets within the group.

Method: GET

Uri: _api/v2.1/termStore/groups/<term group id>/sets

Note: < … > is a placeholder, replace it including the < and >.

Again, run the flow. The result of this second http request will be a list of all sets in that group, including their details. Among them their id’s. Search for the desired term set by the name, and take the id.

Power Automate update managed metadata SharePoint

That’s the end of the id gathering flow, it served it’s purpose. Now, when you’ve got the two id’s, you can go back to updating the managed metadata column.

Get the term id

Knowing the id’s allows you to finally search for the last id, the id of the term itself. That means another ‘Send an HTTP request to SharePoint’ action to list all available terms.

Method: GET

Uri: _api/v2.1/termStore/groups/<term group id>/sets/<term set id>/terms

Note: < … > are placeholders, replace them including the < and >.

Since it’ll return all terms, but you want to get only a specific one (the one to update), you should filter it out. Take only the one with the desired name in the ‘labels’ array using the ‘Filter array’ action.

Power Automate update managed metadata SharePoint

For example, let’s extract the term called ‘Term1’. As it’s an array inside the array of all terms, the easiest way is to convert the labels into a string, and search if it contains the term name. Take only the ‘value’ from the http request output, e.g.:

outputs('Send_an_HTTP_request_to_SharePoint_3')?['body']?['value']

… and search for the ‘labels’ converted to string.

string(item()?['labels'])

Note: the action name inside outputs() must correspond to your http request action name.

The result will be a single term, including the term id.

Update the managed metadata column

With the term id, and the term name, you can finally update the column. Use the same HTTP request that was already described multiple times.

Method: POST

Uri: _api/web/lists/GetByTitle('<ListName>')/items(<ItemID>)/validateUpdateListItem

Body:
{
    "formValues":[
	{
	    "FieldName": "<FieldToUpdate>",
	    "FieldValue": "<ValueToUpdate>"
	}
    ]
}

Note: < … > are placeholders, replace them including the < and >.

The part to change is again the ‘FieldValue’. Managed metadata needs the format:

<term name>|<term id>

Following the example for ‘Term1’:

"FieldValue": "Term1|06b10410-338a-4e0c-b93f-5ea690fc22a9"

Take the term name, extract the term id from the filtered term (outputs from ‘Filter array’), and update the item.

body('Filter_array')[0]?['id']
Power Automate update managed metadata SharePoint

Summary

Before you can use Power Automate to update the managed metadata SharePoint column, you must extract quite a few id’s. Firstly, use the term group name to find the term group id. Once you have the group id, you can search for the term set id. As the id’s won’t change unless you change the column, you can just take them and hard-code in a flow. In the flow where the actual update will happen.

Use the group id and set id to extract the terms id, filter out the desired term, and update the field.


🚀 Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

9 thoughts on “How to update SharePoint managed metadata column (Power Automate)”

  1. Ryan says:
    November 30, 2021 at 11:10 pm

    Very helpful, thank you for this writeup! It worked a treat for me.

    Reply
  2. Barry Noble says:
    September 28, 2022 at 4:22 pm

    Very nice. Saved me a ton of time. Thank You!!

    Reply
  3. Matthew Collinge says:
    November 4, 2022 at 2:14 pm

    It took me four hours to not get anywhere with this, then I found this blog post and sorted it in 10 minutes. Thank you so much!!

    Reply
  4. Andre says:
    November 7, 2022 at 6:27 pm

    Hi
    Is there also a option to change the FieldValue without telling the term label and provide just the term id only?

    Reply
    1. Tom says:
      November 13, 2022 at 6:38 pm

      Hello Andre,
      I think that the ID wasn’t enough, but it’s a long time since I tried it for this article…

      Reply
  5. Smitha says:
    June 7, 2023 at 9:26 am

    Hello Tom Riha,
    This worked like a magic. Thanks a ton for this post.

    Reply
  6. Abuzermat says:
    June 8, 2023 at 4:05 am

    Thank you for your excellent post. Is there a way to update with multiple managed metadata values? This works great for one value.

    Reply
    1. Abuzermat says:
      June 8, 2023 at 1:32 pm

      I figured it out. You need to split them using ;#
      example “Term1|06b10410-338a-4e0c-b93f-5ea690fc22a9;#”Term2|96v15610-338a-4e0c-b93f-5ea690fc224d;#”Term3|06b10410-338a-4e0c-b93f-5ea690fc22f5″”

      Reply
      1. UncleDirtnap says:
        July 29, 2023 at 9:26 pm

        No quotes between terms for multiple tags

        “Term1|06b10410-338a-4e0c-b93f-5ea690fc22a9;#Term2|96v15610-338a-4e0c-b93f-5ea690fc224d;#Term3|06b10410-338a-4e0c-b93f-5ea690fc22f5″

        Reply

Leave a Reply Cancel reply

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

🚀 Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Still exchanging emails to get things approved?

Use the Approval Process Template and the Task Delegation App to skip the hard part and deploy an automated, fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundle—everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes