In this page

Sending a notification email about a new changeset

This automation sends a notification email about the changeset after that has been accepted by the repository:

The email recipients, subject, content and other details can be freely customized. Note that you can also use this approach to integrate external services that accept email as "incoming message" format to your DevOps pipelines.


  1. Login to Jira as admin, go to AdministrationSystemAutomation rules.
  2. Click Create rule.
  3. Select the trigger Changeset accepted (from the DevOps category).
  4. Click Save.
  5. Click Add component and select New condition.
  6. Select the condition Advanced compare condition.
    1. Enter {{devops.changeset.commits.size}} to the First value field.
    2. Choose the does not equal option from the Condition dropdown.
    3. Enter "0" to the Second value field.
  7. Click Save.
  8. Click New action.
  9. Select the action Send email.
    1. Choose a recipient group or enter the addresses manually.
    2. Enter the following subject:
      [DEVOPS] {{devops.changeset.commits.size}} new commit{{#devops.changeset.commits}}{{^first}}{{#last}}s{{/}}{{/}}{{/}}{{^devops.changeset.commits}}s{{/}} in {{devops.changeset.repositoryId.htmlEncode}}
    3. Enter the following content (a very simple template you can easily customize to your needs):
      		<b>{{issues.size}} issue{{#issues}}{{^first}}{{#last}}s{{/}}{{/}}{{/}}</b> linked:
      		No issues linked.
      		<li><a href="{{url}}">{{key}}</a> {{summary.htmlEncode}}</li>
      	<p>Commit: <b>#{{id}}</b> &middot; Branch: <b>{{branch.htmlEncode}}</b> &middot; Author: <b>{{userName.htmlEncode}}</b></p>
      	<blockquote style="background:#f0f0f0; padding:0.2em">{{message.htmlEncode.replace("&#10;","<br>")}}</blockquote>
      	<p><b>{{files.size}} file{{#files}}{{^first}}{{#last}}s{{/}}{{/}}{{/}}{{^files}}s{{/}}</b> changed:</p>
      			<li><b><code style="color:{{action.color}}">{{action.label}}</code></b> {{path.htmlEncode}}</li>
      • Those smart values that can contain HTML-unsafe characters should be HTML-encoded with .htmlEncode.
      • Those smart values that can contain multi-line strings should be transformed with .replace("&#10;","<br>").
    4. Click More options.
    5. Choose HTML as format.
    6. Uncheck the Convert line breaks to HTML line breaks checkbox.
  10. Click Save.
  11. Name your automation rule intuitively, and click Turn it on.


  1. Create a commit in your repository with this message:
    Implement the FOO-1 feature.
  2. Then another with this:
    Fix the FOO-2 and FOO-3 bugs.
  3. An email will be sent to the selected recipients with the linked issue list and the commit details.


If you don't get the expected results:

  1. See the general troubleshooting steps.


Ask us any time.