Direct Message notifications slack

grumpasaurus May 17, 2016

So far all the add-ons that I've found only support notifications sent to a pre-set channel in Slack.  

Is there any plugin where, in lieu of an email, send a direct message as a pre-set User/Bot directly to someone?  This would be useful when doing @ mentions directly at people.

9 answers

1 accepted

6 votes
Answer accepted
Trevor Thompson
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 20, 2020

Hey all, this functionality is released and rolled out to 100% of Jira Cloud for Slack users. To achieve this, simply type /jira notify anywhere in Slack if the app is installed. With this functionality users can receive direct messages from the Jira app in Slack for issues they are watching, they are the reporter on, the assignee on, or when you are individually mentioned. 

image.pngIf you have any feedback please let us know with /jira feedback ! Thanks !

Thomas Rohrer May 26, 2020

Is this also on roadmap for Jira server?

Like # people like this
6 votes
Mike Solomon March 22, 2018

We ended up writing a custom integration for our Slack workspace
https://medium.com/group-nine-media-product-team/slack-notifications-for-jira-comments-1d57879bc149

Jennifer King March 28, 2018

Is it available to everyone?

Mike Solomon March 28, 2018

@Jennifer King unfortunately, it's only available in our workspace but the code is open source: https://github.com/msolomonTMG/jira-comment-slack-notification

 

Edit: I've since added steps to the link above so that anyone can install this for their Slack workspace & Jira instance

Like Monyette likes this
Junior Sartori May 31, 2018

@Mike Solomon 

First of all, I'd just like to congratulate you on creating the resource, that's exactly what I needed.

I followed the setup tutorial, but when I got to step 5, I had a problem.

When I try to insert the URL in the "Event Subscriptions" of my app in slack, the following error is generated: "Your URL did not respond with the value of the challenge parameter.", Not allowing me to finish the configuration and use the bot . Can you tell me how to solve this?

Mike Solomon June 1, 2018

