n8n

How to Automate Outlook to Excel Invoice Capture?

Collect supplier invoices from Outlook, read the PDFs with AI, and add the key fields into Excel for easy review. Ideal for finance and operations teams that get many invoices by email and want clean, structured data without manual entry.

A scheduled check grabs recent Outlook emails with attachments, converts the email body to markdown, and uses an AI classifier to find messages that are actually about invoices. For each valid email, the workflow downloads attachments, splits them, and uses AI vision to keep only real invoices. It then runs file based OCR to pull details like supplier, invoice number, date, and totals. The result is merged with email metadata and sent to a Microsoft Excel table. A safety path handles non invoices so runs do not fail, while a Wait step controls pacing.

You will need a Microsoft 365 mailbox, an Excel workbook with a table, and a Google Gemini API key. Expect less manual sorting and faster data entry, which can cut daily effort by a large margin and reduce common copy errors. Great for accounts payable intake, vendor billing capture, and shared mailbox processing in finance teams.

What are the key features?

  • Scheduled fetch of recent Outlook emails with attachments and date filters
  • AI email intent classification to detect invoice related messages
  • HTML to markdown conversion for cleaner context during classification
  • Attachment download and splitting to handle multiple files per email
  • AI vision check to filter out non invoice documents before OCR
  • File based OCR with Gemini to extract invoice fields from PDFs
  • JSON parsing and merge with original email metadata for traceability
  • Conditional paths and safe empty response when no invoice is found
  • Append structured results to a Microsoft Excel table for review
  • Wait control to pace processing and avoid hitting service limits

What are the benefits?

  • Reduce manual sorting and data entry from hours to minutes
  • Automate up to 80 percent of invoice triage and routing
  • Improve data accuracy by reducing copy paste errors
  • Connect Outlook and Excel so finance data stays in one place
  • Scale to handle more invoices without adding headcount
  • Keep processing stable with fallbacks for non invoice emails

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Microsoft Outlook, Google Gemini and Microsoft Excel 365. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, create a Microsoft Outlook OAuth2 credential. Double click the Get Recent Messages node, choose your credential, and if a shared mailbox is used, enable the shared folder option and set the principal ID to the mailbox email.
  4. Open the Get Recent Messages node and confirm filters: received after the last hour, has attachments is true, and the folder scope is correct. Click Execute Node to verify you can fetch sample emails.
  5. Set up the Google Gemini credential. Double click the Model, Invoice Classifier With Gemini 2.0, and File Based OCR with Gemini 2.0 nodes, choose Create new credential, and enter your API key from the Google AI Studio API page. Name the credential clearly.
  6. Connect your Microsoft Excel 365 account. In the Microsoft Excel 365 node, choose or create an OAuth2 credential with your Microsoft account.
  7. Select the target Excel workbook, worksheet, and table in the Microsoft Excel 365 node. Map fields from the extracted JSON such as supplier, invoice number, date, total, plus email subject, sender, and received time.
  8. Review the Message Classifier categories and prompt. If you get too many false positives or negatives, refine the category description to better match your invoice emails.
  9. Send a test email with a PDF invoice to the mailbox. Run the workflow once and check the Has Invoice and Parse Output nodes to confirm the extracted JSON looks correct.
  10. Confirm the Excel row is appended as expected. If the node fails, ensure the table exists and column names match the mapped fields.
  11. If attachments are missed, check the Download Attachments node permissions and make sure Extract from File is receiving the right binary data from Split Attachments. Adjust the schedule interval to fit your volume.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Google Gemini

Sign up

Free tier: $0 via Gemini API; e.g., Gemini 2.5 Flash-Lite free limits 1,000 requests/day (15 RPM, 250k TPM). Paid from $0.10/1M input tokens and $0.40/1M output tokens.

Microsoft Excel 365

Sign up

Microsoft 365 Business Basic: $6.00 user / mo (annual), includes web / mobile Excel and 1 TB OneDrive

Microsoft Outlook

Sign up

Exchange Online (Plan 1): $4.00 user / mo (annual billing)

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.