Skip to main content

Parse incoming invoices from Outlook using AI Document Understanding

Workflow preview

Workflow preview
100%
Parse incoming invoices from Outlook using AI Document Understanding preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

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 temp...

Best for

  • Invoice Processing automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.code, n8n-nodes-base.microsoftoutlook, n8n-nodes-base.set, n8n-nodes-base.splitinbatches, n8n-nodes-base.noop, @n8n/n8n-nodes-langchain.textclassifier, n8n-nodes-base.extractfromfile, n8n-nodes-base.markdown

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Jimleuk.

Original n8n.io source

1.1 Workflow description

Title
Parse incoming invoices from Outlook using AI Document Understanding
Workflow name
Parse incoming invoices from Outlook using AI Document Understanding

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 finance/accounts team.

How it works

  • A scheduled trigger is set to fetch recent Outlook messages to the Accounts receivable mailbox.
  • Each message is analysed to determine whether or not it from a supplier and is issuing/contains an invoice.
  • For each valid message, the attachments are downloaded and non-invoice documents are filtered out via AI Vision classification.
  • Invoices are then processed through a AI vision model again to extract the details.
  • The extracted data can then be used for reconciliation or otherwise. For this demonstration, we'll just append the row to an Excel sheet for now.

How to use

  • Ensure your Microsoft365 credential points to the correct mailbox. If a shared folder is used, toggle "shared folder" option to "on" and for the principal ID, use the email address.
  • If you receive lots of other types of messages such as replies and forwards, you may want to implement additional checks to prevent processing invoices twice. The "remove duplicates" node can help with this.

Requirements

  • Outlook for Mailbox
  • Google Gemini for Document Understanding and Invoice Extraction
  • Excel for Data Storage

Customising this workflow

  • Note the assumption for this template is that all invoices will come as a PDF attachment. In real life, this is rarely the case! Adding in document conversion to cover all invoice formats.
  • Human feedback is also an important factor in AI workflows. Try tagging emails as a way to notify team members that the invoice was processed.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Split Attachments

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 2 - Download Attachments

Type / Role
n8n-nodes-base.microsoftOutlook - microsoftOutlook
Config choices
Version 2

Block 3 - Parse Output

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 4 - For Each Message

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 5 - Message Ref

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 6 - Message Classifier

Type / Role
@n8n/n8n-nodes-langchain.textClassifier - textClassifier
Config choices
Version 1

Block 7 - Extract from File

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1

Block 8 - Markdown

Type / Role
n8n-nodes-base.markdown - markdown
Config choices
Version 1

Block 9 - Empty Response

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 10 - Wait

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 11 - Filter Invoices

Type / Role
n8n-nodes-base.filter - filter
Config choices
Version 2.2

Block 12 - Has Invoice?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 13 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 14 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Get Recent Messages

Type / Role
n8n-nodes-base.microsoftOutlook - microsoftOutlook
Config choices
Version 2

Block 17 - Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 18 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Microsoft Excel 365

Type / Role
n8n-nodes-base.microsoftExcel - microsoftExcel
Config choices
Version 2.1

Block 20 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Invoice Classifier With Gemini 2.0

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 23 - File-Based OCR with Gemini 2.0

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 24 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Parse incoming invoices from Outlook using AI Document Understanding
Complexity advanced
Nodes 24
Categories Invoice Processing, AI Summarization
Author Jimleuk
Published 01 Apr 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3396/3396.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Parse incoming invoices from Outlook using AI Document Understanding do?

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 temp...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Invoice Processing, AI Summarization use case.