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

Notifications

Announcements

Community site session details

Community site session details

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

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,189 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,189 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
    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

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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard