DEV Community

Cover image for I Built a Daily JavaScript Quote Bot with GitHub Actions (No Server Required)
Sushant Rahate
Sushant Rahate

Posted on

I Built a Daily JavaScript Quote Bot with GitHub Actions (No Server Required)

DEV Weekend Challenge: Community

This is a submission for the DEV Weekend Challenge: Community

๐Ÿ‘‰ Join the Telegram channel: https://t.me/jsdailybyte

The Community

JS Daily Byte was built for a Telegram Channel of developers who want to stay sharp on JavaScript fundamentals.

We didnโ€™t need another course.
We didnโ€™t need long threads.

We just needed one clear JavaScript concept, delivered daily.

Simple. Focused. Practical.

What I Built

JS Daily Byte is a fully automated Telegram bot powered by GitHub Actions.

Every day at 13:00 UTC, it:

  • Reads a quotes.json file
  • Picks a deterministic quote based on the current date
  • Formats it safely for Telegram
  • Sends it to the JS Daily Byte channel

No servers.
No hosting.
No cron jobs on a VPS.
No backend deployment.

Just GitHub + Telegram API.

Example message:

๐ŸŸก JS Daily Byte

โ€œEvery JavaScript program runs inside an execution context with two 
phases: memory creation and code execution.โ€
Enter fullscreen mode Exit fullscreen mode

Demo

๐Ÿ”— Telegram Channel:
https://t.me/jsdailybyte

Telegram Channel

(Every day a new JavaScript concept drops automatically.)

Code

The entire project is open on GitHub:

๐Ÿ‘‰ https://github.com/sushantrahate/js-daily-byte

Key files:

quotes.json - Stores all JavaScript concepts in a simple array format.
.github/workflows/js-daily-byte.yml - GitHub Action that runs daily and handles the entire automation flow.

How I Built It

The stack is intentionally minimal:

  • GitHub Actions โ†’ daily scheduler (cron at 13:00 UTC)
  • Node.js (inline script) โ†’ reads JSON + generates deterministic index
  • Telegram Bot API โ†’ sends formatted message
  • Secrets โ†’ bot token + chat ID stored securely

Why GitHub Actions?

Because:

  • Itโ€™s free
  • Itโ€™s reliable
  • It removes infrastructure complexity

The workflow:

  1. Loads the quotes array from quotes.json
  2. Generates a deterministic index using the current UTC date
  3. Selects the corresponding quote
  4. Escapes HTML to ensure Telegram-safe formatting
  5. Sends the formatted message to the Telegram channel via the Bot API using curl.

No database.
No server.
No maintenance.

The entire setup takes under 30 minutes.
Perfect for a small but meaningful weekend hack. ๐Ÿ˜‰

Build Your Own in 5 Steps

  1. Create a Telegram bot (via @ BotFather)

    • Open Telegram and search @ BotFather
    • Run /newbot
    • Set a name (example: JS Byte Bot) and a username ending with bot
    • Copy the API token BotFather gives you (this becomes TG_BOT_TOKEN)
  2. Create a Telegram channel and add the bot

    • Create a channel (example: JS Daily Byte)
    • Add your bot to the channel
    • Make the bot an admin so it can post messages
  3. Get your Telegram chat_id

    • Send a message in the channel (or mention the bot like @ YourBot hi)
    • Open this URL in a browser: https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates
    • Copy the chat.id value (usually starts with -100...) This becomes TG_CHAT_ID
  4. Add your quotes

    • Create quotes.json in the repo root
    • Store quotes as a simple array of strings, like: ["quote 1", "quote 2", "quote 3"]
  5. Add the GitHub Actions workflow

    • Create .github/workflows/js-daily-byte.yml
    • Add a scheduled cron job (example: 0 13 * * * for 13:00 UTC)
    • Workflow will:
      • read quotes.json
      • pick the quote for the day
      • send it using Telegram Bot API via curl
  6. Add GitHub Secrets (required)

    • Repo โ†’ Settings โ†’ Secrets and variables โ†’ Actions โ†’ New repository secret
    • Add:
      • TG_BOT_TOKEN = your BotFather token
      • TG_CHAT_ID = your channel chat id

After that, the bot runs daily automatically. You can also trigger it anytime from the Actions tab using workflow_dispatch.

Thatโ€™s it.

Final Thoughts

JavaScript fundamentals arenโ€™t difficult because theyโ€™re complex.
Theyโ€™re difficult because we forget them.

JS Daily Byte keeps these concepts fresh - one small reminder at a time.

You can find more of my work at: https://sushantrahate.com/

Happy coding! ๐Ÿ˜„

Top comments (0)