Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

Sending to multiple channels from one webhook URL #7

Open
tigran-cl opened this issue Sep 26, 2018 · 7 comments
Open

Sending to multiple channels from one webhook URL #7

tigran-cl opened this issue Sep 26, 2018 · 7 comments

Comments

@tigran-cl
Copy link

Hi there, awesome job on the package, have a question for you.. In your examples you are able to send to different slack channels, for me, one webhook url, only allows me to send to a single channel. Specifying the channel in the to() function has no effect for me, it still sends it to the channel associated with the webhook url.

So I guess my question is, how did you generate your webhook url on slack so that you are able to send to multiple channels using a single webhook url? It doesn't seem possible from what I've found on google, it seems like you need a unique webhook url for each channel.

@henriqueramos
Copy link

Seems Slack removed this option.

https://api.slack.com/custom-integrations/incoming-webhooks#migrating_from_legacy_incoming_webhooks

@gianemi2
Copy link

gianemi2 commented Nov 8, 2018

Is not possible to add multiple slack incoming webhooks?

@tigran-cl
Copy link
Author

@gianemi2 it is possible, I ended up forking this package so that I can point a channel to a webhook url in the config file. My only use case was to send to different channels though, I haven't tested sending to users and other stuff so use at your own risk... https://github.com/tigran-cl/laravel-slack

@tranghaviet
Copy link

Nice work. @tigran-cl Can you make a pull request?

@freynolds
Copy link

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".

When creating a webhook

@roerjo
Copy link

roerjo commented May 17, 2019

@freynolds that is a legacy option and does not work with new integrations.

https://api.slack.com/custom-integrations/incoming-webhooks

@connecteev
Copy link

@gianemi2 it is possible, I ended up forking this package so that I can point a channel to a webhook url in the config file. My only use case was to send to different channels though, I haven't tested sending to users and other stuff so use at your own risk... https://github.com/tigran-cl/laravel-slack

@tigran-cl Given that Slack only allows you to send to one channel (or user) per webhook, this package needs the ability to configure multiple webhook URLs, so that I can send a slack message to #my-channel or @my-user using one package.
Can you please create a pull request?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants