ScanSync
A custom automation bridge that transforms an existing door access control system into a fully functional HR attendance tracker eliminating the need for separate attendance hardware.
ScanSync is a custom Python automation solution built for a leading Egyptian interior design firm. It scrapes the company's existing biometric access control dashboard every hour capturing fingerprint, face ID, and RFID card scans and writes structured attendance records into a shared Google Sheet, turning every door scan into an HR attendance entry without touching the existing infrastructure.
Biometric door access existed across all offices and workshops, but HR had no access to the data due to lack of API, export, or integration support. Attendance was either tracked manually or required duplicating hardware at every entry point, increasing cost and complexity. ScanSync solved this through browser automation: a scheduled Python script logs into the access control dashboard hourly, scrapes new check-in and check-out events, structures them into employee-level attendance records, and syncs them to an existing Google Sheet, with a pre-midnight validation step to ensure complete daily data before the HR cutoff.
Key challenges included reverse-engineering an undocumented access control dashboard, maintaining a stable automated session on a non-programmatic system, accurately pairing multiple check-in and check-out events to compute working hours, filtering duplicate or near-duplicate scan events occurring within seconds, ensuring complete end-of-day data before HR cutoff for reliable reporting, and building a long-running unattended system capable of operating on low-spec internal hardware without intervention.
- Scheduled Scraping Module: Hourly Selenium routine that logs into the access control dashboard and pulls every new event since the last successful run.
- Dashboard Authentication Module: Persistent session management with automatic re-login on session expiry or unexpected logout.
- Log Normalization Module: Converts raw dashboard rows into a clean structured format with employee ID, timestamp, scan type, and door location.
- Employee Mapping Module: Resolves the access control system's internal user IDs to HR employee identities for consistent reporting.
- Check-In/Out Pairing Module: Pairs every check-in event with its matching check-out event per employee, even across multiple daily scans.
- Working Hours Calculation Module: Computes true working hours per employee per day based on first-in and last-out as the attendance boundary.
- Duplicate Detection Module: Prevents the same scan event from being logged twice across hourly runs or after recovery from a failed run.
- Google Sheets Sync Module: Writes every new attendance record into the shared HR Google Sheet with append-only semantics.
- Backfill & Recovery Module: Automatically re-scrapes and fills any gaps detected by the validation routine before the daily cutoff.
- Pre-Midnight Validation Module: Runs before 12:00 AM to confirm the full day's log has been captured by comparing dashboard totals against sheet totals.
- Run Logging & Alerting Module: Maintains an audit log of every scrape, validation, and failure, with email alerts on unrecoverable errors.
- Missed Checkout Module: Flags employees who scanned in but never scanned out by end of day, surfacing missed checkouts directly to HR.
ScanSync delivers a focused set of automation features designed to convert an isolated door access system into a fully functional attendance solution — without new hardware or vendor integration.
- Hourly automated scraping of the biometric access control dashboard.
- Compatibility with all three scan types fingerprint, face ID, and RFID card.
- Append-only sync to the HR team's existing shared Google Sheet.
- Automatic check-in and check-out pairing across multiple daily scans.
- Daily working hours calculation per employee based on first-in and last-out.
- Pre-midnight validation guaranteeing full data completeness before cutoff.
- Missed checkout detection surfaced directly to HR.
- Duplicate prevention across hourly runs and recovery scenarios.
- Email alerting on unrecoverable failures.
- Unattended 24/7 operation on low-spec internal hardware.
Platform Architecture
ScanSync is a purpose-built Automation Bridge that sits between the client's existing biometric access control system and their HR workflow, with no modification required to either side. The system operates across three interconnected layers:
- Collection Layer:: A Selenium-driven scraper that authenticates against the access control dashboard and extracts every new check-in and check-out event on an hourly schedule — resilient against UI changes, session timeouts, and network failures.
- Processing Layer:: A normalization and pairing engine that converts raw scan events into structured attendance records, maps user IDs to HR identities, pairs in/out scans into work sessions, calculates daily working hours, and detects duplicates and missed checkouts.
- Delivery Layer:: A Google Sheets integration that writes processed records into the HR team's existing shared sheet, combined with a pre-midnight validation routine that guarantees data completeness before the daily cutoff.
All three layers run unattended under a single Python service, ensuring every door scan becomes an attendance record without manual intervention and without disturbing the existing biometric infrastructure.
- 55% Significant reduction
- 95% Elimination need for separate attendance hardware across all entry points.
- 0 Hours-to-zero daily effort for HR to compile and verify attendance logs.
- Python
- Selenium
- Google Sheets API