EMERMEDIA
Back to case studies
Services

Automatic archiving of incoming invoices

Client
Micro business (anonymised)
Company size
1-10 employees

The starting point

Incoming invoices arrive by three routes, and none of them is convenient.

By email, as an attachment. A few dozen messages a month, mixed into the mailbox among newsletters and order confirmations. Someone has to go through them, pull out the PDF, and put it where it belongs.

From a supplier portal. The hosting provider does not send the invoice — it puts it in its admin interface. Log in, find it, download it. Once a month, every month.

Two companies' invoices in the same mailbox. The sole trader and the limited company share correspondence, but the invoices have to stay apart, because they fall under separate books. Sorting them was done by a person, opening the PDF and reading the customer name.

That adds up to two to three hours a month, always just before the accounting deadline, always the same work. And worse: if something is missed, it only surfaces at the accountant.

The solution

Three scheduled processes, on a self-hosted n8n. Each starts at seven in the morning, by itself.

The monthly folder creates itself. The first thing the process does is check whether this month's folder already exists in cloud storage. If not, it creates it. There is no start-of-year setup, and no January invoices landing in the December folder.

What is already there does not go in twice. Before uploading, the process reads the filenames already in the folder and uploads only what is missing. This makes the process re-runnable: if a day is skipped, or it runs twice, no duplicates appear. This is the detail that decides whether an automation is trustworthy — without it, every error has to be cleaned up by hand.

The email branch. The process goes through the last 24 hours of messages, pulls out the attachments, and opens the PDF.

The company is identified from the invoice content. Not from the sender, not from the subject — from what is inside the PDF. This matters because the same supplier invoices both companies, from the same address. By sender they could not be separated; by content they can.

The portal branch. It logs into the provider's interface, requests the invoice list, picks out the new ones, and downloads the PDFs. Into the same monthly folder, with the same duplicate protection.

If something breaks, the system says so. A shared error handler watches all the processes and sends an email if any of them fails. Silence therefore means everything is fine — not that nobody looked.

Outcome

Two to three hours of work a month disappeared. It did not get faster; it stopped happening.

Invoices no longer need attention. There is no monthly "collect the invoices" task. By the accounting deadline the folder is already complete.

The two companies' records do not mix. Sorting happens on invoice content, the same way every time.

Live since April 2026. Running daily, continuously.

Where else this works

This is the most portable of the lot, because it is not about invoices.

The pattern is this: a document arrives regularly, from an external system, and has to land in an ordered structure — without duplicates, even if the process runs twice.

The same skeleton carries:

  • Bank statements and transaction reports — monthly, downloaded or emailed.
  • Contracts and purchase orders — into a per-customer folder, after signature.
  • Completion certificates and delivery notes — into a per-project folder.
  • Measurement records and certificates — by site and period.
  • Regulatory and grant paperwork — where filing is mandatory and a gap surfaces after the fact.

The sorting logic is swappable: it can be customer name, project number, site or date. The skeleton — resolve the folder, filter duplicates, classify on content, alert on failure — stays the same.

The one thing to settle up front: what decides where a document belongs. If that rule can be stated, it can be automated. If it cannot, the rule has to be written first — and that exercise is usually instructive in itself.

Running it

The processes run on a self-hosted server. If the provider rebuilds its portal, the download branch needs a change — the email branch and the folder handling are unaffected.


This case study is based on a real, live system, anonymised. The two to three hours a month is an estimate of the previous manual process, not a measured figure.

Similar situation at your company?

Book a no-commitment 30-minute discovery call — we'll see if the lesson can be mapped to your processes.

Book a no-commitment call