Simon Baker
Self-service invoicing for a subcontractor
A subcontractor raises his own invoices from his phone. The figures come from plain arithmetic, not AI, and the PDF is built and emailed automatically.
Status: built and in testing with the user. Timed comparisons against the manual route are still being collected, so this page makes no time-saved claim.
The problem
A self-employed subcontractor worked for several contractors and needed an invoice after each job. A family member built every one by hand, usually late, whenever he remembered to ask.
The arithmetic was never the issue. The dependency was. If he can start the invoice himself the moment a job finishes, the wait disappears. Everything else in the design exists to make that safe for someone who is not going to double-check his own sums.
The design rule
Once the input is structured, the calculation needs no AI. It is plain arithmetic: repeatable, tested and easy to audit. An invoice cannot differ from the figures the user approved.
The company, day rate and tax deduction status are looked up from a reference sheet when he picks an account code. He never types them. That removes a whole category of slip: the wrong rate, the wrong tax flag, the wrong email address.
How an invoice is raised
- Sign in. He opens the page on his phone and logs in with a one-time code sent to his email.
- Pick the company. Rate and tax status are looked up, not typed.
- Add the jobs. For each one: where, first day and number of days. He can add extras, with a photo of the receipt taken on the phone.
- Read the draft. A plain summary shows the dates, subtotal, deductions, extras and total. A rate that differs from the usual one shows in amber.
- Approve or reject. On approval the system re-checks everything, takes the next invoice number for that contractor, builds the PDF and emails it. The invoice details are also added to a spreadsheet he can hand to the accountant for the end of period accounts. On rejection the details go to a family member, who does it by hand.
What sits underneath
A phone-sized web page
One static page on free hosting. Only named email addresses can open it, so a shared key inside the page is never visible to anyone else.
A backend that does not trust the page
A Google Apps Script web app checks every request and recalculates the invoice itself. The page cannot bypass any of those checks.
One sheet for reference and records
A company list (account code, name, email, rate, tax flag, contact, last invoice number) and a log of every invoice, request and rejection. Every approved invoice is added as a row, so the sheet doubles as the record he gives the accountant for the end of period accounts.
Rules confirmed from real invoices
Money is worked in whole pence. The construction tax deduction applies to labour only, using the flag in the sheet. Materials and expenses are added after it. Invoice numbers run separately for each contractor. Typing slips such as impossible dates or absurd rates are refused.
Checks built in
- Pressing Approve twice, or retrying after a bad signal, sends one invoice. Each request carries a unique ID.
- If the email fails, the invoice number is given back and the log shows "Not sent", so no numbers are skipped.
- If the system is offline, the page says so in plain words and offers to email the details to a family member.
- A "send to" setting keeps invoices going only to the user while he is testing, then to the contractor with a copy to him.
- The backend has 15 automated checks and the page has a phone-sized walkthrough test. Both pass.
Manual invoicing always remains the fallback. The automation is there to make invoicing easier, not to become the only way to get paid.
What changed along the way
The first design used a low-code app builder and n8n, at about £20 a month, or about £240 a year. It was replaced before going live.
At a few invoices a month, the running cost was not worth it, and the user could not own it. The build moved to Google Apps Script and free Cloudflare hosting. Running cost at his volume is effectively £0, and the whole system can sit in accounts he owns. A domain for his own business is about £5 to £6 a year when he registers one.
Lessons from the build
- Read the real invoices before designing. Several jobs per invoice, different rates and itemised materials turned out to be normal, not exceptions.
- Keep the calculation in one plain file that runs both in the tests and in the live system. That is what made it testable.
- Judge the PDF from the live system. The converter draws tables more simply than a browser does, so a preview elsewhere can mislead.
- Test the web address in a private window. An app limited to "only myself" still loads when you are signed in, which hides the fault.
- Switch on the sign-in method the user can actually use. Until the one-time code option was added, the login screen offered only an account he does not have.
Reusing this
The pattern travels. The data does not. Each business gets its own deployment, its own sheet, its own sending address and its own invoice branding. A shared workflow serving several businesses would put one person's rates and invoices in reach of another's automation, so the design avoids it.
For a new business that makes it a clone-and-reconfigure job, not a build from nothing.
Still to measure
- Timed comparison of the automated route against the manual one, from a two-week trial with both run side by side.
- Any invoices the tool could not handle, and why.
- Confirmation that the accountant is happy with the log as the record.