Extract tracking numbers from Gmail PDF attachments to Google Sheets with okraPDF
Ready for 3.0What this workflow does
This workflow has 9 nodes and runs on Gmail events. Along the way it connects Gmail and Google Sheets. It also calls api.okrapdf.com over HTTP.
How it runs
Trigger: On Gmail events.
- If: checks a condition and branches into true / false
- Configure OCR Options (Edit Fields (Set)): sets 3 fields: okra_parser, okra_parse_pages, okra_metadata_source
- Upload attachment_0 to okraPDF (HTTP Request): calls api.okrapdf.com (POST)
- OCR Parse Uploaded PDF (HTTP Request): calls api.okrapdf.com (POST)
- Wait: waits 15 seconds
- Get Job Result (HTTP Request): calls an HTTP API
- If: checks a condition and branches into true / false
- Append Tracking Row to Sheets (Google Sheets): append
Services it uses
Other Google Sheets + Gmail templates (2,102)
HTTP calls to: api.okrapdf.com
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 (6)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - If
n8n-nodes-base.if - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - Wait
n8n-nodes-base.wait - Google Sheets
n8n-nodes-base.googleSheets
From the author
Quick Overview This workflow monitors unread Gmail messages with PDF attachments, sends the first PDF to okraPDF for OCR parsing, then extracts likely tracking numbers from the OCR text and appends the email and parse details as a new row in Google Sheets.…