Automate Invoice Processing with Gmail, OCR.space, Slack & Xero — n8n ワークフロー
概要
How It Works
Trigger: Watches for new emails in Gmail with PDF/image attachments.
OCR: Sends the attachment to OCR.space API (https://ocr.space/OCRAPI) to extract invoice text.
Parsing: Extracts key fields:
Vendor
Invoice number
Amount
Currency
Invoice date
Due date
Description
Validation Logic:
Checks if amount is valid
Ensures vendor and invoice number are present
Flags high-value invoices (e.g., over $10,000)
Routing:
If invalid:
使用ノード
Google SheetsHTTP RequestSlackXeroGmailCode
ワークフロープレビュー
⚡
G
Gmail Trigger
Code in JavaScript
Append or update row in …
Slack Approval Request
Slack Rejection message
C
Check Qualification
Parse Invoice Data
Format for Slack
Rejection message
Success message
Update Rejected Status
Update Approved Status
Add Processed label
Add Rejected label
Get many contacts
Clean Invoice Payload
Create invoice
H
Has Valid Attachment?
W
Was Approved?
Extract Text
20 nodes19 edges
仕組み
- 1
トリガー
このワークフローは トリガー トリガーで開始します。
- 2
処理
データは 20 個のノードを流れます, connecting code, gmail, gmailtrigger。
- 3
出力
ワークフローは自動化を完了し、設定された宛先に結果を配信します。
ノード詳細 (20)
GO#1
Google Sheets
googleSheets
HT#2
HTTP Request
httpRequest
SL#3
Slack
slack
XE#4
Xero
xero
GM#5
Gmail
gmail
CO#6
Code
code
このワークフローのインポート方法
- 1右側の JSONをダウンロード ボタンをクリックしてワークフローファイルを保存します。
- 2n8nインスタンスを開き、ワークフロー → 新規 → ファイルからインポート に進みます。
- 3ダウンロードした
automate-invoice-processing-with-gmail-ocrspace-slack-xeroファイルを選択し、インポートをクリックします。 - 4各サービスノードの 認証情報(APIキー、OAuthなど)を設定します。
- 5ワークフローをテスト をクリックして動作確認し、有効化します。
またはn8nの JSONからインポート に直接貼り付け:
{ "name": "Automate Invoice Processing with Gmail, OCR.space, Slack & Xero", "nodes": [...], ...}
インテグレーション
codegmailgmailtriggergooglesheetshttprequestifslackxero
作成者
Abi Odedeyi
@abiodedeyi
タグ
codegmailgmailtriggergooglesheetshttprequestifslackxero