Simple, lightweight, and self-hostable Slack bot for collecting standup reports. The bot is primarily intended for people who are familiar with working with Slack applications.
- Slack application token
- Slack bot token
- Go
- PostgreSQL
In order to use this software, you will first have to create a new application on Slack.
The application needs to have the following features enabled:
- Slash Commands
- Event Subscriptions
- Bots
- Permissions
Additionally, enabling Socket Mode is necessary for this application.
The application needs to have the following slash commands:
/register
/adduser
/deluser
/unregister
/addquestion
The following Bot Token scopes are mandatory:
channels:history
- for finding standup threads in the report channelchannels:join
- for viewing the report channelchannels:read
- for reading messages from the report channelchat:write
- for writing messages to the report channelchat:write.customize
- for writing messages as the user who submitted the reportchat:write.public
- for writing in public channelscommands
- to execute slash commandsim:history
- to view direct message history with usersteam:read
- to read information about the teamusers:read
- to list users and get information about them
The following bot event subscriptions are mandatory:
message.im
- for receiving direct messages from users
Once you have the application configured correctly, you should add it to your
workspace. You will have two tokens that you need to add to your configuration:
the app token (starting with xapp-
) and the bot token (starting with xoxb-
).
git clone git@github.com:SomusHQ/tacostand.git
cd tacostand
cp .env.example .env
nano .env
The following configuration options are available:
SLACK_APP_TOKEN
- the app token (xapp-
prefix)SLACK_BOT_TOKEN
- the bot token (xoxb-
prefix)SLACK_REPORT_CHANNEL
- the name of the channel to which the reports will be postedPGHOST
- the hostname of the PostgreSQL serverPGPORT
- the port of the PostgreSQL serverPGUSER
- the username to use when connecting to the PostgreSQL serverPGPASSWORD
- the password to use when connecting to the PostgreSQL serverPGDATABASE
- the name of the PostgreSQL databaseCRON_EXPRESSION
- the cron expression to use for scheduling the bot's standup collection. You may use a tool such as [Crontab Guru][crontab-guru] to generate a cron expression.WRAP_UP_TIME
- the amount of minutes before the standup reports are wrapped up.
You can also set debug options if you want to work on the app:
DEBUG_MODE
- will enable additional debug logging whentrue
SKIP_MIGRATIONS
- will skip the auto-migration process, resulting in faster startups.
Never set any of these to true
in production.
Use go
to build the application:
go build -o tacostand
./tacostand
If you can't execute ./tacostand
you probably have to specify the permissions
for it:
chmod +x tacostand
MIT. See the LICENSE file for more details.