
Post-Event Automation:
How I Automated Post-Event Staff Tracking, Commission Calculations, and Invoice Generation with Google Apps Script
Year
2025
Industry
Hospitality
Service
Automation, Process Improvement
Introduction
TL;DR: Staff were finishing events and then someone had to manually calculate hours, split commissions between multiple workers, figure out travel bonuses, and generate invoices. I built an automated system using Google Forms and Apps Script that handles all of it - including PDF invoice generation and approval routing. Here's exactly how, with code you can steal.
The Problem: Post-Event Chaos
I was working as Event Lead at Wild Life Distillery in Canmore, Alberta. We ran three types of events: farmers markets, consumer events (festivals, corporate tastings), and liquor store tastings.
After every event, staff needed to submit a report. Simple enough, right?
Except the report triggered a cascade of manual work:
Calculate hours worked — including handling overnight shifts and different time zones
Split commissions — when multiple staff worked an event, commission needed to be divided based on hours worked
Apply different pay rates — market events paid $18/hour plus commission, consumer events paid $25/hour flat
Track travel bonuses — staff traveling to events got an extra hour added
Generate monthly invoices — aggregate all contractor work into proper invoices
Route approvals — invoices under $500 went to one manager, over $500 to another
Create PDF invoices — professional documents for payment processing
Someone was doing all of this in spreadsheets. Manually. Every month.
It was slow, error-prone, and frankly soul-crushing work that nobody should be doing by hand.
The Solution: A Complete Automation Stack
I built a system using Google Forms, Google Sheets, and Google Apps Script that handles the entire workflow automatically.
Here's what it does:
Staff submit a post-event form (takes 2 minutes)
System automatically routes the submission based on event type
Calculates hours, commissions, and pay for each staff member
Handles commission splits when multiple people work the same event
Logs everything to a master tracker
Generates monthly invoices for contractors
Routes invoices to the appropriate approver
Creates professional PDF invoices with line-item detail
Emails PDFs to relevant people
All automatic. No manual calculation. No copy-pasting between spreadsheets.
The Architecture
The system is split into modular files, each handling a specific responsibility:
File | Purpose |
|---|---|
Code.gs | Main entry point, form import, menu system, triggers |
EventProcessors.gs | Routes submissions to correct processor based on event type |
CommissionUtils.gs | Shared calculation functions for time, hours, and pay |
MonthlyInvoice.gs | Aggregates contractor work and generates invoice rows |
PDFUtils.gs | Creates professional PDF invoices |
TestConfig.gs | Test mode system for safe development |
LogManagement.gs | Log cleanup and maintenance |
This modular approach means I can update commission rates without touching invoice logic, or change the PDF template without breaking event processing.
Parsing Time Values from Google Forms (The 26:08 Bug)
Here's something that'll save you hours of debugging: Google Forms time values can be weird.
When I pulled time values from form responses, some event types had a mysterious 26 minutes and 8 seconds offset. A 9:00 AM start would show up as 9:26:08 AM in the code.
I never figured out why. But I did figure out how to fix it:
If you're pulling time values from Google Forms and they're consistently off by a weird amount, you might need a similar correction. Log the raw values, figure out the offset, and apply a correction.
Creating a Custom Menu
Google Sheets lets you add custom menus. This makes the system usable by non-technical staff:
Emojis in menu items make them easier to scan. Group related functions into submenus. Add separators between sections.
Generating Professional PDF Invoices
When an invoice is approved, the system generates a professional PDF with the company logo, line-item detail, and proper formatting.
The trick is to build HTML, then convert it to PDF:
The HtmlService.createHtmlOutput().getBlob() method is the magic. Build your HTML with inline styles (external stylesheets won't work), convert to blob, save to Drive.
Results
Hours of manual work eliminated every month
Zero commission calculation errors since launch
Professional PDF invoices generated automatically
Clear approval routing with full audit trail
System is still running months after I left the company
The HR team now manages everything themselves. They update the form when needed, approve invoices through the sheet, and PDFs generate automatically.
Code You Can Steal
Here are the most reusable pieces from this project:
Time Parsing with Offset Correction Use this when pulling time values from Google Forms. Adjust the offset if your forms have different weirdness.
Commission Split Calculator The formula for splitting commission based on hours worked. Works for any number of staff members.
Test Mode System The pattern of defaulting to test mode and using PropertiesService for persistent storage. Use this in any automation that sends emails.
HTML to PDF Conversion HtmlService.createHtmlOutput(html).getBlob() — remember to use inline styles and attach a descriptive filename.
onEdit Trigger Pattern Check sheet name, check column, check row, then act. Early returns keep the code clean.
Lessons Learned
1. Modular file structure matters. When I needed to change the commission rate, I only touched CommissionUtils.gs. Everything else kept working.
2. Default to safe mode. Test mode being the default saved me from sending embarrassing test emails to real people multiple times during development.
3. Log everything. I created a Logs sheet that captures every action. When something goes wrong (and it will), you need to see what happened.
4. Build for handoff. I knew I wouldn't be there forever. Every function has clear comments. The menu system is self-explanatory. Documentation exists.
5. Google Forms time values are weird. Just accept it and build correction logic.
Final Thoughts
This project took about 3 weeks of part-time work to build, test, and document. It now saves hours of manual work every month and has eliminated an entire category of errors.
The best part? It's all built on tools the company already had. Google Workspace. No additional licenses. No SaaS subscriptions. Just Apps Script gluing everything together.
If you're looking at a similar problem — manual data processing, complex calculations, PDF generation, approval workflows — this stack can probably solve it. The code examples above should get you started.
Got questions about this project or building something similar? Get in touch — I'm always happy to talk automation.
About the Author
Chad Rossi is an IT automation specialist based in Canmore, Alberta. He specializes in Google Workspace automation, Microsoft 365 administration, and eliminating manual processes that make people hate their jobs. When he's not building automation systems, he's photographing wildlife or treating complex IT problems like Dark Souls boss fights — tough, but worth it.



