Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seratch/bolt-on-cloud-functions-for-firebase
Read this issue first - https://github.com/slackapi/bolt/issues/361
https://github.com/seratch/bolt-on-cloud-functions-for-firebase
bolt cloud-functions-for-firebase slack slack-api slack-bot
Last synced: about 2 months ago
JSON representation
Read this issue first - https://github.com/slackapi/bolt/issues/361
- Host: GitHub
- URL: https://github.com/seratch/bolt-on-cloud-functions-for-firebase
- Owner: seratch
- License: mit
- Created: 2019-07-15T05:00:54.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-09T19:28:35.000Z (almost 2 years ago)
- Last Synced: 2024-10-13T17:45:38.014Z (2 months ago)
- Topics: bolt, cloud-functions-for-firebase, slack, slack-api, slack-bot
- Language: JavaScript
- Homepage: https://github.com/slackapi/bolt/issues/361
- Size: 219 KB
- Stars: 24
- Watchers: 2
- Forks: 4
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Bolt app running on Cloud Functions for Firebase
This is a simple Bolt app which runs on Cloud Functions for Firebase.
* https://slack.dev/bolt-js/
* https://firebase.google.com/docs/functions## Setup
Use node 12.x and its corresponding npm.
```bash
cp _firebaserc .firebaserc
vi .firebaserc # set your own projectnpm install -g firebase-tools
firebase login
firebase functions:config:set slack.signing_secret=xxx
firebase functions:config:set slack.bot_token=xoxb-111-111-xxx
```## How to run the app on your laptop
```bash
cd functions
npm i
cd -
firebase functions:config:get > .runtimeconfig.json
firebase serve
```## How to deploy
```bash
firebase deploy
```## How to configure Slack apps/Firebase
### Slack App
https://api.slack.com/apps
* Set `https://{your domain}.cloudfunctions.net/slack/events` as the Request URL for `/echo-from-firebase` slash command.
* Add `commands`, `chat:write` scopes
* Install the app to your development workspace### Cloud Functions for Firebase
You have nothing to configure. Don't forget enabling the billing info if it's your first time to use it.
## How to make sure if it works
* Go the development Slack workspace
* Invite the bot user to a channel
* Run `/echo-from-firebase` in the channel
* Verify the bot replies to you - You said "xxx"## LICENSE
The MIT License