# Invoice management system with Gmail and Google Sheets: n8n workflow

> Started by another system calling it, and works across Gmail, Google Sheets and Slack. 22 steps, 1 branch, 1 loop or waits: large, and worth reading before...

Source: https://millionrounds.com/workflow/invoice-management-system-with-gmail-and-google-sheets (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Money admin](https://millionrounds.com/workflows?category=Money+admin#library)

# Invoice management system with Gmail and Google Sheets

Started by another system calling it, and works across Gmail, Google Sheets and Slack. 22 steps, 1 branch, 1 loop or waits: large, and worth reading before you trust it with anything live.

Large

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Finvoice-management-system-with-gmail-and-google-sheets)

**22 steps** Large: read it before trusting it with anything live

**1** Branch: places the flow splits

**1** Loop or waits

**3** Services it connects to

## The flow

Starts it 3 Logic 10 Service 9

The steps in the order they run, from what starts it.

- 1 **New Invoice Request** Webhook *Starts it*
- 2 **Daily Overdue Check** Schedule trigger *Starts it*
- 3 **Initialize Invoice** Set *Logic*
- 4 **Get Unpaid Invoices** Google Sheets *Service*
- 5 **Split Line Items** Split Out *Logic*
- 6 **Calculate Overdue Days** Code *Logic*
- 7 **Calculate Line Total** Code *Logic*
- 8 **Loop Over Invoices** Split In Batches *Logic*
- 9 **Aggregate Line Items** Aggregate *Logic*
- 10 **Route by Reminder Level** Switch *Logic*
- 11 **Build Invoice Object** Code *Logic*
- 12 **First Reminder Email** Gmail *Service*
- 13 **Second Reminder Email** Gmail *Service*
- 14 **Urgent Reminder Email** Gmail *Service*
- 15 **Final Notice Email** Gmail *Service*
- 16 **Escalate to Collections** Slack *Service*
- 17 **Save Invoice to Sheet** Google Sheets *Service*
- 18 **Merge Reminder Paths** Merge *Logic*
- 19 **Send Invoice Email** Gmail *Service*
- 20 **Update Reminder Date** Google Sheets *Service*
- 21 **Invoice Created Response** Respond To Webhook *Starts it*
- 22 **Continue Loop** Code *Logic*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 22, with 1 branch, 1 loop or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Sheets, Slack
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Sheets and Slack accounts. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Take your time. At 22 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 22 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Finvoice-management-system-with-gmail-and-google-sheets)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Gmail](https://millionrounds.com/workflows?service=Gmail#library)[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)[Slack](https://millionrounds.com/workflows?service=Slack#library)

## Workflows like it

Also money admin, with the same services where possible, closest in size first.

- [**Create cinematic quote videos with Google Drive** 22 steps · Google Drive, Google Sheets](https://millionrounds.com/workflow/create-cinematic-quote-videos-with-google-drive)
- [**Create daily quote videos from Google Sheets with Zvid** 22 steps · Google Sheets](https://millionrounds.com/workflow/create-daily-quote-videos-from-google-sheets-with-zvid)
- [**Send payment reminders and cancel unpaid Shopify orders** 22 steps · Gmail](https://millionrounds.com/workflow/send-payment-reminders-and-cancel-unpaid-shopify-orders)
- [**Extract and organize Colombian invoices with Gmail and OpenAI** 22 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/extract-and-organize-colombian-invoices-with-gmail-and-opena)
- [**Extract invoice data from Gmail PDFs** 22 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/extract-invoice-data-from-gmail-pdfs)
- [**Follow up on overdue invoices with OpenAI and Gmail** 22 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/follow-up-on-overdue-invoices-with-openai-and-gmail)
