rss-to-bot
rss-to-bot copied to clipboard
send your rss feed to telegram bot
rss to bot
Use Github Action to send your RSS feeds to Telegram bots.
USE
- Click
Use this templateto generate your own repository - Creat a new gist which should includes
feeds.txtandsent.json- Here is a gist example.
Settings->Secrets->Actions->New repository secretsto create:- Telegram's robot token
TG_TOKEN - The id
TG_CHAT_IDof your conversation with the bot - The time zone you are in
TIMEZONE. For exampleAsia/Shanghai GIST_IDused to store yourfeeds.txtandsent.jsonfilesGIST_TOKENis used to update the gist, Generate
- Telegram's robot token
FAQ
How to get TG_CHAT_ID
You can run the following code locally, then send /start to the robot.
const TelegramBot = require('node-telegram-bot-api')
const token = 'xxxxx'
const bot = new TelegramBot(token, { polling: true })
let chatId = null
bot.onText(/\/start/, (msg) => {
chatId = msg.chat.id
console.log('chatId:', chatId)
bot.sendMessage(chatId, chatId)
})
How to modify the frequency of sending subscriptions
Edit the content of - cron: '0 7,12,17,22 * * *' in the .github/workflows/main.yml file, the default meaning is that it will be executed at 7,12,17,22 o'clock every day.