# Intelligent invoice processing & notification agent: n8n workflow

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

Source: https://millionrounds.com/workflow/intelligent-invoice-processing-and-notification-agent (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)

# Intelligent invoice processing & notification agent

Started by an arriving email, and works across Gmail and Slack. It hands the judgement calls to OpenAI and OpenRouter. 19 steps, 3 branches: a working afternoon to understand properly.

Medium Calls a model: OpenAI, OpenRouter

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fintelligent-invoice-processing-and-notification-agent)

**19 steps** Medium: a working afternoon

**3** Branches: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 1 Model 5 Logic 5 Service 8

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

- 1 **OpenRouter Chat Model** Lm Chat Open Router *Model*
- 2 **Gmail Trigger** Gmail trigger *Starts it*
- 3 **Basic LLM Chain** Chain Llm *Model*
- 4 **Basic LLM Chain1** Chain Llm *Model*
- 5 **Fetch Invoice Emails** Gmail *Service*
- 6 **Post to Slack (text only)1** Slack *Service*
- 7 **Post to Slack (text only)** Slack *Service*
- 8 **Has Direct Attachment?** If *Logic*
- 9 **Mark As Read1** Gmail *Service*
- 10 **Mark As Read** Gmail *Service*
- 11 **PDFco Api** PDFco Api *Service*
- 12 **Edit Fields1** Set *Logic*
- 13 **PDFco Api2** PDFco Api *Service*
- 14 **OpenAI** Open Ai *Model*
- 15 **Update Parse** Code *Logic*
- 16 **If** If *Logic*
- 17 **OpenAI1** Open Ai *Model*
- 18 **Mark As Read2** Gmail *Service*
- 19 **If1** If *Logic*

## How it's built

- **Starts on:** An arriving email
- **Steps:** 19, with 3 branches
- **Size:** Medium: a working afternoon
- **Connects to:** Gmail, Slack
- **Model:** OpenAI, OpenRouter

## Questions

What does it need to run?

An n8n account, plus your own Gmail and Slack accounts, and a key for OpenAI and OpenRouter. 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 and OpenRouter. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 19 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 19 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%2Fintelligent-invoice-processing-and-notification-agent)
- **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)[Slack](https://millionrounds.com/workflows?service=Slack#library)

## Workflows like it

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

- [**Automate GST/VAT tax returns with OpenAI and Gmail** 19 steps · calls a model · Gmail](https://millionrounds.com/workflow/automate-gst-vat-tax-returns-with-openai-and-gmail)
- [**Draft CPQ quotes from Slack with TurboQuote and OpenAI** 19 steps · calls a model · Slack](https://millionrounds.com/workflow/draft-cpq-quotes-from-slack-with-turboquote-and-openai)
- [**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)
- [**Automated event management with Typeform and Stripe** 19 steps · Gmail, Google Calendar](https://millionrounds.com/workflow/automated-event-management-with-typeform-and-stripe)
- [**Collect overdue payments with Slack** 19 steps · Gmail, Slack](https://millionrounds.com/workflow/collect-overdue-payments-with-slack)
