Back to all projects

    Desk Booking Automation

    January 2, 2026
    python·selenium·pyautogui·reservation·automation·scheduling

    A Python automation bot that handles the daily grind of reserving workspace desks. Built for a friend who was tired of manually booking seats every day.

    Features

    • Scheduled Booking: Automated daily reservations at optimal times
    • HTTP Basic Auth Handling: Uses PyAutoGUI to handle browser authentication popups that Selenium can't access
    • Smart Retry Logic: Automatic retries with exponential backoff for failed bookings
    • Singapore Holiday Awareness: Skips booking on public holidays automatically
    • Notification System: Desktop notifications for successful bookings and failures
    • Dry Run Mode: Test the booking flow without actually making reservations
    • Seat Preference: Configure preferred seat IDs with fallback options

    Technical Stack

    • Python 3
    • Selenium WebDriver for browser automation
    • PyAutoGUI for handling OS-level auth dialogs
    • webdriver-manager for automatic ChromeDriver management
    • APScheduler for daily scheduled runs

    How It Works

    1. Scheduler triggers at configured time (typically 8 AM)
    2. Bot launches Chrome and navigates to booking system
    3. PyAutoGUI handles the HTTP Basic Auth popup (Selenium limitation)
    4. Selenium takes over for UI navigation: date selection, room search, cart management
    5. Completes reservation and sends desktop notification
    6. Logs results and handles errors gracefully

    Lessons Learned

    This was a quick utility project built for a friend dealing with the daily friction of manual desk reservations. The interesting technical challenge was handling HTTP Basic Auth popups - a common pain point in browser automation that Selenium can't directly address.

    The solution of combining Selenium for page interactions with PyAutoGUI for OS-level dialogs is a pattern I've used before, and it worked well here. The key was adding enough wait time and retry logic to handle the timing variability of popup appearances.

    What started as a "quick favor" turned into a properly structured project with scheduling, notifications, and holiday awareness - a reminder that even small tools benefit from thoughtful implementation.