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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Update Discussion/Comm...
Power Automate
Answered

Update Discussion/Comment in Azure DevOps Work Item via Adaptive Card

(0) ShareShare
ReportReport
Posted on by 187

Hello I'm quite new Power Automate and I really can't solve how to add a discussion comment in a DevOps Bug . The available columns for updating a work item don't have the "Discussion" column and that's the field I wish to update. I'm using adaptive cards to change both the State and add discussion/comments to it but so far only the State column is available. Any help is appreciated thank you!

Revlock97_0-1655970255555.png

 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,828 Most Valuable Professional on at

    Hi @Revlock97,

     

    As far as you cannot add a comment via the update item action. It does not have any field for this in the settings.

     

    As a workaround you could use the Azure DevOps REST API together with a Send an HTTP request action (Azure DevOps connector). There is Add Comments method available in that API:

    https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/comments/add?view=azure-devops-rest-7.1


    Below is an example of that approach.

     

    Relative URI

    @{variables('Project')}/_apis/wit/workItems/@{outputs('Get_work_item_details')?['body/id']}/comments?api-version=7.1-preview.3

     

    Body

    {
     "text": "Hello World from Power Automate!"
    }

     

    comments_workitems.png

  • Verified answer
    Revlock97 Profile Picture
    187 on at

    Hello @Expiscornovus ,

    Actually I found a way using the Other fields row and inputting "History" in the Key Value. It worked as intended.

    I referenced it from here: https://powerusers.microsoft.com/t5/Building-Flows/Adding-a-comment-to-a-DevOps-Work-Item-using-a-given-user/td-p/370077 

    Revlock97_0-1656033671940.png

     

    Which also lead to this problem: https://powerusers.microsoft.com/t5/General-Power-Automate/User-specific-Comments-in-Azure-work-item/m-p/1638934#M94699 

     

    But thank you so much! I'll also try this work around now 😁

  • Expiscornovus Profile Picture
    33,828 Most Valuable Professional on at

    Hi @Revlock97,

     

    Great, I did not know it was possible via the History field.

     

    I am definitely going to try that as well. Thanks for sharing!

  • ns522101 Profile Picture
    2 on at

    hello @Revlock97 @Expiscornovus can you please advise how you had {/}Output value in the History other field ? I don't think it is an expression. My requirement is to add a comment to a work item when any User Story drop down value is selected as show in screenshot#2. Please advise how to achieve this via PA?

     

    screenshot#1

    Revlock97_0-1656033671940.png

     

    screenshot#2

    Screenshot 2022-07-08 163234.png

  • jwstein Profile Picture
    Microsoft Employee on at

    From the reference linked here: https://powerusers.microsoft.com/t5/Building-Flows/Adding-a-comment-to-a-DevOps-Work-Item-using-a-given-user/m-p/370763#M41600

     

    In the other discussion the author indicated “The trigger is an email arriving, the formatted body is the ‘output’ seen in”

     

    So the Output value was coming from the received email body (assumed) to be formatted as html…

     

    1. I have not tested, but it seems that any string should be valid for a comment

    2. if that string includes basic html wrapped in a paragraph tag it should apply the appropriate rich text formatting: <p>{html formatted text}</p>

    good luck!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 589

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 284 Super User 2026 Season 1

Last 30 days Overall leaderboard