N
Novuβ€’11mo ago
tomer6321

Multiple Slack Channels?

Hey πŸ‘‹ Q - Is it possible to use Novu to send notification to multiple Slack channels? Context: We want to use Novu to send alerts (as Slack messages) to users and have them be able to configure different channels for different alerts. From what I could tell when installing the Slack app, users need to choose one channel and thats the only channel that the app can then send messages to. Thanks!
9 Replies
Pawan Jain
Pawan Jainβ€’11mo ago
@tomer6321 Our current slack integration works on the webhookUrl. When a user installs slack app, slack gives option to select channel or individual user. After selection and installation, slack generates a webhook url and this webhookUrl is stored in Novu
tomer6321
tomer6321OPβ€’11mo ago
Yes I understand that. So then that means that for that particular user we can only send slack messages to that one channel that the user initially chose, correct?
Pawan Jain
Pawan Jainβ€’11mo ago
@tomer6321 thanks for your time. It helped in understand your requirements better. As webhookUrl is attached to a subscriber. Multiple slack integrations can be added in one environment and be active at the same time. one subscriber can have one webhookUrl per slack integration. if your userId is 12345 So you can create subscribers with subscriberId 12345_integration_1 12345_integration_2 12345_integration_3 like this Each subscriber have credentials(webhookUrl) added for only one slack integration. and that can be changed checkout these links 1. https://docs.novu.co/api-reference/subscribers/update-subscriber-credentials 2. https://github.com/novuhq/novu/tree/next/packages/node#trigger-workflow-to-multiple-subscribers Happy to know your thoughts about this approach πŸ™‚
tomer6321
tomer6321OPβ€’11mo ago
Hey. Thanks for getting back to me. I'm just reading through this. So you are saying that I would need to create a "fake" subscriber for every user<->integration pair, and I can then send the notification to whichever subscriber (or multiple using the link you just sent) To further clarify, I would need to first create X slack integrations in Novu (X being the max number of channels I want to support). And each time that a user wants to add a new channel, I create a link for in the form of: https://api.novu.co/v1/subscribers/<userId_integrationId>/credentials/slack/oauth?environmentId=environmentId&integrationIdentifier=<integrationId (that hasn't been used yet for this user)> and they'll be redirected to your hosted auth page where they choose it from the list of available ones? (See attached picture)
No description
tomer6321
tomer6321OPβ€’11mo ago
Perhaps this wasnt clear. For this approach, how many slack integrations do I need to create in the Novu Integrations store?
No description
Pawan Jain
Pawan Jainβ€’11mo ago
if you want to support 4 channels for one subscriber then 4 slack integration need to be added
tomer6321
tomer6321OPβ€’11mo ago
I see. Ok thanks
Novu_Bot
Novu_Botβ€’11mo ago
@tomer6321, you just advanced to level 1!
Pawan Jain
Pawan Jainβ€’11mo ago
Let me know If you have any question or face any issue
Want results from more Discord servers?
Add your server