A GitHub Actions bot that monitors the THOR Collective Dispatch RSS feed and posts new articles to Discord.
- 🔄 Hourly Monitoring: Checks for new Dispatch posts every hour
- 📰 RSS Feed Integration: Monitors https://dispatch.thorcollective.com/feed
- 💬 Discord Integration: Posts formatted updates to Discord channel
- 🤖 Bot API: Uses Discord bot instead of webhooks for reliable posting
- 🛡️ Error Handling: Comprehensive error handling with Discord notifications
- GitHub repository with Actions enabled
- Discord bot with access to target channel
Add these secrets to your GitHub repository:
-
DISCORD_BOT_TOKEN: Your Discord bot token
- Create bot at: https://discord.com/developers/applications
- Generate token in Bot section
-
DISPATCH_CHANNEL_ID: Your Discord channel ID (optional)
- Right-click channel → Copy Channel ID
- Default: Uses the channel from original n8n workflow
- Clone the repository:
git clone https://github.com/yourusername/dispatch-discord-bot.git
cd dispatch-discord-bot- Install dependencies:
pip install -r requirements.txt- Set environment variables:
export DISCORD_BOT_TOKEN="your_bot_token"
export DISCORD_CHANNEL_ID="your_channel_id"- Run in dry-run mode:
DRY_RUN=true python -m src.mainThe bot runs automatically every hour via GitHub Actions.
You can manually trigger the workflow:
- Go to Actions tab in your GitHub repository
- Select "THOR Collective Dispatch Monitor" workflow
- Click "Run workflow"
- Optionally enable dry-run mode
Posts are formatted to match the original n8n workflow:
**New THOR Collective Dispatch Post!** 🚀
[Article Title](https://dispatch.thorcollective.com/post-url)
Article preview content...
dispatch-discord-bot/
├── .github/
│ └── workflows/
│ └── dispatch-monitor.yml # GitHub Actions workflow
├── src/
│ ├── main.py # Main orchestrator
│ ├── config.py # Configuration
│ ├── rss_handler.py # RSS feed processing
│ └── discord_poster.py # Discord bot integration
├── requirements.txt # Dependencies
├── .gitignore # Git ignore rules
└── README.md # Documentation
Default: https://dispatch.thorcollective.com/feed
To change the feed, edit DISPATCH_RSS_URL in src/config.py.
Default: Every hour
To change frequency, edit the cron expression in .github/workflows/dispatch-monitor.yml:
schedule:
- cron: '0 * * * *' # Every hour at minute 0The bot will post to the channel specified in DISCORD_CHANNEL_ID environment variable.
- Check GitHub Actions is enabled
- Verify bot token is configured
- Review workflow logs for errors
- Verify bot token is valid and bot is in server
- Check bot has permission to send messages in target channel
- Ensure channel ID is correct
- Verify the Dispatch RSS feed is accessible
- Check if new posts are available in the feed
- Review logs for RSS parsing errors
This bot replicates the functionality of the n8n "Dispatch -> Discord" workflow:
- ✅ Hourly RSS feed monitoring
- ✅ Same Discord message format
- ✅ Same target channel (configurable)
- ✅ Error handling and notifications
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
MIT License - See LICENSE file for details