> ## Content Index
> Fetch the complete content index at: https://www.theautomationshed.co.uk/llms.txt
> Use this file to discover other available public pages before exploring further.

# How I Automated a Small Payroll Bureau's Invoicing — Part 1: Before I Built Anything
- URL: https://www.theautomationshed.co.uk/automating-payroll-bureau-invoicing-part-1/
- Published: 2026-11-07T08:55:14.000Z
- Updated: 2026-11-08T11:01:06.000Z
- Description: My wife runs a one-person payroll bureau. She works out the wages, payslips and tax for a bit over a hundred small businesses. Some are paid weekly, some fortnightly, some monthly.
- Author: The Automation Shed
- Tags: Guides

*Shed Case Study, part 1 of 3\. Written by one of the Shed's builders. Names and identifying details have been changed. Last checked: November 2026.*

> **The reality check, up front** 
>  
> **Time:** about 21 hours in total: roughly 19 of mine over a long weekend, and about 2 of the business owner's.  
>  
> **Cash cost:** a Claude Pro subscription I already had (£180 a year, roughly right as of October 2026). Everything else was free or already paid for.  
>  
> **Difficulty:** advanced for a novice. I didn't write any code myself, but I ran plenty of it.  
>  
> **Status:** both halves are now live. The fully automatic half has only just been switched on. Part 3 will tell you honestly how its first month goes.

My wife runs a one-person payroll bureau. She works out the wages, payslips and tax for a bit over a hundred small businesses. Some are paid weekly, some fortnightly, some monthly.

She's very good at the payroll. The invoicing was another matter. Every payroll she ran had to be turned into a charge, and every charge was typed into Sage, her accounting software, by hand. Over a long weekend, with Claude doing most of the building, I automated it.

This is the honest version of how that went. This first part isn't about the technology at all. It's about what happened before I built anything, because that's where most of the real work was. It's also where I made my first expensive mistake.

## What invoicing actually looked like

On paper, her fees are simple. Each payroll has a set charge, which changes with the size of the business and the services it uses. Then there are occasional extras, such as redoing a payroll or producing a report a client has asked for.

In practice, that's a sum for every client, every time. A weekly client means four or five sums a month. Multiply that by a hundred-odd clients and you have a couple of hundred little calculations a month. Each one was worked out and typed in by hand, usually at the end of a long day, and sometimes months after the payroll itself.

Nothing about that is difficult. That's exactly the problem. It's repetitive, it's easy to miss an extra, and a mistake either costs her money or annoys a client. If you've read our guide to [your first automation](https://www.theautomationshed.co.uk/your-first-automation/), you'll recognise the pattern: predictable rules, lots of repetition, and a real cost when it goes wrong. It's a textbook job for automation.

## The rules lived in her head

What I hadn't appreciated was that, although the fees followed rules, most of those rules weren't written down anywhere. They lived in my wife's head.

That's normal for a one-person business. You don't write down what you do every day, you just do it. But a computer can't read your mind. Before anything could be automated, every rule had to come out of her head and onto paper.

So the first real job was a long list of questions, such as:

- What counts as an employee: everyone on the books, or only those who got a payslip that week?
- Are starters and leavers charged?
- Which month does a payroll belong to if it's run on the 30th but paid on the 2nd?
- What does a re-run cost, and who pays for it?

Every answer went into a simple decisions log (a running document of what was decided and why). That log ended up being the most useful thing in the whole project. It became the specification (the description of exactly what the system must do), the test list, and eventually the notes for this article.

## The first version I threw away

I didn't ask enough questions at the start. I asked the questions I thought mattered, then started building.

My first version made one invoice for every payroll run. Run a client's weekly payroll, get an invoice. It worked. It was tested. Then I showed it to my wife, and she pointed out that she doesn't invoice like that. She sends each client **one invoice a month**, which builds up as the weeks go by.

That one fact changed the whole design. Luckily, the fee calculations carried over. But a good chunk of a day went in the bin, and it could have been avoided with one question at the start: *"Talk me through how you invoice now, from start to finish."*

More surprises came out as we went:

- **Some companies have two payrolls**, with weekly staff and monthly management, but want a single invoice.
- **Re-runs are only charged if the client caused them.** If the mistake was hers, there's no charge. No computer can know which it was.
- **A sent invoice can't be deleted** in Sage, only voided (cancelled), and the voided one still shows up.

None of these were obscure. They're just the normal, messy reality of a real business. Every one would have broken a system that didn't know about it.

If I did this again, I'd start with a proper discovery session (a sit-down to map out how the job is really done, before designing anything). I'd use a written set of questions so nothing gets skipped because it seems too obvious to mention.

## The ground rules

Before building anything, I'd worked out a set of ground rules in a planning session with Claude, and my wife and I agreed them. Five of them shaped every decision afterwards. I'd suggest something similar to anyone automating anything that touches money.

**1\. Nothing gets sent automatically.** The system creates **draft** invoices only. My wife reviews every one, then sends it herself. The automation does the typing. She still decides what goes to a client.

**2\. No AI does the maths.** I used AI to help build the system, but the system itself doesn't use AI to work out fees. Fees are calculated by fixed rules that give the same answer every time, and we tested them against real past invoices. AI is brilliant at many things, but "usually right" isn't good enough for someone's bill.

**3\. The price list belongs to her.** All the fees live in a spreadsheet my wife owns. If she changes her prices, she changes the spreadsheet. Nobody has to touch the automation.

**4\. If a charge depends on whose fault something was, ask a human.** The re-run rule is the obvious example. The system never guesses. It asks her a one-click question: *client's request, or my mistake?* Making it a single click mattered. A question that takes effort to answer gets ignored.

**5\. Payroll data stays on her computer.** Payroll means people's wages, so the whole system runs on her own PC rather than in the cloud (on someone else's servers online). Only the invoice lines go to Sage, and those contain no wage details. I'll cover exactly what Claude did and didn't see in Part 2, because I think that matters a lot.

