The flow
Starts it 1Model 3Logic 8Service 8
The steps in the order they run, from what starts it.
- 1Gmail TriggerGmail triggerStarts it
- 2OpenAI Chat ModelLm Chat Open AiModel
- 3Invoice PickerAgentModel
- 4Invoice AI AgentAgentModel
- 5Extract basic informationCodeLogic
- 6Code in JavaScriptCodeLogic
- 7Invoice FilterFilterLogic
- 8Ensure strict structureCodeLogic
- 9Label invoices in the mailboxGmailService
- 10Final Spreadsheet with Invoice dataGoogle SheetsService
- 11Assign to a periodDate TimeLogic
- 12Ensure the sheet exist in the spreadsheetGoogle SheetsService
- 13Is the invoice attached?IfLogic
- 14Search for the destination folderGoogle DriveService
- 15Need to create the folder?IfLogic
- 16Create folderGoogle DriveService
- 17Search for the invoice fileGoogle DriveService
- 18Upload fileGoogle DriveService
- 19Need to upload the invoice?IfLogic
- 20Extract Invoice dataExtract From FileService
How it's built
- Starts on
- An arriving email
- Steps
- 20, with 3 branches
- Size
- Medium: a working afternoon
- 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?
Plan an afternoon. 20 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 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 20 steps before you point it at anything that matters.