Script Runner - Send Attachment for Slack

Gabriel Tessarini June 3, 2019

A script to add on Jira Script Runner "Script Listener" with method "Issue Updated" to send automatically a message on Slack when a attachment is add on task to user with identifier on task label

I hope help you all as helped me and my team! :)

Check on:



Log in or Sign up to comment
ecor_clima October 3, 2019

is this solution for cloud or server?

Like Gabriel Tessarini likes this
Gabriel Tessarini October 3, 2019

Hi ecor, thanks for the interest! This solution was Implemented for Jira Cloud, but if your server is able to connect with the Slack Api by network, it will works correctly

Vanessa Sousa October 3, 2019

Hi Gabriel, do you know if it's possible to send a notification to a user on slack based on a JQL?


I want to alert all the assignees of the issues that are with SLA brenched.

Like Gabriel Tessarini likes this
James_McManamey October 3, 2019

Hi @Vanessa Sousa interesting use case!

Sadly  I can't help on the Script Runner side. However, in case you aren't able to get the experience you are after with Script Runner the product that I work on ( solves exactly the type of problem you are asking about. 

Our scheduled messages let you run recurring messages based on JQL filters. In your case, stratejos would: 

  • Check every morning (or every hour) for issues outside of SLA
  • If matching issues are found ping a channel (or DM the assignees of those issues) 
  • Recipients would have the option to view the issue or update status directly from Slack 

Feel free to send me an email at if you would like to get set up with a trail. 


Like # people like this
Gabriel Tessarini October 3, 2019

Hi Vanessa! That's a good question. JQL is a search based language, like a SQL for Jira, so it's unable to do other methods that are not related specifically with query's, but in Script Listener with the Groovy language, you can use programmable methods of the language as the same way you can input JQL querys on Groovy methods that will run they for you and then filtering this SLA parameters and selecting the required users as you need. At this post link, I have developed many others scripts that send Slack messages that can help yoi. For your case, you can use this script on Script Console, to use always you want, or use on Scheduled Job to run this methods periodically.

ecor_clima October 4, 2019

Hello James


I'm having some problems connecting with Stratejos.

Can you help me? 

James_McManamey October 4, 2019

Hi @ecor_clima  would be happy to :)

If you send me an email I can walk you through getting set up with a scheduled message in stratejos. 


AUG Leaders

Atlassian Community Events