Save n8n Cloud invoices received in Gmail in Google Drive
Ready for 3.0What this workflow does
This workflow has 11 nodes and runs on Gmail events. Along the way it connects Gmail and Google Drive. It also calls api.pdflayer.com and googleapis.com over HTTP.
How it runs
Trigger: On Gmail events.
- Setup (Edit Fields (Set)): sets 2 fields: api_key, url_to_drive_folder
- Only n8n Paddle invoice mails (If): checks a condition and branches into true / false
- Extract "a-tags" from email (HTML): parses or builds HTML
- Split Out: splits a list into separate items
- Only keep invoice link (Filter): keeps only the items that match a condition
- Download Invoice PDF from URL (HTTP Request): calls api.pdflayer.com
- Upload PDF to Drive (HTTP Request): calls googleapis.com (POST)
- Rename file (Google Drive): update
- Move to the correct folder (Google Drive): move
Services it uses
HTTP calls to: api.pdflayer.com, googleapis.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.
- Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (Gmail Trigger).
Nodes used (9)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - If
n8n-nodes-base.if - Split Out
n8n-nodes-base.splitOut - Filter
n8n-nodes-base.filter - No Operation, do nothing
n8n-nodes-base.noOp - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - Google Drive
n8n-nodes-base.googleDrive - HTML
n8n-nodes-base.html
From the author
Who this is for This template is for everyone that wants to download their n8n Cloud invoices automatically as a PDF instead of downloading them manually. How it works This workflow checks your Gmail inbox for new n8n invoice emails from n8n's payment…