Skip to content
A Slack bot for bridging between Slack channel and Google Home. Google Home read a message on the channel.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE.md
README.md
device-settings.sample.json
index.js
package-lock.json
package.json

README.md

Slack -> Google Home bridge

Background

I wanted to listen notifications arrived in Slack channels through Google Home.

What is this?

This is a minimum capability of Slack bot to transmit messages in the specific channel to Google Home - Amazon Polly bridge.

Pre-requirements

  1. Google Home - Amazon Polly bridge must be running.
  2. A Slack Bot API Token for your organization.

Setup

  • Create device-settings.json file. (you can copy device-settings.sample.json and modify few lines.)
    • A key is a Slack channel ID.
    • A value is a map object with device, voice, lang, type. See the Google Home - Amazon Polly bridge doc for more details.

Docker

  • Build a Docker image.
  • Run the image with environment variables.
docker build -t slack-google-home-bridge .
docker run --net=host \
-e "SLACK_TOKEN=abcdefg1234567890xyz" \
-e "BRIDGE_URL=http://localhost:8080/" \
--restart=on-failure
slack-google-home-bridge

Local

  • Specify environment variables (or create .env file based on the template)
  • Then, run the following two commands.
npm install
npm start

Variables

Environment Variables

All of these environment variables are required.

Variable Sample Note
SLACK_TOKEN abcdefg1234567890xyz Slack Bot API Token
BRIDGE_URL http://localhost:8080/ An endpoint URL of Google Home - Amazon Polly bridge

Usage

  • Just send a message to the Slack channels you specified in device-settings.json
  • To customize rules for handling incoming messages, or to modify messages before transmit to Google Home, edit codes inside controller.hears() method in index.js.
You can’t perform that action at this time.