# Process sales CSVs into invoices: n8n workflow template

> Started by another system calling it, and works across n8n data table. 18 steps, 2 branches: a working afternoon to understand properly.

Source: https://millionrounds.com/workflow/process-sales-csvs-into-invoices (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)

# Process sales CSVs into invoices

Started by another system calling it, and works across n8n data table. 18 steps, 2 branches: a working afternoon to understand properly.

Medium

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fprocess-sales-csvs-into-invoices)

**18 steps** Medium: a working afternoon

**2** Branches: places the flow splits

**0** Loops or waits

**1** Service it connects to

## The flow

Starts it 4 Logic 10 Service 4

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

- 1 **Receive Sales CSV** Webhook *Starts it*
- 2 **Check Upload Type** If *Logic*
- 3 **Extract from File** Extract From File *Service*
- 4 **Extract CSV Text** Extract From File *Service*
- 5 **Parse & Validate CSV** Code *Logic*
- 6 **Load Product Catalog** Data Table *Service*
- 7 **Return Validation Error** Respond To Webhook *Starts it*
- 8 **Enrich with Product Data** Code *Logic*
- 9 **Calculate Invoice Totals** Code *Logic*
- 10 **Check for Duplicates** Code *Logic*
- 11 **Has Valid Invoices?** If *Logic*
- 12 **Insert row** Data Table *Service*
- 13 **Return Duplicate Error** Respond To Webhook *Starts it*
- 14 **Aggregate** Aggregate *Logic*
- 15 **Prepare Email Notifications** Code *Logic*
- 16 **Email Output Preview** Set *Logic*
- 17 **Merge Results** Code *Logic*
- 18 **Return Success Response** Respond To Webhook *Starts it*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 18, with 2 branches
- **Size:** Medium: a working afternoon
- **Connects to:** n8n data table
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account. 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?

Plan an afternoon. 18 steps is enough that you should read each one before running it.

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 18 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%2Fprocess-sales-csvs-into-invoices)
- **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.

[n8n data table](https://millionrounds.com/workflows?service=n8n+data+table#library)

## Workflows like it

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

- [**Match supplier invoices to purchase orders with Gmail** 19 steps · calls a model · Gmail, n8n data table](https://millionrounds.com/workflow/match-supplier-invoices-to-purchase-orders-with-gmail)
- [**Process invoices and send weekly AI reports with OpenAI** 19 steps · calls a model · Gmail, n8n data table](https://millionrounds.com/workflow/process-invoices-and-send-weekly-ai-reports-with-openai)
- [**Jotform commerce sync: Telegram confirmation & Zoho invoice** 16 steps · Google Sheets, Telegram](https://millionrounds.com/workflow/jotform-commerce-sync-telegram-confirmation-and-zoho-invoice)
- [**Validate incoming XRechnung invoices from IMAP and archive them** 20 steps · Email, n8n data table](https://millionrounds.com/workflow/validate-incoming-xrechnung-invoices-from-imap-and-archive-t)
- [**Vet supplier payments with Bright Data and OpenAI** 20 steps · calls a model · Slack, n8n data table](https://millionrounds.com/workflow/vet-supplier-payments-with-bright-data-and-openai)
- [**Create Bosta shipping orders from Odoo invoices with OpenAI** 15 steps · calls a model · Telegram, n8n data table](https://millionrounds.com/workflow/create-bosta-shipping-orders-from-odoo-invoices-with-openai)
