/inspirobot-slack

Inspirobot Slack integration

Primary LanguageJavaScriptMIT LicenseMIT

inspirobot-slack

Barebones, no dependencies, Node.js server to integrate inspirobot on slack.

Inspiration on the workplace is just a message away.

Build Status Test Coverage Maintainability npm version

Step 1: Deploy

Option 1: Host on Heroku

To deploy your own instance of inspirobot-slack on Heroku:

You can choose the deployment method you prefer, I suggest linking your app to GitHub and syncing upstream to be always up to date.

More on deploying with Heroku here.

Option 2: Use Docker (run everywhere)

Images for all project versions are available.

$ docker pull lorenzocestaro/inspirobot-slack
$ docker run -p 80:<EXTERNAL_PORT> lorenzocestaro/inspirobot-slack

Step 2: Create a Slack app

To add inspirobot to your Slack workspace:

API

Get an inspirobot quote url as a Slack message

Returns json data with the Slack's message.

  • URL: /quote
  • Method: POST`
  • Query parameters: None
  • Data parameters: None
  • Success Response:
    • Code: 200
    • Content:
      {
        "attachments": [
          {
            "image_url": "http://generated.inspirobot.me/095/aXm2323xjU.jpg"
          }
        ],
        "response_type": "in_channel",
        "text": "Get inspired!"
      }
  • Error Response:
    • Code: 500
    • Content: "Error message"