DEV Community

Ioana Frincu
Ioana Frincu

Posted on

I automated my invoice admin with n8n (and you can copy it)

The monthly invoice scavenger hunt

If you run a small business, you know the ritual. Once a month, your accountant asks for last month’s invoices, and you dig through your inbox for attachments, “view your invoice” links, and receipts from every tool you pay for.

It’s not hard work, but it’s easy to miss one, and it always lands on a busy day. So I built a small n8n automation that does it for me, quietly, every time an invoice arrives.

In this post, I’ll explain the logic behind it and why it’s worth it for any small business owner. The template will be available for download soon, so you can set up the same thing for your business.

What it does

Every invoice that reaches my inbox ends up in three places, without me touching it:

The right folder. It’s saved as a PDF in Google Drive, in a folder for its year and month. Missing folders are created automatically.

A monthly spreadsheet. I add a row with the supplier, their VAT code, the date, the amount, and the currency.

Out of the way. The email gets a label, so nothing is filed twice.

At the end of the month, nothing needs to be collected. I share the month’s folder with my accountant, and the spreadsheet is already inside.

How it works

The logic is simple. Every 15 minutes, the workflow checks for new invoice emails and handles them one at a time:

Work out the month. The email's arrival date determines which year and month folder the invoice belongs in.

Get a PDF. If the invoice is attached, use it as is. If the email has only a link, the workflow saves the invoice page as a PDF, like printing it.

Read it. An AI assistant reads the invoice and picks out the five details an accountant needs.

File and log it. The PDF goes into the month folder, and a new row goes into that month’s spreadsheet.

Mark it done. Label the email so it’s never handled twice. If an email has nothing usable, skip it and note why.

Two details that make it work

Not every invoice is a PDF. Some suppliers, such as Paddle (which bills for n8n) or Stripe, only send a link to an invoice page. The workflow opens that page and saves it as a PDF, so these invoices end up in the folder like any other. It skips links that require a login instead of saving a sign-in screen.

No rules to maintain. Every supplier’s invoice looks different, and some are in various languages. Instead of setting up rules per supplier, an AI assistant (Claude or ChatGPT) reads each invoice and finds the supplier, VAT code, date, amount, and currency. If it can’t find a value, the cell stays empty, so nothing disappears without you noticing.

Why it’s worth it for a small business

You don’t need a finance team to keep your books tidy. For a small business owner, this kind of automation pays off in a few ways:

No month-end scramble. File invoices as they arrive, not in a rush on the day your accountant asks.

Fewer missed invoices. A forgotten receipt can mean VAT you can’t deduct or an expense you can’t claim. Here, every invoice email is either filed or labeled with why you skipped it.

**An accountant-ready summary. **The monthly spreadsheet already has the details accountants ask for, and you can download it as Excel in one click.

Tools you already use. It runs on Gmail, Google Drive, and Google Sheets, so you don’t need to learn a new system.

The template

This workflow is now a free n8n template available here: https://n8n.io/workflows/21206-save-extract-and-log-email-invoices-with-gmail-drive-sheets-claude-and-pdfco/

You can connect your Gmail and Google Drive, point it at your invoices folder, and let it run.

It isn’t magic. Invoices that sit behind a login still need a manual download, and it’s worth checking the first few spreadsheet rows against the PDFs. But for the steady stream of everyday invoices, it means one less thing on my plate.

And if you have a supplier whose invoices always cause trouble, tell me in the comments, and I’ll make sure the template handles it.

Top comments (0)