Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seratch/slack-custom-response-app
App demonstrating how to build something similar to Slack's custom response feature
https://github.com/seratch/slack-custom-response-app
bolt-python python slack slackapi slackbot
Last synced: 24 days ago
JSON representation
App demonstrating how to build something similar to Slack's custom response feature
- Host: GitHub
- URL: https://github.com/seratch/slack-custom-response-app
- Owner: seratch
- License: mit
- Created: 2023-09-14T09:13:43.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-14T09:15:11.000Z (about 1 year ago)
- Last Synced: 2024-08-25T00:53:08.436Z (2 months ago)
- Topics: bolt-python, python, slack, slackapi, slackbot
- Language: Python
- Homepage: https://slack.dev/bolt-python/
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Slack Custom Response App
This app demonstrates how to build something similar to Slack's custom response feature.
Once your app is installed in a Slack workspace, end-users can access the app's Home tab.
They can maintain custom responses there:Invite the app's bot user to the channels where you'd like to enable this app.
Now it's ready!
Whenever an end-user posts a message that contains a registered keyword in the channel, the app replies to it using the registered response text.## How to run the app
### Create a Slack app
Head to https://api.slack.com/apps and create a new app using app-manifest.yml in this repo.
### Generate SLACK_APP_TOKEN
Go to Settings > Basic Information > App-Level Tokens, and click the "Generate Token and Scopes" button.
You can generate a new token with the `connections:write` scope and save it as the `SLACK_APP_TOKEN` env variable when running your app.### Install the app into a Slack workspace
Go to Settings > Install App and click "Install to Workspace" button.
Once the installation completes, save the "Bot User OAuth Token" string as the `SLACK_BOT_TOKEN` env variable.## Run the app on your local machine
Please note that you need Python 3.6 or newer to run this app.
You can follow the steps below to start the app:```bash
export SLACK_APP_TOKEN=xapp-...
export SLACK_BOT_TOKEN=xoxb-...
pip install -r requirements.txt
python app.py
```Lastly, please don't forget to invite this app's bot user to the channels where you want to enable this app's responses.
## License
The MIT License