WhatsApp leave sync
Converts staff leave and attendance reports received over WhatsApp into attendance records. Uses a Node.js WhatsApp listener, Gemini-based extraction, and Python reconciliation with an existing Microsoft Access database, including duplicate and revoked-message handling.
Internal tool
Problem
Staff report leave and absences over a WhatsApp group; someone then had to read every message and update the attendance database by hand.
Approach
A Node.js listener (Baileys) watches the group and forwards messages to Gemini, which extracts structured leave records (validated with Pydantic). A Python reconciliation step writes them into the Microsoft Access attendance database via PyODBC — matching staff, ignoring duplicates, and deleting records when a WhatsApp message is revoked. PM2 keeps both sides running.
Implemented features
- WhatsApp message capture via a Node.js Baileys listener
- Gemini-based extraction of unstructured leave messages
- Pydantic-validated records written to Microsoft Access
- Duplicate detection and revoked-message cleanup
Availability
Internal project — no public repository or demo.