Templates / Route Gmail PDF attachments with pdfRest OCR and Google Drive

Route Gmail PDF attachments with pdfRest OCR and Google Drive

Unknown

by pdfRest API Toolkit ✓ · 0 views · created 2026-11-19

Unknown. This template uses community nodes we can't verify statically. Uses community nodes that can't be verified statically (unverified community packages are off by default in 3.0). Static check, last run 2026-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This workflow has 39 nodes and runs on Gmail events. Along the way it connects Gmail, Google Drive and Pdfrest (community). It also calls api.pdfrest.com over HTTP.

How it runs

Trigger: On Gmail events.

  1. Configure and split PDF attachments (Code): runs custom JavaScript code
  2. One attachment per review (Loop Over Items (Split in Batches)): loops over the items in batches
  3. Check attachment before processing (Code): runs custom JavaScript code
  4. Attachment within limit? (If): checks a condition and branches into true / false
  5. Record attachment held (Code): runs custom JavaScript code
  6. Inspect attachment text (Extract from File): extracts data from a file (pdf)
  7. Create restricted audit receipt (Code): runs custom JavaScript code
  8. Detect pages that need OCR (Code): runs custom JavaScript code
  9. Save restricted receipt (Google Drive): upload (file)
  10. Add OCR? (If): checks a condition and branches into true / false

…plus 28 more steps. See the full node list below.

Services it uses

GmailGoogle DrivePdfrest (community)

HTTP calls to: api.pdfrest.com

Before you upgrade to n8n 3.0

We can't fully verify this one: it relies on 1 community package, and n8n 3.0 turns unverified community packages off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).

  • Check that @pdfrest/n8n-nodes-pdfrest is verified or supports 3.0 (used in Add searchable text).
  • Also check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll).
Check at runtime on n8n 3.0
  • Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Informational: a static scan can't see the data, so test these on your own instance. Status above is unchanged.

Nodes used (9)

From the author

Quick overview This workflow watches Gmail for emails with PDF attachments, extracts per-page text to detect scanned documents, runs OCR via pdfRest when needed, classifies each PDF using keyword rules, and uploads the file to the appropriate Google Drive…

Excerpt from pdfRest API Toolkit'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.