Just mention or DM @gistbot in any channel and it will upload a new Github Gist for you!
This is the longest getting started guide, but AFAIK there isn't an easier setup flow. Open to PR that can help make it shorter!
- Go to https://ngrok.com/download
- Select the Download URL that matches your System
- Unzip the File and put it somewhere you'll remember
- (optional) create an alias for ngrok
# In ~/.bashrc
alias ngrok="~/Dropbox/ngrok http"
- Now set your source to new bashrc
source ~/.bashrc
- Run ngrok 9001 ( you may need to create account / sign in )
- Stop Ngrok for now
- In Bot directory copy sample env file
cp etc/.env.sample.js etc/.env.development.js
- Install node_modules
yarn install
- Run the App
yarn run start
- In a seperate tab run
ngrok 9001
- Leave your Bot Server and Ngrok Running
- Make sure you are signed into your team and can view admin ex.
https://clintonslackbots.slack.com/admin
- Go to Slack Apps Admin https://api.slack.com/apps?new_app=1
- Fill in App Name and Select your Slack Team
- Click "Create App"
- You should be on the "Basic Information Screen"
- In the Left Rail Click "Features > Bot Users"
- Click "Add Bot User" Fill in your bot name
gistbot
- If you don't plan on using an RTM connection flip "Always Show My Bot as Online" on.
- Click Add Bot User
- In the Left Rail Click "Features > Interactive Messages"
- Click "Enable Interactive Messages"
- Paste Your ngrok url in the
Request Url field
https://3d5fc033.ngrok.io/slack
- Click Enable Interactive Messages
- In the Left Rail Click "Features > Event Subscriptions"
- Toggle Events on
- Paste your webhook endpoint in the Request URL Field
- Scroll Down to
Subscribe to Bot Events
- Add the Following Events
message.channels
message.groups
message.im
- Click Save Change
- In the Left Rail Click "Settings > Basic Information"
- Copy Client Id, Client Secret and paste those in
etc/.env.development.js
- In the Left Rail Click "Features > Oauth & Permissions"
- Under Redirect URL's add your ngrok oauth endpoint ex.
https://3d5fc033.ngrok.io/oauth
- Click "Save Urls"
- Click "Install App To Team"
- Copy the "Bot User OAuth Access Token" and paste in the token field of
etc/.env.development.js
- Restart Your Slack bot
CTRL C
andyarn run start
- Finally Go To "Manage Distribution"
- Click the "Add To Slack" button
- Go through Oauth Process
- You can now message your bot!
- If you've made it this far you can go grab a beer or tea if that's your thing 😎
In order for your local environment to work you'll need to ensure that the Slack app has the correct ngrok URL. I just bookmark my slack app in chrome.
ex. https://api.slack.com/apps/xxx/event-subscriptions
- Start Botkit Server
yarn run start
- New Tab
ngrok 9001
- Go to Slack Settings
Features > Interactive Messages
- Paste new Ngrok URL in
Request URL
- Go to
Features > Event Subscriptions
- Click Change in
Request URL
- Paste new Ngrok URL in
Request URL
Are you looking to work on chatbots, API's and cool frontend app's?
Check out our sites
Please reachout to [email protected] or [email protected] for more details!