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 to make a rule that triggers an action when a user is mentioned in a comment?

I want to create a rule that, for example, makes a web request when a user is mentioned in a comment and I need to get the mentioned user's accountId from the comment. How to achieve this?

2 answers

1 accepted

1 vote
Answer accepted

Here is the answer:

To trigger an action when a comment contains (or does not) a mention you should use the following regular expression:


If you want a rule to trigger when a mention is present in a comment body, it should look like this:

Jira automation 2.png

If you want to extract accountId from the mention in the last comment you should use the following smart value:


For example, you can use the smart value in an email body or in a web request to Jira API.

Hi there

This isn't working for me.  The automation rule audit log shows that the rule recognizes that a comment was added, but it doesn't seem to be recognizing the user mention.  Could this be something to do with how our mentions are displayed?  In our setup, when someone is mentioned their name is displayed in format Lastname, Firstname. We are on Jira Server v7.12.3.

Any suggestions please?



I'm not sure it should work for Jira Server, I never used it, our deployment type is Cloud, so maybe you need to create a new question.

Like Aleksandr likes this

please try  this regular expression:


that works fine, perfekt.
Now I want, for example, send an E-Mail to that user. Has somebody an Idea how to proceed with the extracted accountId?


Hi @Eva Pfister,

I believe you should make a get request to the Jira API to get an email address for future reference. Here you can find how to do that. And here is the API endpoint you need.

You can access the email address from the API response with dot notation using the following smart value:


Here you can find more about {{webhookResponse}} smart value.

I was also having an issue using the format: 



Instead I was able to do this:

Screen Shot 2020-11-17 at 3.19.37 PM.png

Suggest an answer

Log in or Sign up to answer
Site Admin
Community showcase
Posted in Trello

Taco Tuesday: Your favorite Trello blog takeaway

Hello friends! From the community that brought you Welcome Wednesday, Throwback Thursday and Friday Fun, welcome to Taco Tuesday, a weekly discussion about all things Trello. The best part? One Tac...

119 views 6 6
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