telegram-to-rss

Telegram To RSS

Generate an RSS feed from your Telegram Channel.

Banner image

Why did I make this?

I run a personal website and want it to be a centralized place where I can have everything I ever published on the web. I also don’t want to have a telegram integration on that website and prefer having a unified way of accessing my web artifacts.

With this project I can turn my Telegram channel posts into an RSS feed and parse it on my personal website.

How does it work?

This Project is consisted of two distinct services:

Telegram Bot Handler

This service listens to messages on the discussion group chat of your channel.

When you post a message on your channel, Telegram will automatically forward the message to the corresponding discussion group, then the bot will process the message and update the RSS feed accordingly.

Express File Server

When the Bot Handler receives the message and updates the RSS Feed, it writes an rss.xml file in the public/ directory which is served by the express static file server.

Thus you can access the RSS feed via: <SERVER_URL>/rss.xml.

Getting Started

In order to use this project, you need:

Afterwards, clone the project and install the dependencies:

git clone https://github.com/rasjonell/telegram-to-rss
cd telegram-to-rss
npm install

Configuration

Follow the .env.example file to setup your environment.

Note: You need to create separate .env.{NODE_ENV} files for each environment(i.e. .env.dev will be used when testing locally)

Name Type Description
PORT Number File Server Port
GROUP_ID String Your Channel ID
BOT_TOKEN String Your Bot’s API key
GROUP_USERNAME String Your Channel Username
AUTHOR String RSS Feed Author Name
WEBSITE_HOST String URL Of The RSS Feed Host Website

Available Scripts

TODOs