It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Direct Message notifications slack

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.

8 answers

Is it available to everyone?

@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

@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?

@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)

@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.

@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? 

@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] ...

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

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!

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

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

Thanks @Hanna Haddad . That should do it!

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.

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

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.

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

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

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

@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)

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,

Doh - we're on JIRA Server :(

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?

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

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

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

notification-result.png

Like Mike Solomon likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

1,313 views 8 2
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you