@Junior Sartori thanks for the congrats. I just went through my own setup steps (which admittedly were rushed and I'm sorry about that). I discovered that I missed a few crucial parts. The steps have been updated. I recommend starting over if you can but if you wanna know what's been changed, this is what has been added:

Steps for setting up a Jira webhook (the new step 5)

Steps for setting up Incoming Authentication in the Jira Application link (the end of Step 4)

Adding APP_URL as an environment variable in the heroku app (the first environment variable in step 3)

Junior Sartori June 3, 2018

@Mike Solomon thanks for the tutorial update.

I followed step by step, I was able to finalize the settings and leave the bot online in the slack.

I had problems in deploy by heroku, when access to the main URL of the application is returned error 500. I will analyze the settings in heroku to identify what is happening.

Once again, thank you very much for your attention.

Victor Vucicevich January 4, 2019

@Junior Sartori did you figure it out?

Hanna Haddad September 11, 2019

@Mike Solomon thanks for the tutorial!

 

I went through it and the setup looks okay and I can see the logs of the comment events coming through however I am not receiving them in slack? any idea what might be the problem? 

Hanna Haddad September 11, 2019

@Mike Solomon I was looking at the script, and maybe JIRA has changed the payload format, but instead of the actual username the field is something like the following...which off course doesn't match the string username in mongodb and therefore i am not receiving the notifications. 

body: '[~accountid:5af998f12083b15a0bd3d4e7] ...
Hanna Haddad September 12, 2019

if anyone experiencing the same, i've made the change on a fork here https://github.com/1valet/jira-comment-slack-notification 

Like Peter Kakoma likes this
Mike Solomon September 12, 2019

Sorry for being MIA. @Hanna Haddad I think you hit the nail on the head. Looks like Jira changes the text pattern for user mentions. This would explain why the integration no longer works.

Looks like the fork you are working on has some awesome updates. I'd accept a PR into the original repo if made!

Peter Kakoma October 3, 2019

Thanks a lot @Hanna Haddad . How does one deploy these changes especially for someone who already had the initial set-up running? Any thoughts? 

Hanna Haddad October 4, 2019

Peter Kakoma you can probably from heroku switch the repo and trigger a redeployment

Peter Kakoma October 4, 2019

Thanks @Hanna Haddad . That should do it!

Danison Rarama April 22, 2020

@Hanna Haddad @Peter Kakoma 

Curious if you guys still have working. My Heroku logs shows that Jira info are trigger but no slack DM. 

I still get internal error when I try to auth with JIRA

Like # people like this
hirurkar_supriya July 23, 2020

I need the ability to comment on JIRA Issue from within Slack with @mentions.

I tried to setup everything per your steps, but getting issues in my last step :

Screen Shot 2020-07-23 at 4.41.05 PM.pngDo you think you will be able to help?

Mike Solomon July 23, 2020

@hirurkar_supriya I would recommend not using my solution now that Atlassian and Slack have native integrations that has the ability to add comments. As far as @mentions, I don't believe the native solution has that capability yet and the solution I provided most likely will not work anymore since Atlassian changed the way users are mentioned in comments since this was posted.

Nick Cron July 23, 2020

@hirurkar_supriya If you have Jira cloud the native mention feature should work for you.  They have handled the GDPR updates for the random user IDs that are now sent. 

We also support this feature with Jira Integration+ for all types of Jira instances. 

If you happen to run Jira Server or Data Center or are looking for other features as well please feel free to try our app with our free 14-day trial.  You can add our app here - https://www.nextup.ai/slack-jira-integration/

4 votes
Haris Vugdalic June 29, 2018

It's a bit tedious but I was able to achieve this with Automation for JIRA. 

You basically have to create a separate automation rule for each person you wish this to work for or use an If/else block for multiple users. Since our use-case was for our product team which consisted of 6 people it was worth it.

  1. First define your trigger as Issue Commented
  2. Then select condition: Compare condition
  3. Screen Shot 2018-06-29 at 3.10.34 PM.png
  4. Your first value will be {{issue.comments.last.body}} - the body content of the last comment.
  5. Condition: Contains
  6. Second Value - firstName.lastName (follow this format)
  7. Then set your action to Send Slack message.
  8. Screen Shot 2018-06-29 at 3.10.41 PM.png
  9. You can configure your message body however you wish, I prefer the above format.
  10. Instead of #channel-name set @Fname.Lname (follow this format, but this could vary based on your slack username format).
  11. Save & activate

Repeat this for every user you wish to receive DM's from comment mentions.

Deleted user August 30, 2018

firstName.lastName in step 6 is not found in jira account.

Haris Vugdalic August 30, 2018

Mahabubur, it would be formatted based on the user you're targeting

(example: mahabubur.melon)

The easiest way to find out the format of the user is to start a comment in JIRA with @ then type the first name. This will reveal the value you would need to add to step 6.

Thomas Rohrer July 23, 2020

Please support my idea to have this function in Lite (Free) version of this plugin.

https://jira.atlassian.com/browse/JIRAAUTOSERVER-67

2 votes
Nick Cron December 28, 2018

Hi everyone - our bot does exactly what is described here and is available for all teams without the need to self host.  

You can check it out at https://www.nextup.ai/slack

If you want to see how this specific feature works you can view our help doc here: https://help.nextup.ai/chat-for-slack/usage-guides/mention-notifications

Nick Cron December 28, 2018

And it works on Jira Server, Data Center and Cloud. 

1 vote
Harry Bloom September 16, 2019

Finally figured a way to get this working with the help of @Hanna Haddad suggestion about the account id only being valid for detecting comments above.

The below instructions are how to get notifications for comments that i'm tagged in working in Slack using the Jira Cloud app.

  1. go to the Jira Cloud slack channel in your Slack client
  2. Type /jira manage
  3. Click on the manage subscription popup
  4. Go through to the link and edit the channel subscription
  5. Click the Advanced button
  6. In the JQL field, type assignee = {username} OR comment ~ '{accountId}'
    • you should get autocomplete for your username
    • to find your accountId, go to your profile page in Jira and copy the id value from the url
    • for example, my JQL looks like: assignee = harrybloom OR comment ~ '557058:fa453b88-076f-4051-9831-c4c7f3f90a53'
  7. Click Save
  8. Voila
Hanna Haddad September 17, 2019

@Harry Bloom  thanks for the tip. 


Is it possible to note receive a notification if you're the one leaving the comment? this seems to notify the user if he also wrote the comment or was mentioned on previous comment (not just the one just added)

Leila Alapour December 30, 2019

How do I find my account ID? thanks for this!!

Hanna Haddad December 31, 2019

go to your profile in JIRA and you'll find it in the URL when you get to that page

https://1valet.atlassian.net/jira/people/5af998f12083b15a0bd3d4e7

Leila Alapour December 31, 2019

Many thanks! was able to set it up!

Andy January 24, 2020

Hello @Harry Bloom 

I think I'm doing something wrong as is not working for me, I don't receive any notification in my slack whenever I'm tagged in a Jira

I've attached a pic with the settings I've saved.

 

Many thanks for your helpScreenshot 2020-01-24 at 18.04.06.png

0 votes
Nick Cron March 21, 2019

Hi everyone - we are releasing a major update that will allow you to get ALL of your Jira emails in Slack and allows you to control your notifications at a granular level.  It is also going to batch updates to reduce the noise in Slack.  Check out the blog we put out about it today here - https://medium.com/@nextupai/say-goodbye-jira-emails-and-clear-your-inbox-e8c4a6e4f289

Here is the user configuration screen:

preferences.png

Nick Cron March 21, 2019

This is what it looks like in Slack using the new Block Kit message format. 

notification-result.png

Like Mike Solomon likes this
0 votes
Dante León Marín Carril May 7, 2018

Big lack of Jira to have not a good email or Slack implementation. Not wonder coming from an united-statian product... XD

0 votes
Tiago Melo August 25, 2017

Seems to be a quite wanted feature (I'm also looking for something like that). Was anyone able to find a free solution, or started to write a custom plugin?

0 votes
Adrian Wieczorek
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 21, 2016

Hi,

Our Slack Connector Add-on can send direct messages over Slack to users mentioned in JIRA comments. Check out this documentation page to get more details on this.

Cheers,

grumpasaurus August 25, 2017

Doh - we're on JIRA Server :(

Suggest an answer

Log in or Sign up to answer