Per-channel webhook template
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 App in the sidebar
- Install the app and copy the xoxb- token
Run locally or 
- Get the code
- Set the following environment variables to .env (see .env.sample):
- SLACK_TOKEN: Your app's xoxb- 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 on
- BASE_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)
- 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, subscribe to the member_joined_channel bot event
- Invite the bot into a channel. You should see a message posted with the webhook URL