Skip to content

GovTechSG/room-booking-bot

Repository files navigation

Room Booking Bot

A Bot for booking of meeting rooms in internal Slack Workspace.

Getting Started

Grab dependencies

npm i

Run the bot

npm start

Configurations

Create a Slack app

  1. Log into your workspae and create a Slack App here
  2. Add a Slash command (see below)
  3. Set Up Interactive Components (see below)
  4. Navigate to Bot Users to create a bot user
  5. Navigate to the OAuth & Permissions page and make sure the following scopes are pre-selected:
    • commands
    • bot
  6. Install the app to your workspace

Slash Command Setting

  1. Click on Slash Commands in app setting
  2. Click the 'Create New Command' button with the following details:
    • Command: /book
    • Request URL: Your server URL + /command
    • Short description: A bot for booking of meeting rooms
    • Usage hint: Book a room

Interactive Component Setting

  1. Click on Interactive Components in setting
  2. Put your server URL + /slack/actions in the Request URL field
    • e.g. if you used ngrock, it would be something similar to https://9e123bs8.ngrok.io/slack/actions

Set Up Credentials

  1. Copy .sample-env to .env and replace with your own env variables
    • The variables can be found either in the OAuth & Permissions or the Basic Information page
  2. Create a folder config in the root directory

Set Up Google Calendar

  1. Setup & grant permission to test google calendar, service account and get auth key
  2. Download google-api-key.json once you have your service account set up; place it in config folder

Contributing

  • Step 1: Branch off from master and work on your feature or bugfix.
  • Step 2: Update the changelog.
  • Step 3: Create a pull request when you're done.

References:

Todo

  • [Feature]
  • [Improvement]

Credits

This Slack Bot is based off the original telegram bot butler-bot.

About

Slack port of butler-bot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published