Automate Email Attachment Storage and Routing
detail.loadingPreview
Seamlessly capture email attachments from specific senders and automatically save them to Google Drive. This workflow intelligently routes attachments based on file size, ensuring important documents are stored while less critical ones can be handled separately.
About This Workflow
This n8n workflow empowers you to take control of your email attachments. It's designed to monitor your Gmail account for emails from a designated sender, specifically looking for unread messages. Upon detection, it automatically downloads any attachments. The workflow then intelligently splits these attachments and routes them based on their file size. Larger files are prepared for storage in Google Drive, while smaller files can be disregarded or processed differently, providing a robust solution for managing incoming digital assets. This streamlines your workflow, reduces manual effort, and ensures vital information is captured and organized efficiently.
Key Features
- Automated Gmail Monitoring: Triggers on unread emails from a specific sender, ensuring timely processing.
- Attachment Downloading: Automatically downloads all attachments from relevant emails.
- Intelligent File Routing: Sorts attachments based on file size (e.g., greater than 300MB or 10MB).
- Google Drive Integration: Seamlessly saves categorized attachments to your Google Drive.
- Customizable Logic: Easily adapt the size thresholds and destination folders for your specific needs.
How To Use
- Configure Gmail Trigger: Set up the 'Gmail Trigger' node to monitor emails from your specified sender (
ray.thomas@charter.com) and ensure it's set to detect 'unread' emails. Enable 'download attachments'. - Split Attachments: The 'Split Out' node will process each downloaded attachment individually.
- Define File Size Rules: Configure the 'Switch' node with your desired size thresholds (e.g., 'Large Files' for >300MB, 'Medium Files' for >10MB). Set up an appropriate fallback output if needed.
- Connect to Google Drive: For the 'Medium Files' or desired output from the 'Switch' node, configure the 'Google Drive' node to save the attachment to the correct folder (
miscin this example). Use expressions to dynamically name the file based on the attachment's original name. - Handle Other Outputs: Connect the 'Large Files' and any fallback outputs from the 'Switch' node to 'noOp' nodes (or other desired actions like notifications) for example.
Apps Used
Workflow JSON
{
"id": "4b5b91db-267e-4443-b4ad-87df340c8bef",
"name": "Automate Email Attachment Storage and Routing",
"nodes": 24,
"category": "Operations",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 4b5b91db-267e...
About the Author
DevOps_Master_X
Infrastructure Expert
Specializing in CI/CD pipelines, Docker, and Kubernetes automations.
Statistics
Related Workflows
Discover more workflows you might like
Universal CSV to JSON API Converter
Effortlessly transform CSV data into structured JSON with this versatile n8n workflow. Integrate it into any application as a custom API endpoint, supporting various input methods including file uploads and raw text.
Instant WooCommerce Order Notifications via Telegram
When a new order is placed on your WooCommerce store, instantly receive detailed notifications directly to your Telegram chat. Stay on top of your e-commerce operations with real-time alerts, including order specifics and a direct link to view the order.
On-Demand Microsoft SQL Query Execution
This workflow allows you to manually trigger and execute any SQL query against your Microsoft SQL Server database. Perfect for ad-hoc data lookups, administrative tasks, or quick tests, giving you direct control over your database operations.