Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Send email to incident responders

mb January 30, 2024

Hi everyone,

Is it possible to send emails via automation to incident responders, e.g. when adding a service?

There's no such option in the "Send email" action, but I could imagine that it's possible to get the list of responders via api (webhook), save them to custom variables or similar and then send an email to them.

It would save me a lot of "if … else" conditions and having to manage separate groups, just for email notifications regarding affected service queues.

Is there anybody who has achieved sending emails to responders via automation that might want to share their automation rule?

Thank you and Best Regards

3 answers

0 votes
José Nogueira September 8, 2024

.

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.
January 30, 2024

Hi @mb 

First thing: I am not using JSM and so my suggestions are based on what I know about rules, in general.  With that out of the way...

I suspect the Responders field / information is a list of users / objects.  In that case it can be iterated directly, if it is available to a rule.

So first try writing the Responders directly to the audit log to see what is returned. 

If that works, try writing a specific item's contents to the log...or call the REST API for an incident to determine what responder attributes are available.  This will determine if there is an emailAddress smart value available for use to the rule.

 

If instead the Responders are not a list, but instead either an array or delimited text, writing the value to the audit will identify what to use in a regular expression with the match() function to get the list of fields you want.

 

Kind regards,
Bill

0 votes
mb January 30, 2024

So I worked on an automation and I used branching for some tests. I get the value of the custom field "responders" via log action and it returns me to following, which could be used to send the mail somehow:

Responders value is: {ari=ari:cloud:identity::user/<PROFILEID>, name=<PUBLICUSERNAME>, type=user, avatarUrl=https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/M-4.png}

So if I can somehow parse the "user/<PROFILEID>," by splitting the start by "/" and the end by ",", I would get the userid.

Then I could just mention the users in a comment by using "[~accountId:<PROFILEID>]"

José Nogueira September 8, 2024

Hi @mb 

If I understand correctly, you have a custom field on which you want to split its content.

Based on the above and per my personal conclusion, it appears that split, replace, left, ... functions do not work for custom fields. One has to use a smart value variable in between.

+ info/sample: https://community.atlassian.com/t5/Jira-questions/Re-Split-function-not-working-in-Jira-automation-for-a-c/qaq-p/2806242/comment-id/1049871#M1049871 

May I also share thiis source that I guess might help in your specific task
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#left-int-length- 

 

Hope this helps

 

Cheers

Suggest an answer

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

Atlassian Community Events