Slack integration - get the bot to ping @channel on alert
Asked by leejhampton1:

Hi, I have ops genie set up to send alerts to a Slack channel when they are triggered. What I'd like to do is create a small "buffer" between the alert hitting the channel and the person on call getting paged, so other team members in more convenient time zones get a chance to respond. In order for this to be successful, I'd like the OpsGenie bot to ping the whole channel with \`@channel\` so team members have an opportunity to see and respond to the alert within the window.

I can't seem to find anything in the integration that can accomplish this. Is there any way to somehow prepend an \`@channel\` to the message? I use prometheus to generate the original alert text, so I guess I could put that in the original alert description, but my gut tells me that won't get translated to the \`@channel\` handle by the time it propogates through the bot.


Answers:
author: Nick H
body: Hi [@leejhampton1](/t5/user/viewprofilepage/user-id/4747027) ,

Including "@channel" in the Message of the alert will not notify the members of the Slack channel as expected when this command is executed.

Having said that - including "@channel" in the Description of the alert will. The Description of the alert can be included with what's sent to Slack.

![slack5.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/182071i693467845FDBDA51/image-size/large?v=v2&px=999 "slack5.jpg")

Under the Prometheus integration, you could include a hardcoded "@channel" in the Description field. This can be configured under the Advanced tab of the integration:

![slackcomm1.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/182067i0709BAAC3CE040BE/image-size/large?v=v2&px=999 "slackcomm1.jpg")![slackcomm2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/182068i45BAC843758E9548/image-size/large?v=v2&px=999 "slackcomm2.jpg")

Otherwise you can configure an Alert Policy under the team receiving these alerts that modifies your alerts and includes the "@channel" in each alert's description:

![slack4.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/182069i367B4F35CA0570CF/image-size/large?v=v2&px=999 "slack4.jpg")![slack3.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/182070i9878B14639CD3F88/image-size/large?v=v2&px=999 "slack3.jpg")

Hope that helps!

FYI - Both of the features listed above are only available on the Opsgenie Standard and Enterprise plans.

[Alert Policies](https://support.atlassian.com/opsgenie/docs/create-and-manage-team-alert-policies/#Alert-Policy)

[Advanced Integrations](https://support.atlassian.com/opsgenie/docs/use-advanced-integration-settings/)

comments: author: Nick H
body: Here's a test to confirm this should work as expected using an Alert Policy - which added "@channel" to the alert's description - and notified the channel:

![slack6.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/182073i218BE0F4F3852C36/image-size/large?v=v2&px=999 "slack6.jpg")![slack7.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/182074iFCB9C5C3602A40B7/image-size/large?v=v2&px=999 "slack7.jpg")![slack8.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/182075i31078A39386B9A62/image-size/large?v=v2&px=999 "slack8.jpg")