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

Need a working listener that sends email

Alexey Paveliev
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.
June 8, 2020

I tried multiple examples of code that sends an email from a listener and they all fail at import lines.

Anyone has a working cloud script listener that does that?

a basic Issue Updated event and dumbest condition will work for starters.

Jira Service Desk specifics (if any) is appreciated 

Thanks!

1 answer

1 accepted

0 votes
Answer accepted
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 10, 2020

Hi Alexy,

Thank you for your question.

I can confirm that the only Rest API which Atlassian provide inside of Jira Cloud to send an email is the Notify API which is documented here and this is the API that you will need to use to send a notification with ScriptRunner for Jira Cloud.

I can confirm we have an example in the documentation page located here of a script listener which sends a notification when the priority is changed and you will be able to use this as a reference guide to help create the script that you require to send a notification. 

Please also note that when testing that Atlassian has placed a validation rule on this API which means that you cannot notify yourself from this API.

I hope this information helps.

Regards,

Kristian

Alexey Paveliev
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.
June 10, 2020

I struggled to have that snippet work because of (1) styled notes in code. Please escape them with // 

Otherwise I got it to work! 

What a relief! Thank you

I don't receive notifications even though I run scripts on behalf of scriptrunner

Suggest an answer

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

Atlassian Community Events