An example app that helps enforce channel naming conventions.
- Create an app at api.slack.com/apps
- Click on
OAuth & Permissions
- Add the
channels:read
andchat:write:bot
permissions - Click on
Install App
in the sidebar - Install the app and copy the
xoxp-
token
- Get the code
- Either clone this repo and run
npm install
- Or visit https://glitch.com/edit/#!/remix/slack-channel-naming-blueprint
- Either clone this repo and run
- Set the following environment variables in
.env
(copy from.env.sample
):SLACK_TOKEN
: Your app'sxoxp-
token (available on the Install App page)PORT
: The port that you want to run the web server onSLACK_VERIFICATION_TOKEN
: Your app's Verification Token (available on the Basic Information page)
- 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, subscribe to the
channel_created
andchannel_rename
events
- In the app settings, click on Interactive Messages
- Set the Request URL to your ngrok or Glitch URL + /interactive-message
- Create a new channel