Automation library · Money admin

Process invoices and send weekly AI reports with OpenAI

Started by someone submitting a form, and works across Gmail and n8n data table. It hands the judgement calls to OpenAI. 19 steps, 1 branch: a working afternoon to understand properly.

MediumCalls a model: OpenAI

19 stepsMedium: a working afternoon
1Branch: places the flow splits
0Loops or waits
2Services it connects to

The flow

Starts it 2Model 5Logic 5Service 7

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

  1. 1Invoice Upload FormForm triggerStarts it
  2. 2Invoice Data Schema ParserOutput Parser StructuredModel
  3. 3Weekly Report ScheduleSchedule triggerStarts it
  4. 4OpenAI GPT-5-mini ModelLm Chat Open AiModel
  5. 5OpenAI GPT-5-mini Model for ReportsLm Chat Open AiModel
  6. 6Workflow ConfigurationSetLogic
  7. 7Extract Invoice Data with AIAgentModel
  8. 8Fetch Weekly InvoicesData TableService
  9. 9Generate Weekly ReportAgentModel
  10. 10Store Raw Form SubmissionData TableService
  11. 11Validate Invoice DataCodeLogic
  12. 12Send Weekly Report EmailGmailService
  13. 13Extract Invoice ContentExtract From FileService
  14. 14Check Validation ResultIfLogic
  15. 15Prepare Success Email DataSetLogic
  16. 16Prepare Error Email DataSetLogic
  17. 17Store Validated InvoiceData TableService
  18. 18Send Error EmailGmailService
  19. 19Send Success EmailGmailService

How it's built

Starts on
Someone submitting a form
Steps
19, with 1 branch
Size
Medium: a working afternoon
Connects to
Gmail, n8n data table
Model
OpenAI

Questions

What does it need to run?

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

What starts it?

It starts on someone submitting a form.

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?

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.