Auto-Rename Gmail Attachments with GPT-4o & Save to Google Drive

Downloads unread Gmail attachments, uses GPT-4o to generate smart filenames from PDF content, and organizes them in Google Drive. Marks emails as read to prevent duplicates.

n8n
Auto-Rename Gmail Attachments with GPT-4o & Save to Google Drive

This workflow automates the tedious task of managing email attachments by checking Gmail hourly for unread emails with attachments. It downloads PDFs, extracts their content, and leverages GPT-4o to analyze and generate descriptive filenames in the format YYYYMMDD-keyword-summary.pdf, ensuring files are intuitively named based on their actual content rather than generic labels like 'Attachment 1.pdf'.

Perfect for freelancers, accountants, business owners, and anyone dealing with frequent invoices, reports, or documents via email. It eliminates manual renaming and sorting, saving hours of productivity while keeping your Google Drive folders neat and searchable.

Setup is straightforward: connect Gmail, Google Drive, and OpenAI credentials in n8n. Customize the target Drive folder, AI prompt, or schedule interval. Benefits include reduced errors, consistent organization, and seamless integration—no more cluttered drives or lost files.

After renaming and uploading, it marks the email as read to avoid reprocessing, ensuring efficient, one-time handling. Ideal for high-volume email users seeking AI-powered file management without manual intervention.

$22.99
Last updated October 3, 2026
30-day money-back guarantee
Instant download
Lifetime updates included

New buyers can create an account from the cart to unlock a controlled $10 first-purchase credit on eligible orders of $25+.

Secure checkout powered by Stripe

Support

How to import this workflow into n8n

  1. 1Purchase or download the workflow to get the n8n workflow JSON file.
  2. 2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
  3. 3Open each node marked with a credential warning and connect your own accounts and API keys.
  4. 4Run the workflow once manually to verify the data flow, then toggle it to Active.

Related Business Intelligence workflows

More from Jose Maurino

Need this deployed? We'll set it up for you.

Our automation experts deploy this workflow in your stack, connect your accounts, and verify it works — or build a custom solution from scratch.