Auto-Save Gmail Attachments to Google Drive
detail.loadingPreview
This workflow automatically monitors your Gmail for emails from a specified sender. Upon detection, it extracts all attachments and seamlessly uploads them to a designated folder in your Google Drive, ensuring important files are always backed up and organized without manual effort.
About This Workflow
This n8n workflow provides a robust solution for automating the backup and organization of email attachments. It constantly watches your Gmail inbox for new emails, specifically filtering by a sender you define. Once an email from this sender arrives, the workflow springs into action, downloading all attached files. These attachments are then intelligently processed and uploaded to a chosen folder within your Google Drive, complete with dynamic naming to prevent overwrites and improve traceability. This hands-free automation eliminates the need for manual downloads and uploads, saving you valuable time and ensuring critical documents are always securely stored and accessible.
Key Features
- Automated Email Monitoring: Continuously scans your Gmail inbox for new incoming emails at a minute interval.
- Sender-Specific Filtering: Focuses only on emails from a designated sender, ensuring only relevant attachments are processed.
- Automatic Attachment Extraction: Downloads all attachments from qualifying emails.
- Google Drive Integration: Seamlessly uploads extracted attachments to a specified folder in your Google Drive.
- Dynamic File Naming: Automatically generates unique filenames for uploaded attachments based on email ID and timestamp, preventing conflicts.
- Extendable Post-Upload Actions: Includes a placeholder (
Replace Me) to easily add custom actions after files are uploaded, such as notifications or logging.
How To Use
- Connect Gmail Accounts:
- Open the "Gmail Trigger" node and click on "Credentials". Connect your Gmail account (e.g.,
Gmail OAuth2 - Akhil). - Repeat the same for the "Gmail" node.
- Open the "Gmail Trigger" node and click on "Credentials". Connect your Gmail account (e.g.,
- Configure Sender Filter: In the "Gmail Trigger" node, update the
senderfield underFiltersto the email address you want to monitor (currentlyakhilgadiraju@gmail.com). - Connect Google Drive Account: Open the "Google Drive" node and click on "Credentials". Connect your Google Drive account (e.g.,
Google Drive - Akhil). - Specify Destination Folder: In the "Google Drive" node, under "Parameters", select your desired
Drive ID(e.g., "My Drive") and then choose theFolder IDwhere you want the attachments to be saved (currently "DOcs"). - Customize Filename (Optional): If you wish to change how uploaded files are named, edit the
nameexpression in the "Google Drive" node (currently{{ $('Gmail Trigger').item.json.id + "_" + $now + "_" + "backup_attachment" }}). - Add Post-Upload Logic (Optional): Replace or extend the "Replace Me" node to add any actions you want to perform after the attachment is uploaded, such as sending a confirmation notification, logging the upload, or deleting the original email.
Apps Used
Workflow JSON
{
"id": "1bef026a-2733-412b-813c-3f29de06e926",
"name": "Auto-Save Gmail Attachments to Google Drive",
"nodes": 20,
"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: 1bef026a-2733...
About the Author
SaaS_Connector
Integration Guru
Connecting CRM, Notion, and Slack to automate your life.
Statistics
Related Workflows
Discover more workflows you might like
Google Sheets to Icypeas: Automated Bulk Domain Scanning
This workflow streamlines the process of performing bulk domain scans by integrating your Google Sheets data directly with the Icypeas platform. Automate the submission of company names from your spreadsheet to Icypeas for comprehensive domain information, saving valuable time and effort.
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.