Skip to content

Add comment after status change in Azure DevOps

  • Azure DevOps
  • Automation
  • Work Items
  • Comment
Add comment after status change flow overview
Flow overview showing the trigger and action for adding a comment after a state change.

When State changes, add a comment naming who changed it and the new state in Azure DevOps.

This guide will walk you through setting up the automation using a template from the Automations gallery. You'll need to specify the comment text before enabling the automation.

Prerequisite: Install Automations App on your Azure DevOps organization

Create an automation from the Add comment after status change template, or start from scratch
Go to Project → Automations → Create automation from template Add comment after status change or Start from scratch.
Trigger

Trigger — Work Item Update

This trigger activates when a work item's state changes. It does not react to changes in links or comments, focusing solely on field updates.

Configured in this template

  • Work item types: all (no filter)
  • Changed fields (optional filter): State

You can customize

  • Filter by specific work item types if needed.
  • Add more fields to monitor besides State.
  • Exclude certain states from triggering the automation.
Add comment after status change trigger
Trigger setup for monitoring state changes in work items.
Action

Action — Add Comment

This action adds a Markdown comment to the work item that triggered the automation. The comment includes the new state and the user who made the change.

Configured in this template

  • Work on: This work item
  • Comment text: `State changed to {trigger.State} by {trigger.ChangedBy}.`

You can customize

  • Modify the comment text to include additional information.
  • Change the format of the comment to suit project needs.
  • Add conditions to limit when comments are added.
Add comment after status change action 1
Action setup for adding a comment with state change details.

Full automation

Add comment after status change full automation
Complete view of the automation flow from trigger to action.

Common questions

How do I add comment after status change in Azure DevOps?
When State changes, add a comment naming who changed it and the new state in Azure DevOps. Use the Add comment after status change template in Documentero Automations: open Templates, pick this flow, fill the required fields, and enable it.
What fields are required to enable this automation?
You must specify the comment text before enabling the automation.
Can I change the work item types this automation applies to?
Yes, you can filter the trigger to apply only to specific work item types.
How can I test this automation?
Test by changing the state of a work item in Azure DevOps to see if the comment is added.
Is it possible to schedule when this automation runs?
This automation runs in real-time when the specified state change occurs, and cannot be scheduled.

Visual Studio Marketplace

Automations

Documentero · Preview

Automate Azure DevOps workflows with triggers, actions, conditions, and scheduled rules.

Get it free