A sixth rule was there from the start: **test on pretend data first.** Nothing touched her real accounts until it had worked on a practice copy with made-up companies.

## What I used

- **n8n**, an automation tool (software that connects other programs and moves information between them by itself). I ran it on her own PC, which is free. Our [comparison of Make, n8n and Zapier](https://www.theautomationshed.co.uk/n8n-vs-make-vs-zapier-uk-costs/) explains the options.
- **Claude Pro** (the paid plan for Claude, an AI assistant), which acted as designer and builder. I acted as tester and decision-maker.
- **Her existing payroll software and Sage.** Nothing new to buy, and nothing to change about how she works.

The first half of the system is a simple form. At the end of the month she picks a client, enters what was run, and a draft invoice appears in Sage. That's live, and she's using it. The second half watches the payroll software by itself and adds each new payroll to the right draft automatically, with no form at all. That went live once it had passed testing.

## The reality check

**Most of the work was understanding the business, not building the automation.** The technology was the easy bit. Getting the rules right took the time.

**Ask before you build, and ask more than you think you need to.** My biggest wasted effort came from one question I didn't ask. A written list of questions, worked through with the person who does the job, is cheap insurance.

**The business owner has to be involved.** My wife spent about two hours answering questions and helping test. She didn't need to understand any of the technology. But without her, I'd have built a neat system that invoiced wrongly.

**Automation won't fix pricing that isn't written down.** If your prices live in your head, write them down first. If you can't explain a fee clearly to a person, you can't explain it to a computer. Doing that alone is worth it, even if you never automate anything. It's the same lesson as our rule one of automation: [don't automate a bad process](https://www.theautomationshed.co.uk/dont-automate-a-bad-process/).

**Keep a human between the automation and the customer when money is involved.** Drafts, not sends. It costs my wife a few minutes a month to review them, and it means a bug can never reach a client.

## Official pages to check

- [Claude plans and pricing](https://claude.com/pricing?ref=theautomationshed.co.uk)
- [n8n: hosting n8n yourself](https://docs.n8n.io/hosting/?ref=theautomationshed.co.uk)

---

*This case study is written from the hands-on experience of one of the Shed's builders, with drafting help from AI, and reviewed before publishing (see* [*How we make our guides*](https://www.theautomationshed.co.uk/how-we-make-our-guides/)*). The business is real, but names and identifying details have been changed. Claude was paid for out of our own pocket; nothing here is sponsored. Nothing here is legal, tax or financial advice.*