Code Monkey home page Code Monkey logo

slack-o365-calendar's Introduction

slack-o365-calendar

Build Status

This little Slack Bot connects your Office 365 Calendar with your team Slack account to check if you're out of office. To set yourself 'out of office' simply place a meeting on your calendar with the subject 'OOO' or 'OOF' and this bot will let any teammates who @mention you that you're out of of office.

Configuration (.config.json)

Create a file called .config.json and fill it out with your application secrets. You can also make each property an environment variable.

{
  // The client ID provided for the Office 365 application
  "clientID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  // Client secret from the registration process for the Office 365 application
  "clientSecret": "someSecret",
  // MongoDB connection string
  "mongo_connection": "<mongodb connection string>",
  // Slack application token
  "slack_token":"slack-token-here",
  // --- SNIP: Below configuration elements are for developers and power users ---
  // Return URL after the OAuth handshake has completed; safe to leave default
  "returnURL": "http://localhost:3000/auth/openid/return",
  // set to true for Azure Active Directory
  "skipUserProfile": true,
  // Metadata to use for the OAuth configuration with Azure 
  "identityMetadata": "https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration",
  // Use code-based authentication
  "responseType": "code",
  // Use the HTTP POST verb in the OAuth response instead of HTTP GET 
  "responseMode": "form_post",
  // Realm to submit to OAuth
  "realm": "http://outlook.office.com/",
  // Automatically reconnect if we lose connection to Slack
  "slack_autoReconnect": true,
  // Automatically mark bot as away/active based on activity
  "slack_autoMark": true
}

API Keys

Head over to the Office Dev Center for an office API key and secret. Then grab your key and secret for a Slack bot by heading over to the slack bot page

Running

To run the app just do npm start, navigate to http://localhost:3000/login to authenticate to your Office 365 account. Create an event on your calendar - marking your vacation time with 'OOO' or 'OOF' in the title and an optional message in the event body. This slack bot will do the rest - letting your teammates know when you're out of office.

slack-o365-calendar's People

Contributors

ritazh avatar tobybrad avatar

Watchers

Kajsa Anderson avatar

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.