Parse incoming invoices from Outlook using AI Document Understanding
Ready for 3.0What this workflow does
This AI workflow has 18 nodes and runs on a schedule (every hour). Along the way it connects Microsoft Outlook, Google Gemini Chat Model and Microsoft Excel 365. It also calls generativelanguage.googleapis.com over HTTP.
How it runs
Trigger: On a schedule (every hour).
- Get Recent Messages (Microsoft Outlook): get many
- Markdown: converts between Markdown and HTML
- Message Classifier (Text Classifier): classifies text into categories with AI, with model: Model
- For Each Message (Loop Over Items (Split in Batches)): loops over the items in batches
- Microsoft Excel (Microsoft Excel 365): append (worksheet)
- Download Attachments (Microsoft Outlook): get
- Split Attachments (Code): runs custom JavaScript code
- Extract from File: extracts data from a file (binary to propery)
- Invoice Classifier With Gemini 2. (HTTP Request): calls generativelanguage.googleapis.com (POST)
- Filter: keeps only the items that match a condition
…plus 5 more steps. See the full node list below.
Services it uses
HTTP calls to: generativelanguage.googleapis.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (15)
- Code
n8n-nodes-base.code - Microsoft Outlook
n8n-nodes-base.microsoftOutlook - Edit Fields (Set)
n8n-nodes-base.set - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - No Operation, do nothing
n8n-nodes-base.noOp - Text Classifier
@n8n/n8n-nodes-langchain.textClassifier - Extract from File
n8n-nodes-base.extractFromFile - Markdown
n8n-nodes-base.markdown - Wait
n8n-nodes-base.wait - Filter
n8n-nodes-base.filter - If
n8n-nodes-base.if - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Microsoft Excel 365
n8n-nodes-base.microsoftExcel - HTTP Request
n8n-nodes-base.httpRequest
From the author
This n8n template monitors an Outlook mailbox for invoices, automatically parses/extracts data from them and then uploads the output to an Excel Workbook. One of my top workflow requests, this template can save many hours of manual labour for you or your…