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 an existing com...
Power Automate
Unanswered

Update an existing comment in Azure DevOps

(0) ShareShare
ReportReport
Posted on by 11

Hello,

since there is no selection option in the column option on the part of DevOps, a workaround must be created.

The status of a work item and the last comment of the work item in a HTML table should be sent by email.

To make this possible, the last comment of the work item should be updated so that it appears first in the history.

 

Question:
How do I get the newest comment and update it? (so that the updated comment will be first in "history)

--> If there is a solution to update an existing comment, it will be a suitable workaround for a requested feature in DevOps:
Visual Studio Feedback

 

DGN_NB_0-1660310372054.png

⬇️

DGN_NB_1-1660310463871.png

 

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

    Hi @DGN_NB,

     

    Below is an example of how you can retrieve the newest comment and update it with your own text. I am using this example from the Azure DevOps documentation:

    https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/comments/update?view=azure-devops-rest-7.1&tabs=HTTP#update-a-comment

     

    In the example I am using this expression to get the correct comment id from the first HTTP request:

    body('Send_an_HTTP_request_to_Azure_DevOps')['comments'][0]['id']

     

    updatelastcomment.png

  • DGN_NB Profile Picture
    11 on at

    Thanks you for your answer!
    Yes, your solution works to put the comment first in history (thats great!)
    Maybe I am doing something wrong, but with your solution the comment will be overwritten and replaced by the new text.

    --> Is there a change to 
    a) add a word to an existing comment without deleting the existing text (which will put the comment first in history)

    or

    b) just get an existing comment and force an update on that (so that it appears first in history) 

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 784

#2
Valantis Profile Picture

Valantis 581

#3
Haque Profile Picture

Haque 545

Last 30 days Overall leaderboard