# Create Zoho Books invoices from email attachments: n8n workflow

> Started by an arriving email, and works across Email. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/create-zoho-books-invoices-from-email-attachments (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)

# Create Zoho Books invoices from email attachments

Started by an arriving email, and works across Email. It hands the judgement calls to OpenAI. 23 steps, 1 branch: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fcreate-zoho-books-invoices-from-email-attachments)

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

**1** Branch: places the flow splits

**0** Loops or waits

**1** Service it connects to

## The flow

Model 3 Logic 15 Service 5

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

- 1 **Email IMAP Trigger** Email Read Imap *Service*
- 2 **Configure Workflow Constants** Set *Logic*
- 3 **Filter Emails for Attachments** Filter *Logic*
- 4 **Separate Email Attachments** Split Out *Logic*
- 5 **Prepare Files for Scanning** Code *Logic*
- 6 **Route by Document Type** Switch *Logic*
- 7 **Retrieve Customers from ZBooks** Http Request *Service*
- 8 **Retrieve Taxes from ZBooks** Http Request *Service*
- 9 **OpenAI OCR for PDF Files** Open Ai *Model*
- 10 **OpenAI OCR for Image Files** Open Ai *Model*
- 11 **Separate Customer Entries** Split Out *Logic*
- 12 **Retrieve Currencies from ZBooks** Http Request *Service*
- 13 **Combine OCR Outputs** Merge *Logic*
- 14 **Filter by Customer Criteria** Filter *Logic*
- 15 **Format ZBooks Data** Set *Logic*
- 16 **Combine Tax and Account Information** Merge *Logic*
- 17 **Aggregate Customer Information** Aggregate *Logic*
- 18 **OpenAI Invoice Text Analysis** Open Ai *Model*
- 19 **Combine Invoice and Customer Data** Merge *Logic*
- 20 **Prepare Invoice Data** Set *Logic*
- 21 **Assemble Invoice Details** Code *Logic*
- 22 **Validate Invoice Status** Filter *Logic*
- 23 **Submit Document to ZBooks** Http Request *Service*

## How it's built

- **Starts on:** An arriving email
- **Steps:** 23, with 1 branch
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Email
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Email account, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an arriving email.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 23 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 23 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%2Fcreate-zoho-books-invoices-from-email-attachments)
- **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.

[Email](https://millionrounds.com/workflows?service=Email#library)

## Workflows like it

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

- [**Generate invoices and send AI-powered reminders with Jotform** 23 steps · calls a model · Email, n8n data table](https://millionrounds.com/workflow/generate-invoices-and-send-ai-powered-reminders-with-jotform)
- [**Invoice processing: Email to PostgreSQL database with OpenAI** 23 steps · calls a model · Discord, Email](https://millionrounds.com/workflow/invoice-processing-email-to-postgresql-database-with-openai)
- [**Invoice overdue reminder system - delivered with Airtable** 21 steps · Airtable, Email](https://millionrounds.com/workflow/invoice-overdue-reminder-system-delivered-with-airtable)
- [**Run bounded dunning for Lago payment failures** 25 steps · Email, n8n data table](https://millionrounds.com/workflow/run-bounded-dunning-for-lago-payment-failures)
- [**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)
- [**Convert legal timesheets to LEDES and PDF invoices with OpenAI** 27 steps · calls a model · Email, Excel](https://millionrounds.com/workflow/convert-legal-timesheets-to-ledes-and-pdf-invoices-with-open)
