AI-Filtered Gmail→Google Drive PDF Router
AI-Filtered Gmail→Google Drive PDF Router
Couldn't load pickup availability
This production-grade automation watches your Gmail inbox for new emails with attachments, intelligently inspects each file with OpenAI, and uploads only the relevant PDFs (e.g., invoices, payslips, contracts) to the correct Google Drive folder. It’s built with safeguards for large files, strict PDF checks, and configurable matching rules—so you get a zero-touch, low-risk pipeline from inbox to archive.
What it does (key mechanics)
-
Email trigger with attachments: Polls Gmail, downloads attachments, and branches if none are present.
-
Attachment iteration: Splits a single email into per-file items for precise handling.
-
PDF gating + text extraction: Confirms the file is a PDF and reads its text before any AI call.
-
Token-safe AI filtering: Enforces a token budget and asks OpenAI to return a strict
true/falseon whether the document matches your “Match on” term (e.g., payslip). -
Deterministic routing: Only “matched” PDFs are uploaded to the specified Google Drive folder. Non-PDFs, oversized, or non-matching files are safely ignored.
-
Simple configuration hub: One place to set match term, token sizes, and target Drive folder.
Why it’s a game-changer
-
Eliminates manual triage: No more downloading, opening, checking, and re-filing attachments.
-
Reduces compliance risk: Minimizes human error in routing sensitive docs.
-
Scales cleanly: Handles high-volume inboxes by parallelizing per-attachment processing.
-
Fast to adapt: Switch the “Match on” term to retarget the workflow (invoice → receipt → contract) in seconds.
Ideal for finance ops, payroll, accounts payable/receivable, HR intake, and any team that receives repeatable document types via email.
This isn’t a simple template—it’s a business-critical ingestion system with: robust token-safety controls, strict PDF gating, AI false-positive reduction via deterministic prompts, Drive folder ID parsing, and per-attachment isolation to prevent cross-contamination of items. For a team receiving ~50 document emails/day, this typically replaces 1–2 hours/day of admin labor (~20–40 hrs/month). At $30–$50/hr fully loaded, that’s $600–$2,000/month saved, plus avoided misfiling risk and faster downstream processing—ROI in 3–10 months, then pure operational leverage thereafter.
(Optional care plan: $250/month for monitoring, updates, and match-term tuning.)
Share
