The flow
Starts it 1Model 4Logic 11Service 6
The steps in the order they run, from what starts it.
- 1OpenAI Chat ModelLm Chat Open AiModel
- 2CalculatorTool CalculatorModel
- 3Structured Output ParserOutput Parser StructuredModel
- 4On Email receiptGmail triggerStarts it
- 5Extract Data from PDF and XMLAgentModel
- 6Get Filename and mimeTypeCodeLogic
- 7Merge both flowsMergeLogic
- 8Filter ZIP files onlyFilterLogic
- 9Update PDF with actual nameGoogle DriveService
- 10Unzip InvoiceCompressionService
- 11Get Current DateCodeLogic
- 12Loop Over ItemsSplit In BatchesLogic
- 13Create or update rowGoogle SheetsService
- 14Just for styleNo OpLogic
- 15Get filename and mimeType on extracted docsCodeLogic
- 16Split XML and PDFSwitchLogic
- 17Create initial PDFGoogle DriveService
- 18Extract PDF DataExtract From FileService
- 19Extract XML DataExtract From FileService
- 20Append both DocsMergeLogic
- 21Convert to JSONXmlLogic
- 22Aggregate all Data into 1 listAggregateLogic
How it's built
- Starts on
- An arriving email
- Steps
- 22, with 1 branch, 1 loop or waits
- Size
- Large: read it before trusting it with anything live
- Connects to
- Gmail, Google Drive, Google Sheets
- Model
- OpenAI
Questions
What does it need to run?
An n8n account, plus your own Gmail, Google Drive and Google Sheets accounts, 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 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 itNothing 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.