Skip to content

A Slack bot able to setup rotating schedules for reminders

License

Notifications You must be signed in to change notification settings

Germandrummer92/SchedSlackBot

Repository files navigation

SchedSlackBot

CI Coverage Status Image of a Calendar

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

Features

  • Overview of current rotating schedules Image of overview

  • Creating new Schedules Image of creating a new schedule

  • Schedule Reminders with ability to skip to next person in line Image of a reminder

  • Ability to delete existing reminders Image of a deletion

  • Ability to edit existing reminders Image of an edit

Setting up a new Slack bot

  • Open Slack Apps
  • Create New App
  • Copy & paste app_manifest.yml Image of creating a slack app
  • 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 Image of installing the slack bot
  • Copy the Slack_Bot_Token and Slack_Signing_Secret for local development or deployment

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

Development

  • 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) and SLACK_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

Image Attribution

Banner vector created by makyzz - www.freepik.com