Gmail Attachment Manager with Google Drive Upload and Smart Filtering

Go to Workflow
0 views
Built by Ossian Madisson Ossian Madisson
Created on June 05, 2026

Description

This n8n template allows you to automatically upload all attached files from incoming emails to Google Drive with optional filters on sender, receiver and file types

This template is built to be customized for your specific needs. This template has the core logic and n8n node specific references sorted to work with dynamic file names throughout the workflow.

Use cases
Store invoices in Google Drive
Save recurring reports in Google Drive
Post recurring reports to another n8n workflow for further processing
Archive files to Google Drive by email
Save all files received by a client in a dedicated Google Drive folder

Good to know
The workflow is designed to not use custom code, preferring built-in nodes in n8n

How it works
Trigger on incoming emails with attachments
(Optional) filter on sender/recipient
Splits all attachments of the email into separate items
(Optional) filter attachment based on file type
(Optional) treat attachments with different file types through different paths
Upload attachment to Google Drive
Mark the email read and archive it after all attachments has been processed
Notify in Slack how many attachments was processed in the execution

How to use
Configure Google credentials (1,2,6)
Configure Slack credentials (7)
Configure or disable sender/receiver filter (3)
Configure or disable file type filter (4)
Configure or disable file type paths (5)
Configure destination folder (6)
Build on this to fit your use case


Note: there's a similar template with the same basics but with less ready-made modifications and no loop that allows us to archive the email and notify to Slack when done.

Nodes Used (5)

Compression
n8n-nodes-base.compression
Gmail
n8n-nodes-base.gmail
Google Drive
n8n-nodes-base.googleDrive
HTTP Request
n8n-nodes-base.httpRequest
Slack
n8n-nodes-base.slack