I'm trying to come up with a method for delivering notification emails to new users prior to their creation as users in Jira. These users do have functional email addresses. Using automation, I have a Send Email action configured with smart values in the recipient field. This does not seem to be working and I'm curious if smart values can be used here. If not, how could an email address be constructed out of values in multiple custom fields?
Hi @Matt S
Give this new feature a try that allows you to create variables. Link: https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Create-variable-New-component/ba-p/1448118
You can create a variable that constructs the email and use it in your send email action.
Let us know if this works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Fabian Lim
That action would definitely solve this problem, but unfortunately we're using Jira Server and it only appears available on Cloud.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Matt S
I'm curious as to why you wouldn't add them as users straight away?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Liam Green
We use Devinti Active Directory Attributes Sync to pull new users from AD, but the sync only runs once per day. I'm going to attempt running the notification automation on a schedule to see if waiting until this sync occurs will fix the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Matt S
That makes sense.
If you want to, you could store the email address you need in a custom field and put the email address as {{issue.customfield.FIELDNAME}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was struggling with this today also, and @Liam Green's solution worked for me. However, I was able to improve upon it. More below.
Note that an assumption here is that you need a "current issue" in the rule to work with. In my case, this was a manually triggered rule.
We're using Jira Data Center, and I wanted to put "{{initiator}}@ourCorp.com" into the "To" field of the "Send email" action. Just doing that didn't work.
Initially, no email seemed to be sent. As a test, I added a second, hardcoded email address in the "To" field. Then an email did get sent and I could see the Smart Value as an intended recipient (which of course failed to send during email processing):
A workaround (as Liam outlined) is instead to:
When configuring the "Send email" action, Jira automation seems to recognize a stand-alone Smart Value (which is shown in a different color) from a plain email address (even if that includes a Smart Value, as my first attempt did). Probably just some lazy matching failing to find the }} at the end, and then assuming it's a real email.
ALTERNATIVES:
In Jira Cloud, use a Variable in the rule instead of all this goofing around.
In Jira Server and Data Center, an Entity Property can often be used instead of a Variable. I refactored my solution above, and was able to eliminate the Re-fetch action and avoid injecting noise into the fields of the issue itself:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.