Automate saving Gmail attachments to organized Google Drive folders. Use this robust n8n workflow to handle email subjects and creation dates for structured storage using the n8n node architecture.
Download this n8n workflow template and start using it instantly.
Managing high volumes of incoming email attachments can be a significant drag on productivity. This expert n8n workflow provides a robust solution for automating this tedious organization task. Instead of manually downloading files from Gmail and sorting them into Google Drive, this powerful n8n template automatically detects new emails using the specialized Gmail n8n trigger node.
The core value of this n8n workflow lies in its dynamic folder creation. It uses the email subject line and the current timestamp to generate a unique, contextually relevant folder name within Google Drive, ensuring chronological and structured organization. This specific n8n workflow enhances efficiency, seamlessly integrating cloud storage and email platforms while demonstrating the flexibility of the standard n8n node architecture.
This n8n workflow operates in a sequential, structured manner:
Gmail Trigger n8n node, which constantly polls for new emails. Crucially, it is configured to automatically download any attachments detected.Filter n8n node checks if the incoming item contains binary data (an attachment). If no attachment is found, the workflow stops for that email.Gmail n8n node then retrieves the full message details again, ensuring all attachment metadata and binary content is properly loaded for subsequent steps.Create Folder Google Drive n8n node executes. It creates a new folder in the root of Google Drive, using an expressive name like Motion - [Email Subject] - [Timestamp].Split Out n8n node processes the binary data (the attachments). If an email had multiple attachments, this node ensures each file becomes a separate item ready for individual upload.Merge n8n node combines the attachment items (from Split Out) with the newly generated Folder ID (from Create Folder). This is vital because every file needs to know exactly where it should be uploaded.Google Drive n8n node (Google Drive1) performs the final action. Using the dynamically retrieved Folder ID and the binary data name, it uploads each attached file directly into the designated, structured folder, completing the sophisticated n8n workflow.To implement this n8n workflow, follow these steps:
Gmail Trigger and both Google Drive n8n node components. You will need to set up or select existing OAuth2 credentials for:Gmail Trigger polling mechanism. Gmail Trigger: This is the starting n8n trigger. It listens for new emails (polls every minute) and is configured to downloadAttachments: true to initiate the process.
Filter (n8n node): Checks for the existence of binary data ($binary) to ensure the n8n workflow only proceeds when an attachment is present, reducing unnecessary runs.
Gmail1 (n8n node): Performs a Get operation on the message ID received, often used here to consolidate binary data presentation before splitting.
Create Folder (Google Drive n8n node): Key configuration involves setting the Resource to Folder and dynamically naming the folder using an expression that pulls the email subject and current timestamp (=Motion - {{ $node["Gmail Trigger"].json.subject || "Untitled" }} - {{ $now }}).
Split Out (n8n node): Splits multi-attachment emails into separate items, ensuring each file is handled individually during the upload phase.
Merge (n8n node): Uses the combineAll mode to attach the newly created folder ID context to every individual attachment item.
Upload File. It uses the Folder ID from the Create Folder n8n node output and uploads the binary file content.Use this powerful n8n workflow to automatically analyze creative assets, check brand compliance, generate rich metadata, and log results to a Google Sheets dashboard using the ScrapeGraphAI n8n node.

Use this powerful n8n workflow to automate e-commerce order processing. Integrate a webhook n8n trigger with Google Sheets for real-time inventory checks and send instant stock alerts via Slack. Find more n8n templates for logistics.

Use this powerful n8n workflow to automate Scrapy job execution via Scrapyd, monitor the job status, collect raw results, and apply custom enrichment/deduplication logic before outputting clean JSON.

Use this efficient n8n workflow to automatically download Gmail attachments, lookup sender companies in Google Sheets, and organize files into year/month folders in Google Drive.

I’m passionate about using n8n to create realistic workflows that help working class people simplify their daily tasks. My workflows aim to make life easier by eliminating mundane, repetitive responsibilities that take up valuable time. I love turning automation into a tool that lets people focus on what matters most to them.







































