Skip to content
This repository has been archived by the owner on May 5, 2024. It is now read-only.

Latest commit

 

History

History
47 lines (29 loc) · 1.6 KB

README.md

File metadata and controls

47 lines (29 loc) · 1.6 KB

Serverless Framework Openwhisk Slack Slash Command Example

This project is a simple example of creating a serverless/openwhisk-based function to be invoked by a Slack slash command. For this example, we will be using a free API to get a random famous quote via Mashape.

example usage

Requirements

Openwhisk Setup

In order to deploy this project to OpenWhisk, you will need to follow the quickstart guide.

Mashape API Key

You will need a Mashape API key, signup and export your key:

$ export MASHAPE_API_KEY=<your-mashape-api-key>

Initial Slack Setup

slack setup

Create a new Slack slash command for your Slack team. Make note of the secret token. Set the method to GET and keep the window open, we will fill in our OpenWhisk web action's URL after deployment.

$ export SLACK_TOKEN=<your-slack-slash-cmd-token>

Deployment

To deploy the project after OpenWhisk setup is complete:

$ make deploy

Post-deploy

Go back to the Slack slash command editing page and insert the URL for your web action.