Slack Bot for Redash

by yamitzky

GitHub Readme.md

Slack Bot for Redash

This is slack bot for Redash.

Features

  • Take a screen capture of visualization
    • Bot can handle message format like @botname <visualization URL>
      • example: @redashbot https://your-redash-server.example.com/queries/1#2

screenshot.png

How to develop

Clone this repository, then

$ npm install
$ export REDASH_HOST=https://your-redash-server.example.com
$ export REDASH_API_KEY=your-redash-api-key
$ export SLACK_BOT_TOKEN=your-slack-bot-token
$ node index.js

How to deploy to Heroku

You can easy to deploy redashbot to Heroku, just click following button.

Deploy

Environment variables

SLACK_BOT_TOKEN (required)

Slack's Bot User Token

REDASH_HOST and REDASH_API_KEY (optional)

Redash's URL and its API Key.

REDASH_HOST_ALIAS (optional)

Redash' URL accessible from the bot.

REDASH_HOSTS_AND_API_KEYS (optional)

If you want to use multiple Redash at once, specify this variable like below

REDASH_HOSTS_AND_API_KEYS="http://redash1.example.com;TOKEN1,http://redash2.example.com;TOKEN2"

or if you need to specify REDASH_HOST_ALIAS for each Redash, like below

REDASH_HOSTS_AND_API_KEYS="http://redash1.example.com;http://redash1-alias.example.com;TOKEN1,http://redash2.example.com;TOKEN2"

SLACK_MESSAGE_EVENTS (optional)

Message events this bot reacts. Available values are listd in https://github.com/howdyai/botkit/blob/master/readme-slack.md#message-received-events Its default is direct_message,direct_mention,mention