A bot that creates an incoming webhook URL for every channel it joins. Using the webhook URL, any user can set up integrations to post notifications into that channel.
- Create an app at api.slack.com/apps
- Click on
Bot Users - Add a bot user (choose a username and enable 'Always Show My Bot as Online')
- Click on
Install Appin the sidebar - Install the app and copy the
xoxb-token
- Get the code
- Either clone this repo and run
npm install - Or visit https://glitch.com/edit/#!/remix/slack-channel-webhook-blueprint
- Either clone this repo and run
- Set the following environment variables to
.env(see.env.sample):SLACK_TOKEN: Your app'sxoxb-token value (available on the Install App page)SLACK_VERIFICATION_TOKEN: Your app's verification token (available on the Basic Information page)PORT: The port that you're running ngrok onBASE_URL: Your ngrok URL
- If you're running the app locally:
- Start the app (
npm start) - In another windown, start ngrok on the same port as your webserver (
ngrok http $PORT)
- Start the app (
- Go back to the app settings and click on Events Subscriptions.
- Set the Request URL to your ngrok or Glitch URL + /events
- On the same page to subscribe to the
member_joined_channelbot event
- Invite the bot into a channel. You should see a message posted with the webhook URL
