Templates / Automatically rename Gmail attachments with GPT-4o and save to Google Drive

Automatically rename Gmail attachments with GPT-4o and save to Google Drive

Ready for 3.0

by Matt Chong | n8n Creator ✓ · 1,831 views · created 2025-08-19 · AI Summarization, Multimodal AI

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This AI workflow has 10 nodes and runs on a schedule (every hour). Along the way it connects OpenAI Chat Model, Google Drive and Gmail.

How it runs

Trigger: On a schedule (every hour).

  1. Get Unread Messages with Attachments (Gmail): get many
  2. Set Required Fields (Edit Fields (Set)): sets 4 fields: id, threadId, from.value[0].name…
  3. Download Attachments (Gmail): get
  4. Extract from Attachments (Extract from File): extracts data from a file (pdf)
  5. AI Agent: runs an AI agent, with model: OpenAI Chat Model
  6. Merge: merges the data from its input branches
  7. Upload file (Google Drive): uses Google Drive
  8. Mark message as read (Gmail): mark as read

Services it uses

OpenAI Chat ModelGoogle DriveGmail

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (8)

From the author

Automatically Rename Gmail Attachments with AI and Save to Google Drive Who is this for? This workflow is perfect for anyone who regularly receives important email attachments like reports, invoices, or PDFs and wants them: - Renamed using clean AI generated…

Excerpt from Matt Chong | n8n Creator'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.