Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira Slack integration

Hadas Hamerovv
Contributor
September 14, 2021

Created an automation rule that posts on Slack. I've added values to the override channel field but for some reason the messages keeps on showing in the default channel.

I actually want a direct message to users.

Tried static name @Mitsu Bishi and also a dynamic one but its not working.

Any advice?

the dynamic field is: @{{issue.assignee.properties.metadata.slack_id}}

1 answer

1 vote
Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 17, 2021

Hey @Hadas Hamerovv !

The override has to be a Slack UID - for example, instead of @MySlackHandle you'd use something like @UEM0NPR8Q .

Based on the smart value you've got listed there, that looks like the user property we set in the script Mention someone directly in Slack via Jira Automation . It's possible the script didn't run successfully, or didn't find a matching Slack user for the particular Jira assignee. The script output does list the users it matches if you wanted to watch for that user during a sync run. You could also create a test Automation rule that simply logs that value to the Automation audit log, if you wanted to check and see if the property is set for the user.

Let me know if I can clarify more!

Thanks,
Daniel | Atlassian Support

Hadas Hamerovv
Contributor
September 17, 2021

Well Daniel, the problem is not with the script. We modified the smart values to my static Slack UID and it still not working.

I am already few days with Jira/Your support member, investigating it and we still cannot figure out what the problem is.

Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 17, 2021

Hi @Hadas Hamerovv ,

Thanks for mentioning you've got a support case open. I've reviewed the case and believe the situation is that you created a Slack app using this documentation and generated a channel-specific webhook from the app. I believe this to be the case based on the app icon in your Slack screenshot:

default_new_app_icon

The trouble with this method is that the channel cannot be overridden. From that document:

You cannot override the default channel (chosen by the user who installed your app), username, or icon when you're using Incoming Webhooks to post messages. Instead, these values will always inherit from the associated Slack app configuration.

For this reason, the Automation setup still prefers the Legacy webhook Slack app, which does allow channel overrides. The app icon when the Legacy webhook app is used is different:

outgoing-webhook_128

You can install the Legacy webhook app on your workspace here:

slack.com/apps/new/A0F7XDUAZ-incoming-webhooks

Once you've selected a channel and created a new webhook URL, paste that URL into your rule. I believe you will find the channel overrides start working as you expect with this new webhook URL.

Hadas Hamerovv
Contributor
September 17, 2021

Your comment did help although did not solve the issue.

I ran the script you mention and now the users I see are synced.

(tested by adding the smart values to the message content itself and I see that the smart values now translates to the UID when before that was empty.

Unfortunately the message still goes to the main channel and not to the user direct message.

Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 17, 2021

Hi @Hadas Hamerovv - just wanted to confirm that you saw my latest message about the different apps. I see our posts came in at about the same time!

Hadas Hamerovv
Contributor
September 17, 2021

Indeed I missed it. So now I have a slackbot and a jirabot in my channel however both do not send direct messages but only to the default channels

Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 17, 2021

Hi @Hadas Hamerovv  - I've shot a quick video showing the setup with the Legacy Incoming Webhooks app to help illustrate the setup here. Hopefully this makes it a bit easier to understand how to generate the webhook URL:

Like Bill Sheboy likes this
Hadas Hamerovv
Contributor
September 17, 2021

Thanks Daniel. I did exactly that (After you explained it and before this video ) but it does not override. As you can see I have to same legacy icon but it goes to the channel and not to my dm.Screen Shot 2021-09-18 at 0.49.57.png

Hadas Hamerovv
Contributor
September 17, 2021

I do however appreciate a lot you spending the time capturing this video and happy to see who's behind the words.

Suggest an answer

Log in or Sign up to answer