Skip to main content
Community site session details

Community site session details

Session Id : dTK45CSSJLDY58QMgRzxvX
Power Automate - Using Flows
Answered

Adding Tags to DevOps work items

Like (1) ShareShare
ReportReport
Posted on 27 Apr 2020 20:01:06 by 2

I get an error in my workflow when Updating a Azure DevOps work item. I'm trying to add a tag value to the work item and I get the following error message:

Unable to process template language expressions in action 'Update_a_work_item' inputs at line '1' and column '2715': 'Unable to evaluate template language expression '@triggerBody()?['fields']?['System_Tags']' as JSON property name: the expression value of type 'Null' could not be used as property name.'.

 

I'm using the Other Fields and entering Dynamic Content Tags in the key field and text in the value field.

 

The peek Code shows the following for the tag info:

            "userEnteredFields": {
                "@triggerBody()?['fields']?['System_Tags']"
 
If I use the DevOps Create Work Item, I can add a tag just fine. The peek code shows:
            "dynamicFields": {
                "System.State""@body('Update_a_work_item')?
 
As you can see, the add work item is using a different name (dynamicFields) for the tags field and the update is using (userEnteredFields).
 
Is there a fix for this?

 

 

 

  • pm325 Profile Picture
    30 on 06 Feb 2023 at 21:53:43
    Re: Adding Tags to DevOps work items

    Thanks! Does this work for if there are multiple tags?

  • SimonWraight Profile Picture
    5 on 20 May 2022 at 10:47:52
    Re: Adding Tags to DevOps work items

    If you do not want to overwrite the existing tags you can use a variable to load up the existing tags, then append them

    SimonWraight_0-1653043552105.png

    Then add the variable into the request body

    SimonWraight_1-1653043650662.png

    Sorted

  • Community Power Platform Member Profile Picture
    on 02 Apr 2021 at 14:10:05
    Re: Adding Tags to DevOps work items

    Thanks, this worked for me. I noticed though that the new tag wipes out the existing tags in the work item. Is there a way to just add the new tag and not remove the old tags?

  • Verified answer
    v-litu-msft Profile Picture
    on 28 Apr 2020 at 08:14:05
    Re: Adding Tags to DevOps work items

    Hi @BGBrownLA,

     

    The Update work item is not supported update tags in a work item in Power Auto automate.

    But you could use Send an HTTP request to Azure DevOps to do it, there is the API of add tag:

    Method: Patch

    URI: _apis/wit/workitems/{ID}?api-version=5.1

    Header: Content-Type: application/json-patch+json

    Body:

    [
     {
     "op": "add",
     "path": "/fields/System.Tags",
     "value": "Tag1; Tag2"
     }
    ]

    Annotation 2020-04-28 160634.png

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Featured topics

Restore a deleted flow