Skip to content
Search prompts, tools, agents…

Email Attachments to Drive and Spreadsheet Log

File safe email attachments into month folders with clean names and a searchable log, with type and size rules and a four-platform build guide.

Free 3 views 0 copies 0 downloads

This workflow files email attachments automatically. It watches for emails you have labelled, saves each safe attachment into a cloud folder organised by month with a clear file name, and records every file in a spreadsheet so you can search and find it later.

At a glance

Trigger A new email with an attachment that has a chosen label or folder
Result Files saved in Drive or OneDrive, a log row per file and the email marked as processed
Platforms Make, Zapier, n8n, Power Automate
Difficulty Beginner
Setup time 45 to 90 minutes
Human approval None needed for filing. Review the log occasionally.

What it does and does not do

It does It does not
Save allowed file types with a consistent name Open or run files
Sort files into folders by month Scan files for malware (use your email provider’s protection)
Log date, sender, subject and link Delete emails or attachments
Mark emails so they are not processed twice Read the content of attachments

Before you start

  • An email account where you can create a label or folder (for example “To file”) and a second one for “Filed”.
  • A cloud folder to receive files, with permission to create subfolders.
  • A spreadsheet with a log table (below).
  • A rule for which emails get the label. You can apply it manually or with a mail filter.

Prepare the log sheet

Column Purpose
Date received When the email arrived
Sender Who sent it
Subject Email subject
Original file name As received
Saved file name After renaming
File link Link to the saved file
Status Saved, Skipped (type), Skipped (size) or Error

Naming and rules

  • File name pattern: YYYY-MM-DD_sender_original-name. Remove characters that file systems do not allow.
  • Folder pattern: Parent folder, then year, then month (for example 2026, then 10).
  • Allowed types: pdf, docx, xlsx, csv, png, jpg. Skip anything else, especially executable or script files.
  • Size limit: skip files above a limit you choose, and log them.

Build steps

  1. Trigger on new emails with the “To file” label that have attachments.
  2. Loop through attachments. The following steps run once per file.
  3. Check the file type and size. If not allowed, log “Skipped” and continue with the next file.
  4. Build the new name from the date, sender and original name.
  5. Find or create the month folder in your cloud storage.
  6. Upload the file into that folder.
  7. Add a row to the log with the details and the file link.
  8. After the loop, remove the “To file” label and add “Filed” to the email.

Platform guide

Step Make Zapier n8n Power Automate
Trigger Gmail: watch emails, filtered by label with attachments Gmail: new email matching a search, or new attachment Gmail Trigger with a label filter Outlook: “When a new email arrives (V3)” with attachments only
Loop An iterator over the attachments Each attachment runs as its own item, or use a Looping step Split items or Loop over items “Apply to each” over attachments
Check type and size Filter on file name and size Filter step IF node Condition action
Upload Google Drive: upload a file, or OneDrive: upload a file Google Drive: upload file, or OneDrive: upload file Google Drive or OneDrive node: upload OneDrive or SharePoint: create file
Log Google Sheets: add a row Google Sheets: create spreadsheet row Google Sheets node: append row Excel: “Add a row into a table”
Mark processed Gmail: modify labels Gmail: add or remove label Gmail node: add or remove labels Outlook: move or flag the email

Platform names change, so confirm in your tool. Some connectors may need paid plans.

Test plan

Test Expected result
Email with one PDF File saved in the correct month folder and a log row added
Email with three attachments Three files and three log rows
Email with an .exe or .zip file Skipped and logged, not saved
A very large file Skipped by the size rule
Two files with the same name Both saved, with names that do not overwrite each other

Cost and limits

  • Each attachment runs several steps, so a batch of emails with many files uses more platform usage.
  • Large files can hit platform file-size limits.
  • Scheduling more often than needed wastes usage. Every 5 to 15 minutes is usually enough.

Security and privacy

  • Never auto-open files and only save allowed types.
  • Be careful with mail that contains personal or financial documents and follow your organisation’s rules.
  • Limit who can access the destination folder and the log sheet.
  • Use your email provider’s malware protection for scanning.

Variations

  • Folder by sender or client: organise by sender domain instead of month.
  • Receipts: send receipt files to the Emailed Receipts to Expense Spreadsheet workflow.
  • Duplicate check: skip files with the same name, sender and size as one already logged.

Troubleshooting

Problem Fix
Nothing triggers Check the label name and that the email actually has attachments.
Files overwritten Add the date and a short unique value, such as the message ID, to the file name.
Inline images saved as files Filter by size or name to skip tiny signature images.
Permission errors Check the connection has write access to the destination folder.

See the Gmail MCP server, the Google Drive MCP server and the Inbox Triage Agent.

Join the conversation

Your email address will not be published. Required fields are marked *