Templates / Classify and file email PDF documents with Gmail, pdfRest, Drive and Claude

Classify and file email PDF documents with Gmail, pdfRest, Drive and Claude

Unknown

by pdfRest API Toolkit ✓ · 21 views · created 2026-09-17 · Document Extraction, AI Summarization

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-10-19.

What this workflow does

This AI workflow has 22 nodes and runs on Gmail events. Along the way it connects Gmail, Google Drive, Google Sheets and Slack and 2 more.

How it runs

Trigger: On Gmail events.

  1. Set Folder and Index IDs (Edit Fields (Set)): sets 7 fields: invoiceFolderId, contractFolderId, correspondenceFolderId…
  2. Extract Each Attachment (Code): runs custom JavaScript code
  3. Check PDF Format (If): checks a condition and branches into true / false
  4. Fetch PDF Metadata (Pdf Rest): pdf info
  5. Merge: merges the data from its input branches
  6. Check OCR Requirement (If): checks a condition and branches into true / false
  7. Apply OCR to PDF (Pdf Rest): ocr
  8. Set OCR Status Skipped (Edit Fields (Set)): sets 1 field: ocrApplied
  9. Set OCR Status Applied (Edit Fields (Set)): sets 1 field: ocrApplied
  10. Convert PDF to Markdown (Pdf Rest): convert markdown

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

Services it uses

GmailGoogle DriveGoogle SheetsSlackAnthropic Chat ModelPdfrest (community)

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 Fetch PDF Metadata, Apply OCR to PDF, Convert PDF to Markdown).
  • Also check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll).

Nodes used (12)

From the author

Quick overview This workflow monitors Gmail for emails with PDF attachments, OCRs scanned documents with pdfRest when needed, converts PDFs to Markdown, uses Anthropic Claude via n8n's Information Extractor to classify and extract key fields, then files each…

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.