Slack App template using Bolt
Note: May use Firebase Blaze Plan
Create a new firebase project in https://console.firebase.google.com/u/1/ and install firebase-tools.
$ npm install -g firebase-tools
$ firebase login
$ firebase use [project_id]
- Press
Create New App
in https://api.slack.com/apps - Press
Add a Bot User
inBot Users
- Press
Create New Command
inSlash Commands
:
- Command:
/hello
- Request URL:
https://asia-northeast1-[project_id].cloudfunctions.net/slack
- Short Description:
Hello world
- Press
Install App to Workspace
inInstall App
# Signing Secret in Basic Information
$ firebase functions:config:set slack.signing_secret=xxx
# Bot User OAuth Access Token in Install App
$ firebase functions:config:set slack.bot_token=yyy
Open Settings > Secrets
in a GitHub repository and set secrets as follows:
FIREBASE_TOKEN
: Firebase token withfirebase login:ci
FIREBASE_PROJECT_ID
: Firebase project IDSLACK_WEBHOOK_URL
: Incoming Webhook URL
$ cd functions
$ npm install
$ cd -
$ firebase deploy --only functions