Skip to content

A Slack App template using Bolt

License

Notifications You must be signed in to change notification settings

daiwahome/slack-app-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slack-app-template

CI CD

Slack App template using Bolt

Usage

Note: May use Firebase Blaze Plan

Setup firebase project

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]

Create a Slack app

  1. Press Create New App in https://api.slack.com/apps
  2. Press Add a Bot User in Bot Users
  3. Press Create New Command in Slash Commands:
  • Command: /hello
  • Request URL: https://asia-northeast1-[project_id].cloudfunctions.net/slack
  • Short Description: Hello world
  1. Press Install App to Workspace in Install App

Set credentials

# 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

Set secrets for GitHub Actions

Open Settings > Secrets in a GitHub repository and set secrets as follows:

  • FIREBASE_TOKEN: Firebase token with firebase login:ci
  • FIREBASE_PROJECT_ID: Firebase project ID
  • SLACK_WEBHOOK_URL: Incoming Webhook URL

Setup node

$ cd functions
$ npm install
$ cd -

Deploy functions Manually

$ firebase deploy --only functions

Links

About

A Slack App template using Bolt

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published