Extract invoice data into CSV files and Google Sheets using OCR.space
Ready for 3.0What this workflow does
This workflow has 9 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Google Sheets. It also calls api.ocr.space over HTTP.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- OCR via OCR.space (HTTP Request): calls api.ocr.space (POST)
- OCR Succeeded? (If): checks a condition and branches into true / false
- Respond OCR Error (Respond to Webhook): sends the response back to the webhook caller
- Extract Invoice Fields (Code): runs custom JavaScript code
- Respond Success (Respond to Webhook): sends the response back to the webhook caller
- Append to Google Sheet (Google Sheets): append (sheet)
- Convert to CSV (Convert to File): converts data to a file (csv)
- Save CSV to Disk (Read/Write Files from Disk): writes a file to disk
Services it uses
HTTP calls to: api.ocr.space
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.
Nodes used (8)
- Webhook
n8n-nodes-base.webhook - HTTP Request
n8n-nodes-base.httpRequest - If
n8n-nodes-base.if - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - Convert to File
n8n-nodes-base.convertToFile - Read/Write Files from Disk
n8n-nodes-base.readWriteFile - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
Quick overview This workflow receives invoice PDFs or images via a webhook, extracts text using OCR.space, parses key invoice fields and line items with deterministic rules, and then saves the results as a CSV file and optionally appends them to Google Sheets…