An open API service indexing awesome lists of open source software.

https://github.com/transcental/mailtale

Slackbot to manage subscriptions for my Hack Club community newsletter
https://github.com/transcental/mailtale

Last synced: 11 months ago
JSON representation

Slackbot to manage subscriptions for my Hack Club community newsletter

Awesome Lists containing this project

README

          

# Mail Tale

Mail Tale is the Slack bot to manage subscriptions for my Hack Club community newsletter!

## Setup

### Create a Slack App

1. Go to the [Slack API](https://api.slack.com/apps) and create a new app
2. Use the following manifest:
```json
{
"display_information": {
"name": "Mail Tale",
"description": "The tale of your mail is so beautiful",
"background_color": "#702eb3"
},
"features": {
"bot_user": {
"display_name": "Mail Tale",
"always_online": false
},
"slash_commands": [
{
"command": "/subscribe",
"url": "URL",
"description": "Subscribe to the #community-newsletter",
"should_escape": false
},
{
"command": "/subscription",
"url": "URL",
"description": "Manage your #community-newsletter subscription",
"should_escape": false
}
]
},
"oauth_config": {
"scopes": {
"bot": [
"commands",
"chat:write"
]
}
},
"settings": {
"event_subscriptions": {
"request_url": "URL",
"bot_events": [
"app_home_opened"
]
},
"interactivity": {
"is_enabled": true,
"request_url": "URL"
},
"org_deploy_enabled": false,
"socket_mode_enabled": false,
"token_rotation_enabled": false
}
}
```
3. Install the app to your workspace
4. Copy the bot token and signing secret

### Running the App

1. Clone the repository
2. Create a venv with `python3.12 -m venv .venv`
3. Activate the venv with `source .venv/bin/activate`
4. Install dependencies with `python3.12 -m pip install -r requirements.txt`
5. Create a `.env` file with the following variables:
- `SLACK_BOT_TOKEN`: The Slack bot token
- `SLACK_SIGNING_SECRET`: The Slack signing secret
- `PUB_CHANNEL_ID`: The public channel to log to
- `AIRTABLE_TOKEN`: The Airtable API token
- `AIRTABLE_BASE_ID`: The Airtable base ID
6. Run the bot with `python3.12 app.py`