Use Github Action to send your RSS feeds to Telegram bots.
- Click
Use this template
to generate your own repository - Creat a new gist which should includes
feeds.txt
andsent.json
- Here is a gist example.
Settings->Secrets->Actions->New repository secrets
to create:- Telegram's robot token
TG_TOKEN
- The id
TG_CHAT_ID
of your conversation with the bot - The time zone you are in
TIMEZONE
. For exampleAsia/Shanghai
GIST_ID
used to store yourfeeds.txt
andsent.json
filesGIST_TOKEN
is used to update the gist, Generate
- Telegram's robot token
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)
})
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.