Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

How can I map Jira users to my Slack users when sending notifications with Automation for Jira?

In the past it was possible to @mention users in Slack simply by adding this type of smart-value to your Automatin for Jira rules (see

Hi @{{}}

This would at runtime be replaced with the Assignee's Jira username, and Slack would mention this user.  

Now that Jira Cloud will remove usernames & user keys due to GDPR, how can we still mention Slack users directly with Automation for Jira?


3 answers

1 accepted

0 votes
Answer accepted

I'm glad you asked ;).  So this has become a little more complicated.  

First of all: The above was never 100%  correct, and would have only worked, if your Jira usernames, mentioned your Slack usernames exactly.  If they didn't always match, then this wouldn't have worked at all.

Going forward we do want to add a better Slack integration in future that will allow mapping Slack users to their corresponding Jira users, however in lie of that, there's another solution using user properties.


For each user you'll have to set their slack handle as a user property in Jira.  This is now necessary, since usernames will no longer be available in Jira cloud.

To set the slack handles as properties you'll have to make some REST calls to your Jira instance:

  1. First you need to get an API token for this:
  2. Next for all of your users, you'll have to set their slack handle using this CURL command:
    curl --request PUT \
    --url 'https://YOUR_CLOUD_URL/rest/api/2/user/properties/slack?username=USERNAME' \
    --header 'Content-Type: application/json' \
    --data '"SLACK_HANDLE"'

For example here's a request to set my Slack handle against our instance:

curl --request PUT \
--url '' \
-u \
--header 'Content-Type: application/json' \
--data '"andreas"'

So this will set the 'slack' user property for the 'admin' user to 'andreas' on our '' instance


Next in your Automation rules, you can use this smart-value to now mention users:

Hi @{{|assignee.displayName}}

This will try to lookup the slack mention from user properties, and fall back to the full name, if no slack property can be found.


This workaround still works but the query is a bit different and accountId needs to be used now as it looks like username is deprecated:


curl --request PUT \
--url 'https://YOUR_CLOUD_URL/rest/api/2/user/properties/slack?accountId=USERNAME' \
--header 'Content-Type: application/json' \
--data '"SLACK_HANDLE"'


Daniel Eads Atlassian Team Nov 09, 2020

In a recent ShipIt, we wrote a python script that handles (no pun intended) the Jira user properties for you when you feed it your Jira API and Slack API tokens. Check it out in this article or view the script directly here.

Like Jonas likes this

Hi @andreas ,

Which Slack property is the correct one to use for the mention to work?

Is it the "real_name" or display_name" one?


I had to use the slack Username for the mention to work

Oh boy, this is rough workaround with large sets of users. How much of a priority is it for you guys to improve the integration to support mentions better? Do you happen to have a timeline? I'd imagine this is quite a popular use case for JIRA automation.

John McKiernan Marketplace Partner Mar 26, 2019

Hey Haris,

Sorry about the slow response on this one. We can't give an exact timeline on it unfortunately as we have a lot of high priorities in our backlog right now. 

Once we do ship the improvement though, we will leave a note here so you know. 



Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Apps & Integrations

Marketplace Partner Spotlight: Fine Software

Happy New Year, everybody! What better way to kick off 2022 than with a new Marketplace Partner Spotlight ✨ This month, we're getting to know Daniel Franz, co-founder of Fine Software. Fine Software ...

417 views 2 15
Read article

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