Hello, I'm new to Jira automation.
I'm trying to create an automation that sends a Slack message with "@ mention", but I don't know how to dynamically insert the story-ticket assignee's name (e.g. @TicketAssigneedName) in the message.
The webhook to Slack is already set up and messages are sent to my specified channel correctly.
Could someone give me a pointer? Thanks!!
~amy
You would need to know the Slack Member ID of the person you want to @ mention. There are a couple of ways of doing this, check out this article of one way. At my previous job I created the user property with the member Id when the user was imported from Okta the first time, including some other information we used like location.
There is a new component in Automations that would allow you to @ mention the person directly without knowing the Slack Member Id, but there is a bug that is preventing you from doing so unless it is an alert in operations. Let me see if I can find it. There is also this suggestion to add more features to the Slack integration, see AUTO-203
Here is the bug for the Slack DM component, JSDCLOUD-17865. It has been closed but based on the comments there are still some issues with it, and if it works it only works to send DMs to the user. For @ mentions you currently have to use the Slack member Id and then the message would look something like this:
<@ABC123456> Here is a new issue, {{issue.key}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot for the detail info @Mikael Sandberg ! Unfortunately, I don't have Jira admin permission, so won't be able to create the API token.
I'll keep myself posted on the Slack DM ticket, hope it can get resolved soon.
Thanks so much again for your help! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Amy Chan
It’s not exactly your case, but for me it’s the same concept.
In Jira Cloud, I am using a lookup table (jir automation ) to create a mapping between each Jira team and the corresponding Microsoft Teams channel ID.
Lookup table allows the automation to retrieve the correct channel ID based on the team assigned to the Jira ticket.
However, there are some limitations:
The values in the lookup table must be kept up to date manually.
The lookup table is limited to a maximum of 100 entries.
Hope this can help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for sharing your experience @Duc Thang TRAN !
My team is a small team, so a lookup table should be feasible. Let me look deeper into it.
Thanks much again! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FYI -- automation Lookup Tables support up to 200 rows since the changes in July 2023 although the UX makes managing that many rows quite challenging. It may be better to pre-build the row data as JSON (maintaining it outside the rule), paste the entire JSON into a variable, and then use a Dynamic Lookup Table to parse / map the values for later lookups.
However, as @Amy Chan is on an Enterprise license level, I suspect with the number of users involved it may be better still to investigate the bulk-update approaches noted by @Mikael Sandberg to store an entity property for the Slack ID with each Jira user.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Bill Sheboy
Thank you for the information, that’s good to know.
I usually use this approach with fewer than 30 values, and I imagine maintaining more than 50 mappings would be challenging.
Happy monday :)
Duc Thang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.