GithubHelp home page GithubHelp logo

isabella232 / hubot-slack-gcal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from method-inc/hubot-slack-gcal

0.0 0.0 0.0 310 KB

Create events & get calendar updates from Slack

JavaScript 100.00%

hubot-slack-gcal's Introduction

Hubot-Slack Google Calendar

Provides commands for creating & responding to events in Google Calendar, as well as checking resource status and booking resources. It also has the ability to remind users of upcoming events and notifying users when their events are updated.

Configuration

This script depends on the hubot-slack-google-auth script, which should com first in your external-scripts.json file. In addition to the environment variables described there, make sure HUBOT_GOOGLE_SCOPES variable contains https://www.googleapis.com/auth/calendar.

Webhooks

Calendar reminders & event updates depend on push notifications. For these to work, you'll need to register the domain of your hubot instance (should be the same as the HUBOT_URL env variable) in the developer console and verify ownership using webmaster tools. Whenever someone enables calendar reminders, the script will handle creating and renewing the webhook.

Resources

You can also query and book resources using this script by putting a calendar-resources.json file in your hubot's root directory. The format looks like this:

{
  // Key is the name of the "group" this resource belongs to, used in commands like:
  // "hubot what team rooms are available"
  "team room": {
    // Resource ID                                      // array of aliases for this resource
    "[email protected]": ["1 - HAL 9000", "team room 1", "team room one", "tr1", "tr 1"]
  },
  // ...
}

Usage

Creating events

  • hubot create event <quick add text> - create a new event on your primary calendar using the given quick add text.
  • hubot book <resource> for <quick add text> - creates an event (as above) and invites the given resource. Requires adding a calendar-resources.json file as described above. Resource name for this command can be any one of the aliases you defined.

Enable reminders

  • hubot enable calendar reminders - enable reminders for upcoming events and notifications when events are added/changed/removed. All reminders are sent via DM. Behind the scenes this sets up a webhook that will notify hubot whenever events are updated.
  • hubot disable calendar reminders - turns off event reminders and updates

Replying to events

Whenever hubot send you an event (after creating it, in a reminder, etc.) you can send the following commands to act on it:

  • hubot reply <yes/no/maybe> - RSVP to the event (if you're invited)
  • hubot invite <list of slack names> - invites the given Slack user(s) to the event

Querying resources

  • hubot what <resource group>s are available - tells you which resources in the given group (if any) are free for the next hour.

hubot-slack-gcal's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.