Templates / Automate invoice processing with Gmail, OCR.space, Slack & Xero

Automate invoice processing with Gmail, OCR.space, Slack & Xero

Ready for 3.0

by Abi Odedeyi ✓ · 750 views · created 2025-10-19 · Invoice Processing, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 20 nodes and runs on Gmail events. Along the way it connects Gmail, Google Sheets, Slack and Xero. It also calls api.ocr.space and api.xero.com over HTTP.

How it runs

Trigger: On Gmail events.

  1. Code: runs custom JavaScript code
  2. Has Valid Attachment? (If): checks a condition and branches into true / false
  3. Extract Text (HTTP Request): calls api.ocr.space (POST)
  4. Parse Invoice Data (Code): runs custom JavaScript code
  5. Check Qualification (If): checks a condition and branches into true / false
  6. Append or update row in sheet (Google Sheets): append or update
  7. Slack: uses Slack
  8. Format for Slack (Code): runs custom JavaScript code
  9. Clean Invoice Payload (Code): runs custom JavaScript code
  10. Slack: send and wait for a reply

…plus 9 more steps. See the full node list below.

Services it uses

GmailGoogle SheetsSlackXero

HTTP calls to: api.ocr.space, api.xero.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.

  • Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (Gmail Trigger).

Nodes used (8)

From the author

How It Works 1. Trigger: Watches for new emails in Gmail with PDF/image attachments. 2. OCR: Sends the attachment to OCR.space API to extract invoice text. 3. Parsing: Extracts key fields: - Vendor - Invoice number - Amount - Currency - Invoice date - Due…

Excerpt from Abi Odedeyi's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.