Skip to content

Send email when a work item is closed in Azure DevOps

  • Azure DevOps
  • Automation
  • Notifications
  • Email
  • State
Send email when a work item is closed flow overview
Overview of the automation flow for sending an email when a work item is closed.

When State changes to Completed (Closed or Done), send an email in Azure DevOps.

You'll need to specify the email recipients before enabling this automation. This ensures that the right people are notified whenever a work item reaches completion.

Prerequisite: Install Automations App on your Azure DevOps organization

Create an automation from the Send email when a work item is closed template, or start from scratch
Go to Project → Automations → Create automation from template Send email when a work item is closed or Start from scratch.
Trigger

Trigger — Work Item Update

This trigger activates when a work item's field changes. It specifically monitors changes in the State field, which is crucial for detecting when a work item is marked as Completed.

Configured in this template

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

You can customize

  • Limit to specific work item types if needed.
  • Add more fields to monitor if required.
Send email when a work item is closed trigger
Trigger setup for monitoring work item state changes.
Condition

Condition — Work item fields

This condition checks if the work item's State field is set to a category indicating completion, such as Closed or Done. It ensures that the email is only sent when the work item is truly finished.

Configured in this template

  • Check: This work item
  • Require: All of Items
  • Field conditions: State = state category Completed (Closed, Done, …)
  • Match logic: All conditions must match (AND)
  • Related work item conditions: (none)

You can customize

  • Adjust the State category to match your team's workflow.
  • Add additional conditions if necessary.
Send email when a work item is closed condition 1
Condition setup to check for work item completion.
Action

Action — Send customized email

This action sends an HTML email via the platform's mailer. The email includes a link to the closed work item, notifying the specified recipients of its completion.

Configured in this template

  • To: (empty — add recipients)
  • From: notifications@documentero.com
  • Subject: `Closed: {trigger.Title}`
  • Body (HTML): `<p>Work item <a href="{trigger.Url}">#{trigger.Id} {trigger.Title}</a> was closed.</p>`

You can customize

  • Add recipients to the 'To' field to ensure notifications are sent.
  • Modify the email body to include additional information if needed.
  • Change the subject line to better fit your team's communication style.
Send email when a work item is closed action 1
Action setup for sending a customized email notification.

Full automation

Send email when a work item is closed full automation
Complete view of the automation flow for sending an email when a work item is closed.

Common questions

How do I send email when a work item is closed in Azure DevOps?
When State changes to Completed (Closed or Done), send an email in Azure DevOps. Use the Send email when a work item is closed 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 recipients in the 'To' field of the Send customized email action.
Can I change the work item types this automation applies to?
Yes, you can customize the trigger to limit it to specific work item types.
How can I test this automation?
You can test the automation by closing a work item and checking if the email is sent to the specified recipients.

Visual Studio Marketplace

Automations

Documentero · Preview

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

Get it free