Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,359,799
Community Members
 
Community Events
168
Community Groups

Send Slack message to Jira issue assignee

Hi all,

I've got a workflow transition where you select the assignee and an option from a checkbox field on a transition screen. As soon as this screen is submitted and the issue transitions, I would like to send a Slack DM to said assignee (ideally with the checkbox value selected also, but no worries if not). It seems like it should be simple, but I can't seem to crack it.

I've tried so many different methods from Atlassian and Slack documentation but nothing seems to be working for me - I can only seem to send the notification to specific channels or to a set user, but I want this to send the DM's dynamically so that whoever is the assignee of the issue will receive a DM in slack. Any help/advice would be greatly appreciated!

1 answer

3 votes
Daniel Eads Atlassian Team Nov 12, 2020

Hey Callum,

You could use Automation for this - with some considerations:

  • The Slack IDs need to be synced as user properties in Jira - here's an article and script for doing that 
  • The Automation rule trigger would be the status change. This would be configured in Automation rather than in the workflow itself (slight difference in where it's set up)
  • In the "Channel or user" field at the bottom of the Automation action that sends a Slack message, you can use a smart value 
    @{{issue.assignee.properties.metadata.slack_id}}

    to send the direct message. The message body itself can have the value of your checkbox, also using a smart value

Hope that helps! I think this is a do-able message with the assistance of the user properties for Automation to pull from.

Cheers,
Daniel

Hello Daniel, thanks for your feedback, is there a way of doing this without a webhook URL? as it insists on one and i don't want to bother users of a slack channel with direct messages to others

Daniel Eads Atlassian Team Jul 22, 2021

Hey @Karl Hamilton ,

The "channel or user" field does override the default channel in the webhook, despite having to choose one when actually setting the webhook up. For example, using a webhook URL associated with #general and then putting a smart value in the "channel or user" field, no message is actually sent to #general. It's a bit counterintuitive!

Like jonathank likes this

Daniel... thank you, this works like a charm!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Software

An update on Jira Software customer feedback – June 2022

Hello Atlassian Community! Feedback from customers like you has helped us shape and improve Jira Software. As Head of Product, Jira Software, I wanted to take this opportunity to share an update on...

4,959 views 18 31
Read article

Atlassian Community Events