Automated Plugin Analytics: Daily Download Stats via GitHub Actions + Telegram

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

:robot: Setting up the Telegram Bot

Before running the automation, you’ll need to create a Telegram bot to receive notifications:

  1. Create the bot: Open Telegram and message @BotFather
  2. Start with /newbot and follow the prompts
  3. Choose a name (e.g., “My Plugin Stats Bot”) and username (must end with “_bot”)
  4. Save the token BotFather gives you - this goes in GitHub Secrets as TELEGRAM_BOT_TOKEN
  5. Get your Chat ID: Message @userinfobot with /start to get your personal Chat ID
  6. Test the bot: Send any message to your new bot to activate the conversation

:locked_with_key: Adding Secrets to GitHub

To keep your bot credentials secure:

  1. Go to your repositorySettingsSecrets and variablesActions
  2. 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)
  3. 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.