Alexa skill to set status and manage notifications in Slack, built in Node and hosted on AWS Lambda.
- "Alexa, tell Slack I'm
time", sets the status message to the spoken status and mutes Slack notifications until the spoken time (e.g. 3:15 pm, this afternoon, etc.) Super useful for meetings! For example, "tell Slack I'm in a call until 5:00 pm".
- "Alexa, tell Slack to clear my status", clears your status and un-mutes notifications.
I can't release this on the Alexa Skills store because I don't have the right to use "Slack" as the invocation name for a public skill, but feel free to fork this repo and set it up as your own skill in development mode for private use. It'll take a bit of work, but you'll have to:
- Set up a new Slack app, with the
- Set up an Alexa Skills Kit skill. Use the code in
interaction_model.jsonfor the skill's interaction model.
- Set up a project in the Google Developer Console. Enable the Google Maps Geocoding API and the Google Maps Time Zone API, and get an API key. (This is how we determine the user's time zone: get the postal code of the Echo, geocode it to a lat/long pair, then get the timezone offset of those coordinates. I wish Amazon made this easier.)
- In the configuration tab, set up account linking using your Slack app's OAuth information. (Pro tip: the "Client Authentication Scheme" option should be "Credentials in request body").
- Also in the configuration tab, check the option to request permission to use "Device Address", specifically the device's postal code & country.
- Set up an AWS Lambda function for your Alexa skill. You'll need to set up an
ALEXA_APP_IDenvironment variable with your skill's ID; and a
MAPS_API_KEYenv variable with the Google Maps API key you got earlier.
- Clone/fork this repo, run
npm install, then zip up
package.json, and the
node_modulesfolder, and upload to your Lambda function.
- Enable your skill for testing, then enable it in your Alexa app in your phone. Make sure your Echo has an address set up, and give the skill permission to access it. It should prompt you to sign in with Slack to link your account. If it successfully links your account, you're set!