Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira Automation mail recipients based on user who triggered event

Semen Smirnov November 15, 2021

Hi,

I actively use custom emails with Jira Cloud Automation (action "Send email"), since this is the only way I know of flexibly formatting a mail with its own formatting, using smart values.

Typical case is send email to the group of people of my company when a certain action is performed by one of this group. So, if I one of these who triggered event, then custom mail should be sent to other people in group. And if this is not me, then i should get custom mail along others but the person who triggered event

But how can I dynamically set a mailing list so as not to send a mail to the author of the event? 

Basic Jira notifications can take this into account (not send notifications to the author), but I am interested in custom mails in Jira Automation 

jira automations recipients.png

3 answers

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 15, 2021

Hi @Semen Smirnov 

Yes, and...to what the others have suggested: {{initiator}} is the person/entity who triggered the rule.  You note wanting to send email to all the people in several groups except not to the initiator

With built-in features, one way to to do that is to get all the users in the group from a REST API using a web request, expand all of the email addresses from the groups in to a created variable, remove the initiator's email address using text and list functions, and then parse the variable to send the email to remainder.

That may be way too much complexity just to prevent the one email.

Kind regards,
Bill

Semen Smirnov November 15, 2021

What if there will be not groups, but Jira users

will it change anything?

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 15, 2021

Yes, as you would not need the groups handling with the REST API.

Instead remove the relevant user to create the list, either with if/else structure (for just a few users) or build up the list and then remove it using string functions.

How many potential users are getting the email, from which you want to remove one?

0 votes
Martin Bayer _MoroSystems_ s_r_o__
Community Champion
November 15, 2021

Hi @Semen Smirnov I don't think you can do it with automation. It could be doable if Automation Smart values supports user groups.

Did you try to check some advanced notification apps like https://marketplace.atlassian.com/apps/4977/email-this-issue?tab=overview&hosting=cloud?

0 votes
Sebastian Krzewiński
Community Champion
November 15, 2021

Hi @Semen Smirnov 

 

You should have "Initiator" option in "To" field.

 

Regards,

Seba

Semen Smirnov November 15, 2021

Initiator should not get an email from his own actions

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events