Split multi-invoice PDFs into invoices with Extend and Google Sheets
Ready for 3.0What this workflow does
This workflow has 17 nodes and runs when someone submits an n8n form (“Upload an invoice PDF”). Along the way it connects Google Sheets. It also calls api.extend.ai over HTTP.
How it runs
Trigger: When someone submits an n8n form (“Upload an invoice PDF”).
- Post PDF to Extend API (HTTP Request): calls api.extend.ai (POST)
- Set OCR and Score Thresholds (Edit Fields (Set)): sets 3 fields: ocrThreshold, reviewScoreThreshold, mathTolerance
- Format Error Data (Code): runs custom JavaScript code
- Post Split Run to API (HTTP Request): calls api.extend.ai (POST)
- Append Error to Sheets (Google Sheets): append
- Wait: pauses before continuing
- Fetch Split Run Status (HTTP Request): calls an HTTP API
- Route by Split Status (Switch): routes items into 2 branches
- Process Invoice Splits (Code): runs custom JavaScript code
- Check Invoices Found (If): checks a condition and branches into true / false
…plus 6 more steps. See the full node list below.
Services it uses
HTTP calls to: api.extend.ai
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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (8)
- n8n Form Trigger
n8n-nodes-base.formTrigger - HTTP Request
n8n-nodes-base.httpRequest - Edit Fields (Set)
n8n-nodes-base.set - Wait
n8n-nodes-base.wait - Switch
n8n-nodes-base.switch - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Google Sheets
n8n-nodes-base.googleSheets
From the author
Quick overview This workflow collects an uploaded multi-invoice PDF via an n8n form, uses Extend to split it into individual invoices and extract key invoice fields, then writes normalized invoice rows to Google Sheets while logging failures and “no invoice…