Back to projects

CSE '23 Birthday Bot

A $0/month automated bot that detects batchmates' birthdays daily and posts a personalized photo flyer to Telegram and Discord — no manual steps.

  • Python
  • GitHub Actions
  • OpenCV
  • Automation
  • Telegram API
  • Discord API

Overview

🎂 Automated Birthday Flyer Bot

A fully automated birthday celebration system that generates personalized flyers and posts them to Telegram and Discord every birthday — with zero infrastructure cost.


🚀 What it does

Every day at 12:00 AM (Sri Lanka Time), a scheduled GitHub Actions workflow checks a list of approximately 200 classmates' birthdays.

When it finds a birthday, it automatically:

  1. 🔍 Detects and crops the person's face from their photo.
  2. 🎨 Composites the cropped image into a pre-designed birthday flyer with their name.
  3. 📤 Publishes the completed flyer with a birthday caption to both Telegram and Discord.

Everything runs automatically using GitHub Actions — no servers, manual intervention, or hosting costs.


✨ Key Features

  • 🎉 Fully Automated

    • Daily scheduled execution with no manual triggering.
  • 🖼️ AI-Assisted Image Processing

    • Detects and crops faces automatically using OpenCV.
    • Falls back to a centered crop if face detection fails.
  • 📢 Multi-Platform Delivery

    • Posts birthday flyers simultaneously to:
      • Telegram
      • Discord
  • 🕛 Accurate Sri Lankan Timezone Support

    • Correctly computes the current date in Asia/Colombo instead of relying on GitHub Actions' UTC timezone, preventing birthdays from being skipped around midnight.
  • 🛡️ Resilient by Design

    • Gracefully handles failures without stopping the workflow.
    • Missing image → skipped safely.
    • Face detection failure → centered crop.
    • Telegram failure → still posts to Discord.
    • Discord failure → still posts to Telegram.
  • 💸 Zero Infrastructure Cost

    • Runs entirely on GitHub Actions' free scheduled workflows.
    • A fresh runner starts for roughly 30 seconds each day and shuts down automatically.
  • 🔒 Privacy-Conscious

    • Student records were minimized to only the required fields:
      • Name
      • Date of Birth
    • Removed unnecessary personal information such as phone numbers and email addresses.

💡 Why it's interesting

  • ✅ Completely serverless automation
  • ✅ No hosting or maintenance costs
  • ✅ Fault-tolerant workflow with graceful degradation
  • ✅ Correct timezone handling for reliable scheduling
  • ✅ Automated image generation pipeline
  • ✅ Simultaneous multi-platform notifications
  • ✅ Privacy-first data handling

🛠️ Tech Stack

  • Python
  • OpenCV – Face detection
  • Pillow (PIL) – Image compositing and flyer generation
  • GitHub Actions – Free scheduled CI/CD automation
  • Telegram Bot API
  • Discord Webhooks

Gallery

Interested in something similar?

I'm open to new projects and collaborations — let's build something great together.

Get in touch