Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,364,059
Community Members
 
Community Events
168
Community Groups

Jira Automation Slack Override

This question is about:

Annotation 2020-07-07 124219.png

 

We're not finding the "Channel" override to work, so we've created a new hook for each channel which is building a lot of complexity. It seems we should be able to put "#channel_name_here" in the box and it would work. I'm curious if we're using it incorrectly or if we don't have the right hook URL set properly. 

The hook url is:

https://hooks.slack.com/services/xxxxxxxx/xxxxxx/xxxxxxxxxxxxxxxxxxxx

 

Can anyone shed light on the override box? Thanks. 

1 answer

1 accepted

0 votes
Answer accepted
Daniel Eads Atlassian Team Jul 09, 2020

Hi Adam,

This is a bit curious, as we do expect the override to work as you described. Here's an example of an Automation rule I'm using that is currently sending messages to my override channel:

image.png

The hook format you listed looks correct (especially if you configured it with the link provided there in the configuration page). I've tested with a private channel for the override and still received the message when the rule was triggered. There's also no configurable settings on the webhook on the Slack end that would prevent an override from occurring.

I'm curious if you could try the override once more and note the time when you give it a go. If it doesn't post again, we can open a support case and investigate based on that rule execution.

Thanks,
Daniel | Atlassian Support

Hi Daniel thanks for the reply. I'm curious if there is a 'different' webhook that is generic. I have a bot that allows incoming webhooks, and when I create one, it forces me to select the slack channel it's associated to. Perhaps at a Slack admin level there is a generic hook for the workspace. I'll inquire with the site admins and see if there is something I'm missing.

Daniel Eads Atlassian Team Jul 09, 2020

Hey Adam - thanks for the additional context. I think if you're getting webhook URLs from a Slack admin vs. configuring them from the automation page, that might be what's causing the breakage.

The "new" Slack app webhooks specifically don't allow channel overrides:

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.

Whereas following the link to create an incoming webhook from the Automation configuration page will set up what Slack is calling a legacy webhook:

Channel Override

Incoming webhooks have a default channel, but it can be overridden in your JSON payload. A public channel can be specified with "channel": "#other-channel", and a Direct Message with "channel": "@username".

That's helpful Daniel - so are you using a legacy webhook? 

What you described makes sense for my case; I've created a bot and likely using the 'new' hooks where you dictate the channel [property] in the web interface. I don't see a way in my bot, to generate a legacy hook. What I was saying about slack admin (that I'm not), is perhaps there is a way to generate an old one.

Daniel Eads Atlassian Team Jul 09, 2020

That sounds right. The link in the Automation configuration page creates a webhook using the legacy app:

https://my.slack.com/services/new/incoming-webhook/

If your Slack administrators allow you to add app configurations, you may be able to add a webhook using the legacy app without having Slack admin permission. This is a Slack-authored app, so I think there would be a good chance that it would be approved even if you had to go through a security review to get the configuration added.

To put closure here, @Daniel Eads you are correct. We were able to access a "legacy" hook and the channel override works as expected. 

I have a separate question, since you're here. This should be a quick one. Do you have directions on how to "Create a template set", when a new project goes to their automation section and is presented with that first menu, how we can control what is shown there available to the project? We see the rules have changed, we're just not sure how to control it.

Thanks.

Daniel Eads Atlassian Team Jul 21, 2020

Right now the template rules aren't configurable; when clicking the button, you get predefined rules only:

image.png

That's an interesting idea to be able to configure them though. I've passed that feedback along. Cheers!

May I ask another question about automation ?thanks.

Daniel Eads Atlassian Team Aug 03, 2021

Hi @zhangqian04 , feel free to ask - a new question would be best, which you can do directly at this link. Asking a new one vs replying on an older thread makes sure more people can see and respond to your question. Cheers!

@Daniel Eads quite unfortunate that Atlassian has left in a description about overriding channels without mentioning of the legacy webhook, when all Slack apps by default are being generated via the "New" webhooks. 

@Adam Dulberg  would you have any knowledge on how you acquired the legacy webhook? I'm trying to lessen the complexity of having multiple Apps serving the purpose of notifying multiple Slack channels by just having a single one.

Daniel Eads Atlassian Team Dec 02, 2021

@Henry Chad Apale the easiest way is by using the link provided right in the Automation action:

image.png

Alternatively you can access the legacy webhook app directly:

Like Henry Chad Apale likes this

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events