An application for Slack based standups. This is a Flask server application to handle Slack callbacks, create/submit standups, report to a channel etc.
Check usage and API further in the README.
Reporting submissions on the channel
- Create a new standup app in your Slack workspace
- Generate tokens and secrets
- Create slash command to trigger the modal (eg:
/standup
) - Configure the HTTP URL for the slash command to:
http://127.0.0.0:5000/slack/standup-trigger/
. Replace127.0.0.1:5000
with your deployment host/port. - Add HTTP URL in the "Interactivity & Shortcuts" to handle the form submission.
- Enable "Interactivity"
- URL:
http://127.0.0.1:5000/slack/submit_standup/
. Replace127.0.0.1:5000
with your deployment host/port.
Some environment variables for the application:
export SLACK_API_TOKEN="<slack-api-token-here>"
export SLACK_SIGNING_SECRET="<slack-signing-secret-here>"
export SQLALCHEMY_DATABASE_URI="sqlite:////path/to/standup.db"
export STANDUP_CHANNEL_ID="C0XXXXXXXXX" # Channel where submissions will be posted
docker build . -t slack-standup
or
docker pull vipul20/slack-standup:latest
Check Dockerfile for help with run command
The Slack form/modal can be built using the Block Kit Builder.
Block Kit is a UI framework for Slack apps that offers a balance of control and flexibility when building experiences in messages and other surfaces (I am using modal here)
Using the Block Kit Builder you can create any modal you like and add the JSON data generated as a standup using the APIs (doc below). The application will fetch all the blocks used in the modal and display it appropriately while publishing to a channel.
Block Kit sample shown in screenshot can be found here: https://bit.ly/340PukR Screenshot for the same Block Kit sample is here
Use the slash command to trigger with the standup you want to fill
/standup engg
This will open any standup which is added for engg
This application uses SQLite DB which can be replaced with any other DB by the users of this repo. I am using SQLAlchemy as the ORM.
-
Standup table has:
standup_blocks
: Blocks for the Slack modaltrigger
: Trigger word for this standup (eg:engg
)is_active
: Whether the standup is active or not
-
Submission table has:
user_id
: Slack user id of submitterusername
: Slack username of the submitterstandup_submission
: The standup content submitted
There are APIs to fetch, create, update and delete standup forms. These can be used to integrate with a UI application.
For API usage and examples, please check the Postman collection
Currently, there's a single GET API endpoint which can be scheduled as a cron
to report all the submitted standups in a channel: /slack/publish_standup/
MIT
Some TODOs/scribbles on what can be a few good features:
- A UI to fetch, create, update and delete standup (Would appreciate any contribution here :))
- Feature to assign users to standups rather than users choosing a standup from the slash command
- ...