Automation For Jira - How to configure a rule using smart values in the recipient email address
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
The purpose of this article is to explain how to configure an automation rule that sends an email from a Jira issue to a recipient, whose email address will be a combination of:
the username of the issue reporter
a fixed domain
Problem
When setting up the "Send email" action in an automation rule, Jira recognizes Smart Values within the email recipient field. While nothing will stop you from appending the domain name after the smart value, this addition will not be acknowledged when the action is executed, resulting in an incorrect email address format. As a result, the recipient's email address will not be properly built and the recipient will not receive the email.
An illustration of this problem is as follows:
Solution
The Entity property action can serve as a solution for this particular use-case.e. It sets hidden 'entity' properties on issues, projects, or users related to the trigger issue of the rule execution.
Automation rule configuration
Add a Set entity property action
Entity Type: Issue
Property Key: "usernameEmail" – This can be any name.
Property Value: {{smartvalue}}@domain.com
We create a unique value by merging a smart value and then associating a domain with it.
Add a Send email action
To: The entity property key is utilized as follows:
1
{{issue.properties.usernameEmail}}
Subject
: subject of your choice
Content
: content of your choice
Was this helpful?