PICKED FROM N8N.IO · FINANCE & ADMIN

New Gmail emails with a PDF or image invoice are sent to OCR.space to read the text. The workflow checks the vendor, number and amount, logs valid invoices to Google Sheets, asks the finance team in Slack to approve, then creates a draft invoice in Xero and labels the email.

Template by Abi Odedeyi · 754 views on n8n.io · listed there as “Automate invoice processing with Gmail, OCR.space, Slack & Xero”

THE WORKFLOW20 NODES
@Gmail Trigger{}Code inJavaScript▦Append or updaterow in sheet#Slack ApprovalRequest#Slack Rejectionmessage⑂CheckQualification{}Parse InvoiceData{}Format for Slack#Rejection message#Success message▦Update RejectedStatus▦Update ApprovedStatus@Add Processedlabel@Add RejectedlabelXGet many contacts{}Clean InvoicePayload↯Create invoice⑂Has ValidAttachment?⑂Was Approved?↯Extract Text
DIFFICULTY
Advanced
NODES
20
USES AI
No
PUBLISHED
October 2025

001 / WHAT HAPPENS

  1. 01

    A Gmail trigger watches for emails with PDF or image attachments.

  2. 02

    The attachment is sent to the OCR.space API to extract text.

  3. 03

    Code steps pull out vendor, invoice number, amounts and dates, and check they are valid.

  4. 04

    Invalid invoices are flagged in Slack and labelled Rejected in Gmail.

  5. 05

    Valid invoices are logged in Sheets, approved in Slack, then created as a draft invoice in Xero.

WHO IT SUITS

Suits a small business that uses Xero and Slack and wants invoices checked by a person before a draft is created.

CONNECTS

  • Gmail
  • Slack
  • Google Sheets
  • Xero
  • OCR.space

002 / BEFORE YOU USE IT HERE

  • !OCR.space is a paid or free-tier US-hosted API, so invoice contents leave Australia, which counts as a cross-border disclosure under APP 8 of the Privacy Act.
  • !The Xero step creates an invoice through an HTTP request and uses regex parsing, so test with real invoices and confirm GST and the bill-versus-invoice type.
  • !Sheet columns, Slack channel and the high-value threshold are examples to replace.

LOCAL SWAP

Swap the Xero HTTP request for the QuickBooks or MYOB API if you use those, as MYOB has no built-in n8n node.

Need n8n and the AI hosted in Australia? →

004 / QUESTIONS

Anything else is quicker to answer on a call. Thirty minutes, free, with the people who would build it.

Yes. Every template on this list is free on n8n.io. You need an n8n account (n8n Cloud or self-hosted) and accounts for the apps it connects to, some of which charge for API use.

We adapt templates to your systems, add approval steps where customers are involved, host n8n in Australia when the data calls for it and hand it over documented.

Book a free call→