A Matrix bot that posts content from RSS (and Atom) feeds.
Find a file
2025-11-13 15:50:55 -07:00
src add better error handling 2025-11-13 15:50:55 -07:00
Cargo.lock add Atom feed support 2025-11-12 21:54:14 -07:00
Cargo.toml add Atom feed support 2025-11-12 21:54:14 -07:00
config.example.ron add an example config 2025-11-12 21:07:57 -07:00
README.md Update README.md 2025-11-13 17:20:37 +01:00

Matrix RSS Reader

Despite the name, this is a Matrix bot that can post alerts for both RSS and Atom feed updates!

This means it can send automated, customizable messages when, say, a blog post comes out, when a specific Youtube channel releases a video, or when a news article is posted.

Setup

You need to have a Matrix account the bot can login to. It can be on any homeserver!

You will also need to install Rust.

Then, you can run these commands:

git clone https://codeberg.org/stormyyy/matrix-rss-reader
cd matrix-rss-reader

Configuration

Rename config.example.ron into config.ron.

You will notice a variety of customizable fields in the file. These can be tuned to your liking.

Base Configuration:

  • homeserver: the homeserver the bot's user account is on.
  • trusted_homeservers: the bot will automatically accept a room invite from any member of these homeservers.
  • username: the bot's username
  • password: (optional) the bot's password. To disable, make it None rather than Some("password").
  • access_token: (optional) a really long string that can be used for authentication. To disable, make it None rather than Some("token").
  • interval: how often, in seconds, the bot will check the configured RSS feeds.
  • feed_path: the directory where already-seen feed items will be saved, to avoid duplicate messages.
  • bridges: a Vec (array) of Bridge structs.

Bridge Configuration:

  • name: a name to help you identify the bridge in the config, and also to go into the file names.
  • feed_url: a URL that points to either an RSS or Atom feed.
  • room_id: the ID of the room you want feed updates to be posted to. (Not an alias; this starts with a !, not #).
  • message_template: a template of the message that will be sent, in HTML. Currently available fields:
    • {{TITLE}}
    • {{DESCRIPTION}}
    • {{LINK}}
    • {{PUB_DATE}}
    • {{AUTHOR}}

Note: if you use configure neither the password nor access_token fields, the bot will look for the MATRIX_PASSWORD environment variable. If that doesn't exist, it will default to using the password "password".

Usage

Edit the configuration to be how you like.

Then you can run the command cargo run and your bot should be working.

Credits

Thanks to the original Python-based bot this was heavily inspired by: https://gitlab.com/matrix-rss-bridge/matrix-rss-bridge