Hi folks.
I like to see how many downloads have each release of my plugin. So I’ve made a repo with an automated action that grab the numbers from the Obsidian repo once a day. Badges on the README are updated and a message is sent to telegram
Feel free to fork and make your own: GitHub - Superkikim/nexus_stats
Setting up the Telegram Bot
Before running the automation, you’ll need to create a Telegram bot to receive notifications:
- Create the bot: Open Telegram and message
@BotFather
- Start with
/newbot
and follow the prompts - Choose a name (e.g., “My Plugin Stats Bot”) and username (must end with “_bot”)
- Save the token BotFather gives you - this goes in GitHub Secrets as
TELEGRAM_BOT_TOKEN
- Get your Chat ID: Message
@userinfobot
with/start
to get your personal Chat ID - Test the bot: Send any message to your new bot to activate the conversation
Adding Secrets to GitHub
To keep your bot credentials secure:
- Go to your repository → Settings → Secrets and variables → Actions
- Click “New repository secret” and add:
- Name:
TELEGRAM_BOT_TOKEN
Value: (the token from BotFather) - Name:
TELEGRAM_CHAT_ID
Value: (your Chat ID from userinfobot)
- Name:
- Enable workflow permissions: Settings → Actions → General → “Read and write permissions”
The automation will send daily reports to this bot, which only you can see. Your token and Chat ID remain private in GitHub Secrets.