web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to extract text fr...
Power Automate
Unanswered

How to extract text from comment in DevOps work item using http request?

(1) ShareShare
ReportReport
Posted on by 11

Hi, 

i like to get the the text of newest comment from a work item in DevOps (Feature or User Story).
The text of the comment then will be merged into a html table which is going to be send via email.

 

How do I extract the text from the http request output?

MS Docu:
Comments - Get Comments - REST API (Azure DevOps Work Item Tracking) | Microsoft Docs


My http request:

Screenshot 2022-08-11 at 15.19.56.png


My output of the http request:

 

 

{
 "totalCount": 6,
 "count": 1,
 "comments": [
 {
 "mentions": [
 {
 "artifactId": "XXX",
 "artifactType": "Person",
 "commentId": XXX,
 "targetId": "XXX"
 }
 ],
 "workItemId": XXX,
 "id": XXX,
 "version": 1,
 "text": "<div><a href=\"#\" data-vss-mention=\"version:2.0,XXXXXX\">XXXX</a>TEST TEST TEST</div><div><br> </div>",
 "createdBy": {
 "displayName": "XXX",
 "url": "XXXXX",
 "_links": {
 "avatar": {
 "href": "https://dev.azure.com/XXXX"
 }
 },
 "id": "XXXX",
 "uniqueName": "XXXXX",
 "imageUrl": "https://dev.azure.com/XXXX",
 "descriptor": "XXXX"
 },
 "createdDate": "XXXXX",
 "modifiedBy": {
 "displayName": "XXXXX",
 "url": "XXXXX",
 "_links": {
 "avatar": {
 "href": "https://dev.azure.com/XXXX"
 }
 },
 "id": "XXXX",
 "uniqueName": "XXXXX",
 "imageUrl": "XXXXX",
 "descriptor": "XXXX"
 },
 "modifiedDate": "XXXX",
 "url": "XXX"
 }
 ],
 "nextPage": "XXX",
 "continuationToken": "XXXX"
 }
 

 

 

 

 




Categories:
I have the same question (0)
  • Verified answer
    MarconettiMarco Profile Picture
    3,812 Super User 2024 Season 1 on at
    Re: How to extract text from comment in DevOps work item using http request?

    Hello @DGN_NB ,

    after the http request, you should add the "Parse JSON" action in order to grab the comment. Inside, you should put the http request output body.

     

    If I have answered your question, please mark my post as Solved.
    If you like my response, please give it a Thumbs Up.

    BR,

    Marco

  • rbell32 Profile Picture
    2 on at
    Re: How to extract text from comment in DevOps work item using http request?

    Do you have a copy of the flow? I am trying to copy comments from Devops to a Microsoft lists item 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard