n8n
Automation
Invoice Parsing in n8n — Automate Receipt & Invoice Extraction (No Code)
If invoices arrive in your inbox and you're still typing the data out manually, this workflow eliminates that entirely.
Trusted by developers worldwide to automate document workflows.
✓ Free DocuParseAPI account✓ n8n account✓ A destination app
The guide
1
Get your API key
Sign up at docuparseapi.com/signup. Go to Dashboard → API Keys → Create new key. Copy it — starts with dex_.
2
Create a new workflow
In n8n click New Workflow. Add a trigger: Gmail Trigger → New Attachment for email invoices, or Manual Trigger for testing.
3
Add an HTTP Request node
After the trigger, add an HTTP Request node. Configure it exactly as shown below:
Method: POST
URL: https://docuparseapi.com/api/v1/extract
Authentication: Header Auth
Header Name: Authorization
Header Value: Bearer YOUR_API_KEY
Body Content Type: Multipart/Form-Data
Body Parameter Name: file
Body Parameter Value: {{ $binary.data }}
Body Parameter Type: File/BinaryNeed your API key first?
20 free documents/month — no credit card
4
Map the fields
Add a Set node after HTTP Request. Map these fields:
merchant → {{ $json.merchant }}
total → {{ $json.total }}
tax → {{ $json.tax }}
currency → {{ $json.currency }}
date → {{ $json.date }}
invoice_id → {{ $json.invoice_id }}5
Send to your destination
Add Google Sheets → Append Row. Map the Set node fields to your sheet columns. Done — every invoice creates a new row automatically. Add an IF node after HTTP Request to handle errors: condition {{ $json.success }} equals true, false path sends a Slack notification with {{ $json.error.code }}.
Full working example
json
{
"name": "Invoice Parser — DocuParseAPI",
"nodes": [
{ "name": "Manual Trigger", "type": "n8n-nodes-base.manualTrigger", "position": [250, 300] },
{ "name": "Extract Invoice", "type": "n8n-nodes-base.httpRequest", "position": [460, 300],
"parameters": {
"method": "POST",
"url": "https://docuparseapi.com/api/v1/extract",
"authentication": "headerAuth",
"sendBody": true,
"contentType": "multipart-form-data",
"bodyParameters": { "parameters": [{
"name": "file",
"value": "={{ $binary.data }}",
"parameterType": "formBinaryData"
}] }
}
},
{ "name": "Map Fields", "type": "n8n-nodes-base.set", "position": [680, 300],
"parameters": { "values": { "string": [
{ "name": "merchant", "value": "={{ $json.merchant }}" },
{ "name": "total", "value": "={{ $json.total }}" },
{ "name": "currency", "value": "={{ $json.currency }}" },
{ "name": "date", "value": "={{ $json.date }}" }
] } }
}
]
}What gets extracted
Common errors and fixes
Ready to start?
20 documents free every month. No credit card. Set up in 5 minutes.
Get Your Free API Key