A Kubernetes self-hosted Slack bot able to set up rotating schedules for Reminders.
Your One-Stop-Shop for setting up rotating 📆 schedules.
- Setting up a Meeting and want to have the meeting moderation rotate between members? SchedSlackBot can help you.
- Have a meeting that a representative of your team should join? (e.g. Scrum of Scrums, Weekly etc.) SchedSlackBot can help balance the load fairly between Team Members
- Open Slack Apps
- Create New App
- Copy & paste app_manifest.yml
- Adjust the request url to something valid (either ngrok or already final k8s deployment url) (you can change it later)
- Make sure the url is verified in the App Manifest section. (it should have the prefix /slack/events)
- Install to your workspace
- Copy the Slack_Bot_Token and Slack_Signing_Secret for local development or deployment
-
Create the necessary kubernetes secret:
kubectl create secret generic sched-slack-bot-secret \ --from-literal=mongo_url="mongodb://yourMongoDbUrl+Password+Port" \ --from-literal=slack_signing_secret="YourSlackSigningSecret" \ --from-literal=slack_bot_token="xoxb-YourSlackBotToken"
-
Adjust the "CLUSTER_DOMAIN" in the deployment.yml to match your specific k8s cluster
-
Adjust the "TLS_SUFFIX" to match your specific k8s tls suffix
-
Deploy the file:
kubectl apply -f deployment.yml
- Install python3.11
sudo apt-get -y python3.11
- Install poetry
curl -sSL https://install.python-poetry.org/install-poetry.py | python3.11 -
- Install dependencies with poetry
poetry install
- Setup pre-commit hook:
pre-commit install
- Follow the #Setting up a new Slack bot guide to set up a test bot in your own workspace
- Set the
SLACK_SIGNING_SECRET
(Signing Secret) andSLACK_BOT_TOKEN
(Bot User OAuth Token) env variables - Set up a running mongo database instance and set the corresponding url in env variable
MONGO_URL
- Set up a reverse proxy (e.g ngrok)
ngrok http 3030
- Update the url in your slack bot to the ngrok url (should end in
/slack/events
) - run the app
poetry run uvicorn bin.app:api --reload --port 3030