Coder Social home page Coder Social logo

slackbot's Introduction

Build a scheduler Slack bot!

Build a Slack bot slash command that adds events to your personal calendar!

/scheduleme "Chocolate chip cookie competition" "Sunday at 2pm" "Sunday at 4pm"

Slack bots are fun ways to add new functionality into your Slack workspace. Using the Nylas API, you can create a bot
with email, contacts or calendar functionality. In this tutorial, you are going to create a scheduler bot that adds events to your personal calendar with a simple Slack slash command. We’ll dive into the nitty gritty of how to build a Slack bot from scratch.

Checkout this post for the full instructions!

What You’ll Need Beforehand

There are a few technologies that we need to have in place before we embark on this DIY Slack bot journey!

  • Git and Github account
  • Heroku account
  • Slack workspace
  • An email address associated with a Google, iCloud, or Microsoft calendar
  • A text editor of your choosing — PyCharm, Atom, Vim, Sublime, etc.

Overview

Part 0: Basic app setup

TLDR; Fork the starter code, run the setup script and run the app locally

Part 1: Hook your repo up to Heroku and deploy it

TLDR; Create a Heroku app, hook it up to your Github repo, deploy it

Part 2: Set up Heroku config variables

TLDR; Auth an account with Nylas to get the access token, use this to get the ID of the calendar, add these plus the calendar timezone as config variables in Heroku.

Part 3: Connect your app to your Slack workspace

TLDR; Create a Slack App and configure a slash command to communicate with your app, add a route in your app that listens for the slash command

Part 4: Add text parsing functionality

TLDR; Parse the text sent from Slack into meaningful components for an event

Part 5: Build scheduling functionality

TLDR; Send the parsed arguments to the /events endpoint of the Nylas API to create an event on your calendar.

slackbot's People

Contributors

annielcook avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.