← Home

Song Bot

I continue my vibe coding escapade with my first bot: a song-of-the-day Telegram bot that automatically sends a tasty track to subscribers every morning to enjoy with coffee.

First the Music

Before any bot building, I curated a set of my favorite songs of all time—a revelatory exercise that clarified my tastes: lots of classic rock and folk-rock from the ’60s-‘80s golden era, plus generous helpings of singer-songwriters, soul/R&B, and live tracks. Christmas music (both sacred and secular) bookends the calendar from early December through early January, confirming what I previously discussed: I do love the season. I aimed for artist diversity (no more than six tracks each) and gravitate toward deep cuts—so if you recognize a hit here, it’s because it’s genuinely great. But as Grandpa Brennan was wont to say, de gustibus non est disputandum.

Bot Building

This was a product of Claude (Sonnet 4.5). Admittedly, it didn’t get everything perfect on the first pass, but it sure took my abrasive feedback in stride. The process wasn’t totally linear, but it went something like this:

  1. Learn about Telegram bots
  2. Set up and configure the bot
  3. Create the initial daily song workflow
  4. Debug some “ES module” issues1
  5. Add self-service subscriptions
  6. Test and fix
  7. Refine (message formatting, etc.)

Failing Telegram workflowsFail, fail, fail, success, fail, fail...

The Setup

Here’s what I ended up with:

  1. Telegram Bot – Created via @BotFather w/ token stored as GitHub secret. Users subscribe themselves.
  2. Data Source (_data/daily_song.yml) – My impeccably-curated list of 366 songs2 with date, track title, artist, and YouTube Music song ID.
      - date: "12-09"
        track: "Christmas Is Coming"
        artist: "Vince Guaraldi Trio"
        songId: "2--a88MKHZc"
    
  3. GitHub Actions Workflows
  4. Rinse and repeat – Repeats daily, fully automated via GitHub Action with no servers or hosting costs.

bot notification

You’re lookin’ at a few options here

  1. Subscribe so that we can know the joy of experiencing the same songs together on the very same days. (Then just sneak out with an /unsubscribe if you’re not feelin’ my jams.)
  2. Get the same song of the day via the today page if you’re more of pull person than a push person.
  3. Make your own SOTD bot by cloning these workflows and .yml files from my GitHub repo. I’ll subscribe.

Bottom line

It’s astonishing that a non-coder like moi can go from idea to fully functional Telegram bot with auto-subscriptions in one sub-100-message chat session—that there’s some right-fine vibe codin’…at least for the standards of late 2025 (I’m sure it’ll seem quaint in a year or two).

— ᴘ. ᴍ. ʙ.

  1. This is the type of arcana that’s over my head and so I’m totally reliant on the LLM to diagnose and fix: Node.js was trying to run our script as an ES Module (basically new JavaScript) (which doesn’t allow require()), but the thing was written in old Javascript (i.e., CommonJS style), so got this error about “require is not defined in ES module scope.” So the fix—after a number of back-and-forths—was renaming the file to .cjs (CommonJS file extension) and wrapped the await in an async function, which told Node: “Hey, this is old-style CommonJS, not modern ES Modules.” 🤓 

  2. Yes, leap year support built in. 

First published: 2025-11-21 | tweet | cast | subscribe

tech music product

← back to all posts