https://github.com/roger-king/slack-twitter-bot
A simple slack channel events listener to post things to twitter
https://github.com/roger-king/slack-twitter-bot
bot notifications python python-twitch-api python3 slack-api slack-python twitter-bot
Last synced: 2 months ago
JSON representation
A simple slack channel events listener to post things to twitter
- Host: GitHub
- URL: https://github.com/roger-king/slack-twitter-bot
- Owner: roger-king
- Created: 2021-12-03T11:52:17.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-05T23:42:07.000Z (over 3 years ago)
- Last Synced: 2025-02-01T02:25:14.547Z (4 months ago)
- Topics: bot, notifications, python, python-twitch-api, python3, slack-api, slack-python, twitter-bot
- Language: Python
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# slack-twitter-bot
A simple python service to listen to a slack channel and tweet it text.
# Usage
_Note_: This will tweet everything in the desired channels. It will not ignore replies (threads) or direct message or reply in thread.
Some fun ideas this can be used for:
- Tweeting updates about a service outage. This can be consolidated to relay from your slack alerts.
## Environment variables:
| ENV_NAME | VALUE | DESCRIPTION | REQUIRED |
| ------------- | ------------- | ------------- | ------------- |
| TWITTER_API_KEY | string | Twitter Consumer API Key | True |
| TWITTER_API_SECRET_KEY | string | Twitter Consumer Secret Key | True |
| TWITTER_ACCESS_TOKEN | string | Twitter Access Token | True |
| TWITTER_ACCESS_SECRET | string | Twitter Access Secret Key | True |
| SLACK_CHANNELS | comma-separated string | Slack Channel IDs you wish the service to listen to. | True |
| HASHTAGS | comma-separated string | Hashtags you wish to append to the tweet. | False |## Development
### Pre-requisites
- Python3.9.8^
- set `.env` file with above environment variables
- Poetry dependency management
- Slack App and endpoint configured to `http://{host}/api/slack`
- Twitter Application keys configured```bash
poetry run python run.py
```## Future Features
- Retweet reply responses from a thread to original post.