Coder Social home page Coder Social logo

slash-brady's Introduction

slash-brady

Slash command in Slack which adds a line of text to a user specified file (e.g. /brady add custom emoji! adds 'add custom emoji!' to my todo list)

Requirements

  • Node.js
  • Slack API token (and a Slack account)
  • A secret password to use only for this integration (e.g. md5 hash of your father's maiden name)
  • A heroku account and the heroku command line utility installed
  • File id for a snippet on Slack (open the snippet in your browser -- you should see a file id in the url, it will look similar to 'F02554SF8')
  • 5 minutes of your time

Guide

  1. Clone source 'git clone https://github.com/bradya/slash-brady.git'
  2. Install node dependencies 'npm install'
  3. Create heroku app 'heroku create' and remember this subdomain!
  4. Push to heroku 'git push heroku master'
  5. Make sure at least 1 dyno is running 'heroku ps:scale web=1'
  6. Add a new slash command to slack at https://my.slack.com/services/new/slash-commands with your url constructed like below
  7. Add two config variables to your heroku app 'heroku config:add slack_token=API-TOKEN' and 'heroku config:add slack_secret=SECRET-PASSWORD' replacing API-TOKEN and SECRET-PASSWORD with applicable values.
  8. Anyone on your team can now type in your slash command in Slack and it should work! Ping me on Twitter if you run into any issues @bradyy

URL construction

http://yourappsubdomain.herokuapp.com/FILE-ID/SECRET-PASSWORD

In the end, it should look like this:

http://slackslashcommand.herokuapp.com/F02554SF8/1bf984e94f0a31773aaaacd293e01fdd

slash-brady's People

Contributors

bradya avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

romeopatrick11

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.