How to fetch the Team name from the comments by using Regex
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
How to fetch the Team name from the comments by using Regex.
Environment
JSM Cloud.
Solution
You can use the below logic to build an automation rule to fetch the team name from the comment
Trigger: Comment added
Condition:Create regex to filter and match your team name using the below regex:
First Value:
1
{{#issue.comments.last}}{{#if(exists(body.match(".*(Team ).*")))}}{{body}}{{/}}{{/}}
Second Value:
1
{{issue.comment.last.body}}
Action: Add any action.
Please refer below screenshots:




Reference:
Updated on March 13, 2025
Was this helpful?
Still need help?
The Atlassian Community is here for you.