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:
Solved! Go to Solution.
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"
}
]
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.
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"
}
]
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.
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?
If you do not want to overwrite the existing tags you can use a variable to load up the existing tags, then append them
Then add the variable into the request body
Sorted
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
5 | |
3 | |
3 | |
2 | |
2 |
User | Count |
---|---|
14 | |
12 | |
8 | |
8 | |
6 |