Templates / Save n8n Cloud invoices received in Gmail in Google Drive

Save n8n Cloud invoices received in Gmail in Google Drive

Ready for 3.0

by Niklas Hatje ✓ · 3,656 views · created 2024-08-28 · Invoice Processing

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What 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.

  1. Setup (Edit Fields (Set)): sets 2 fields: api_key, url_to_drive_folder
  2. Only n8n Paddle invoice mails (If): checks a condition and branches into true / false
  3. Extract "a-tags" from email (HTML): parses or builds HTML
  4. Split Out: splits a list into separate items
  5. Only keep invoice link (Filter): keeps only the items that match a condition
  6. Download Invoice PDF from URL (HTTP Request): calls api.pdflayer.com
  7. Upload PDF to Drive (HTTP Request): calls googleapis.com (POST)
  8. Rename file (Google Drive): update
  9. Move to the correct folder (Google Drive): move

Services it uses

GmailGoogle Drive

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)

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…

Excerpt from Niklas Hatje's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.