OCR receipts from Google Drive
Configured with Google Drive, Google Drive Trigger, Google Sheets, HTTP Request. Review the connections and setup before adapting this template.
Node categories in this workflow
- Trigger
- Web / API
- Code
- Files / media
- Transform
- Data store
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| When clicking ‘Test workflow’ | Trigger | Manual Trigger | See node parameters |
| OCR recognize | Web / API | HTTP Request | POST |
| Unserialize response JSON | Code | Code | See node parameters |
| On new file in Google Drive | Trigger | Google Drive Trigger | See node parameters |
| Load files from Google Drive folder | Files / media | Google Drive | fileFolder |
| Filter processed files | Transform | Merge | See node parameters |
| Download file for OCR | Files / media | Google Drive | download |
| Save OCR result into Sheets | Data store | Google Sheets | appendOrUpdate |
| Get already processed rows from Sheets | Data store | Google Sheets | See node parameters |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
googleDriveOAuth2ApigoogleSheetsOAuth2ApihttpHeaderAuth
Workflow notes
Recognize invoices and convert them into structured JSON
Recognize invoices and convert them into structured JSON
Video Demo
https://youtu.be/mGPt7fqGQD8
Quick OCR playground
1. Get your OakPDF OCR API key here:
https://rapidapi.com/restyler/api/receipt-and-invoice-ocr-api
2. Poceed to the OCR Playground and upload your document or use example files:
https://ocr.oakpdf.com/
The API can recognize any document format: medical, financial, legal -- let me know which format you want to try and I will be happy to add it to the Playground!
Running the n8n Workflow
This workflow allows you to recognize a folder with receipts or invoices (make sure your files are in .pdf, .png, or .jpg format). The workflow can be triggered via the "Test workflow" button, and it also monitors the folder for new files, automatically recognizing them.
1. n8n import glitch
After import, the trigger node "When clicking 'Test workflow'" might be disconnected. You need to connect it via 2 arrows to "Google Sheets1" and "Google Drive" nodes. So, the workflow has 2 triggers - via button, and via Google Sheets "new file" event - both of these triggers should be connected to 2 nodes. Here is how it should looks like: https://ocr.oakpdf.com/n8n_fix.png
2. Set up RapidAPI HTTP auth key
Create new "HTTP header" n8n credential and paste your RapidAPI key from https://rapidapi.com/restyler/api/receipt-and-invoice-ocr-api into it. https://ocr.oakpdf.com/n8n_api_key.png
Make sure "HTTP Request" node uses this credential.
3. Set up your Google Auth
You need a Google connection to work with your Google Sheets and Google Drive accounts: https://docs.n8n.io/integrations/builtin/credentials/google/oauth-generic/#finish-your-n8n-credential
4. Set up Google Sheets
Copy this Google Sheets document: https://docs.google.com/spreadsheets/d/REPLACE_WITH_DOCUMENT_ID/edit?usp=sharing
Custom document formats and advanced usage
Email: user@example.com Linkedin: https://www.linkedin.com/in/anthony-sidashin/
OCR receipts from Google Drive
OCR receipts from Google Drive
Purpose and structure
This folder contains the OCR receipts from Google Drive workflow. Its executable nodes use code, googleDrive, googleDriveTrigger, googleSheets, httpRequest, manualTrigger, merge. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
When clicking ‘Test workflow’, On new file in Google Drive
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Code/1839_Code_Manual_Automation_Webhook.json MIT; preserve source notices.