This is a boilerplate for building slack apps with Ruby on Rails.
The default branch master
uses Mongoid as database adapter. For ActiveRecord, please check postgres
branch.
- FQDN(Fully Qualified Domain Name) to host the app publicly. You can also choose to use ngrok instead.
- Create a new app here
- Navigate to the OAuth & Permissions page and add the following Bot Token Scopes:
users:read
channels:read
groups:read
chat:write
commands
incoming-webhook
Slack Link to Slack-Scibot, will need to authenticate via Slack login to the workspace it is configured to work with: https://api.slack.com/apps/A062693KZRB
BASE_URL stands for https://slack-scibot.notch8.cloud hereafter. Use https://slack-scibot.notch8.cloud for Redirect.
- Activate Interactivity & Shortcuts and add this url:
https://slack-scibot.notch8.cloud/api/slack/action
- Activate Slash Commands adding two slash commands
/ping
,/quiz
and use this url:https://slack-scibot.notch8.cloud/api/slack/command
- Activate Event Subscriptions subscribing to the event type
member_joined_channel
and add this url:https://slack-scibot.notch8.cloud/api/slack/event
(This step needs the application to be running :D so you can skip this and come back a few mins later) - Navigate to the App Home page and toggle Always Show My Bot as Online (according to your reference)
bundle install
cp .env.example .env
Go to https://api.slack.com/apps, click on your application.
Grab the infomations for .env
from Basic Information section.
rails s
Open https://slack-scibot.notch8.cloud in your browser.
Please follow the standard Ruby on Rails application deployment methods.
MIT
- Add Rubocop linting
- Add Specs
- Add CI/CD with Github Actions
- Add Contribution Guide
This boilerplate was inspired by Slack Ruby Bot Server and Slack Ruby Bot Server Events.
Thanks to Daniel Doubrovkine and all the contributors.
Made with ❤️ by crazyoptimist 🐬