Skip to product information

n8n Gmail PDF OCR & AI Classification → Google Drive, Slack

n8n Gmail PDF OCR & AI Classification → Google Drive, Slack

 (200+Reviews)
Regular price £64.99
Regular price £64.99 Sale price
SAVE Sold out
Instant Digital Download
Unlimited Downloads
Lifetime Access in Your Account
🔥
128+ Sold
Popular with n8n builders
23 people viewing
High interest right now
9 added today
Fast-moving digital product
n8n Gmail PDF OCR & AI Classification → Google Drive, Slack

n8n Gmail PDF OCR & AI Classification → Google Drive, Slack

Regular price £64.99
Regular price £64.99 Sale price
SAVE Sold out

Automatically OCR, classify, and file your PDF invoices & documents from Gmail—into Google Drive with Slack alerts

This n8n workflow watches your Gmail inbox for PDF attachments, performs OCR when needed, uses Anthropic Claude to classify and extract key fields, then organizes each PDF into the right Google Drive folder, logs everything in Google Sheets, and notifies your team in Slack.

What this workflow does

  • Runs every minute in n8n and triggers on emails that match has:attachment filename:pdf.
  • Downloads all PDF attachments and splits the email into one item per attachment so each PDF is processed individually.
  • Uses pdfRest to read PDF metadata (including page count) and detect whether the PDF is image-only.
  • If OCR is needed, runs pdfRest OCR to make scanned documents searchable.
  • Converts the PDF to Markdown via pdfRest, then uses n8n’s Information Extractor with Anthropic Claude to classify the document and extract fields such as counterparty and document date.
  • Routes the document based on the extracted classification (e.g., invoice, contract, correspondence, or other), and uploads the PDF to the corresponding Google Drive folder with a structured filename.
  • Appends a row to a Google Sheets index with email details, extracted fields, page count, OCR flag, and the Google Drive link.
  • Sends a one-line Slack notification containing the same Drive link.

Use cases

  • Auto-file incoming vendor invoices from Gmail into the correct Google Drive folder for faster AP workflows.
  • Process scanned contracts and ensure OCR + metadata extraction before archiving.
  • Maintain an audit-friendly document index in Google Sheets with Slack alerts for newly received documents.

Technical details

  • Trigger: Gmail (search query: has:attachment filename:pdf) every minute
  • OCR & PDF handling: pdfRest community node (@pdfrest/n8n-nodes-pdfrest)
  • AI extraction: Anthropic Claude via n8n Information Extractor
  • Integrations: Google Drive, Google Sheets, Slack
  • Workflow components: if, set, code, merge, slack, switch
View full details