0

I have an Account model where account has many Matter. On creating matter, system send notification to a private slack channel configured with associated account.

On slack Incoming WebHooks configuration every channel has different hook url but I only configured one in to my app environment which seems not send messages always to all channels - https://hooks.slack.com/services/TXXXXXX/BXXXXXXX/XXXXXXXXXX

On matter creation callback code like below:

client = Slack::Notifier.new web_hook_url_from_environment_var
client.ping message, {channel: '#channel-name-configured-into-assoc-account'}

Should I configure/initialize associated channel's webhook url?

Erik Kalkoken
  • 30,467
  • 8
  • 79
  • 114
morshed
  • 21
  • 1
  • 6

1 Answers1

0

The standard webhook is fixed to one channel. You can not change it. But there is an older variant that works with multiple channels and which you can install. See Sending message to different channel via slack webhook fails for details.

In general I would suggest to use the API and chat.postMessage for sending messages to multiple channel with your app.

Erik Kalkoken
  • 30,467
  • 8
  • 79
  • 114