2 bots · $0 a month · no server

Two Telegram bots on GitHub Actions

AIUB Notice Bot posts each new university notice, sorted and summed up in one line. Email Trucker sends a digest of new Gmail. Both run on a schedule, with no server or database.

The bot’s README with an example Telegram message for an exam seat plan notice

AIUB Notice Bot, 4 steps a run

Each run takes seconds on a fresh GitHub runner.

  • Scrape

    Reads the notices list on AIUB’s site with BeautifulSoup

    scraper.py
  • Skip what was seen

    Checks each notice against seen.json, so nothing is sent twice

    seen.json
  • Classify

    GitHub Models picks 1 of 8 categories and writes a one-line summary

    classifier.py
  • Notify and save

    Sends one Telegram message per notice, then commits its state

    notifier.py

Read the code on GitHub

GitHub Actions history for the notice bot: 592 scheduled runs, each passed, most in under 20 seconds

4 scheduled runs a day, never 2 at once

Runs at 09:00, 13:00, 17:00 and 21:00

The workflow’s cron lines, with the Dhaka time beside each one.

YMLcheck-notices.yml cron
on:
  schedule:
    - cron: '0 3 * * *'  # 09:00 Dhaka
    - cron: '0 7 * * *'  # 13:00 Dhaka
    - cron: '0 11 * * *' # 17:00 Dhaka
    - cron: '0 15 * * *' # 21:00 Dhaka
GitHub cron runs in UTC: each Dhaka time is written 6 hours earlier.

Queues runs behind one in progress

A concurrency group stops two runs from racing on the saved state.

YMLcheck-notices.yml 1 run
permissions:
  contents: write
  models: read

# Never let two runs overlap
concurrency:
  group: ${{ github.workflow }}
  cancel-in-progress: false
A second run waits in line behind the first.

Questions about the bots

What happens when a site changes, a run fails or the inbox is busy.

See the bots on the home page

What if AIUB changes its notices page?

If a scrape finds no notices, the run stops with an error and keeps the old state, so a new layout cannot wipe the history.

What if fifty old notices look new?

A flood guard sees the burst and records them quietly instead of sending fifty messages.

Why does each run commit to GitHub?

The commit saves seen.json and a heartbeat file. The heartbeat keeps GitHub from turning the schedule off after 60 days.

Does Email Trucker mark mail as read?

No. It opens the inbox read-only over IMAP and checks at 17 minutes past each hour, away from the busy top of the hour.

What do the bots cost to run?

Nothing. Actions minutes are free on a public repository, and about 20 model calls a day fit the free tier of 150.