Case study
Automated invoicing and pay-period drafts
We turned scattered calendar and schedule data into a ready-to-send invoice draft for every instructor, every pay period
Project overview
Our client's invoicing prep swallowed most of a day every pay period: hours scattered across a calendar, a schedule sheet, and a booking platform, all reconciled by hand. We built a scheduled workflow that gathers the data, works out each instructor's hours, applies the right contract category, captures the supporting figures, and produces a tailored email draft per person. Monthly invoicing is now a quick review and send — around six hours of admin removed from every cycle, with zero manual hour calculations.
The challenge
Problem: Invoicing data lived in three places — a calendar, a schedule sheet, and a booking platform with no API. Reconciling them by hand each period was slow and error-prone, and mistakes meant under- or over-paying staff.
How it works
A scheduled job reconciles three data sources — including a no-API platform reached via authenticated headless browser — into per-instructor drafts.
Technical implementation
Multi-Source Data Merge
The workflow reads events from Google Calendar and reference data from Google Sheets (instructors and the season schedule), then merges and aggregates them into one consistent view of who worked when.
Period Logic & Categorisation
It calculates the correct pay-period dates, computes hours, and uses a switch to categorise each booking by contract type — so different rates and templates are applied automatically.
Zero-Hour Filtering
Instructors with no hours in the period are filtered out before anything is generated, so no empty or incorrect invoices are ever produced.
Authenticated Headless Capture
Because the source platform has no API, a Browserless headless browser signs in with session cookies to capture the supporting figures, which are compiled into a file and attached to each draft.
Key features
- Runs automatically every pay period (scheduled)
- Reads all calendar events for the period
- Matches each event to the right instructor
- Calculates hours and categorises by contract type
- Skips anyone with zero hours
- Captures supporting figures from a no-API platform
- Generates a per-instructor Gmail draft, ready to send
Need a system like this?
Tell us where work gets stuck — in one call you'll hear what it takes to remove it.
Impact
Technologies used
Business value
- Faster, calmer monthly invoicing close
- Fewer payment errors and disputes
- A clear, auditable trail for every period
- Admin time returned to higher-value work