Automate Gmail attachment handling using this powerful n8n workflow. Filter by sender and file type, decompress ZIPs, upload to Google Drive, and notify via Slack using this versatile n8n template.
Download this n8n workflow template and start using it instantly.
Operations managers dealing with automated reporting emails.
Developers needing to ingest files sent via email for processing.
Users seeking to implement robust email filtering and automated cloud synchronization.
Anyone looking for a comprehensive n8n workflow solution for Gmail management.
Manually downloading and sorting email attachments is tedious and prone to human error, especially when dealing with various file types or sources. This detailed n8n workflow template solves this by providing a hands-free, automated solution for file ingestion. The process ensures that only relevant emails are acted upon, attachments are split and filtered correctly, and complex files (like ZIPs) are handled appropriately before being uploaded to a designated location, such as Google Drive. This specific n8n workflow significantly enhances productivity by turning your inbox into a reliable, automated ingestion pipeline, making this n8n template invaluable for data management tasks.
This automation starts with the crucial n8n trigger, the Gmail Trigger node, which constantly monitors your inbox for new emails containing attachments.
alwaysOutputData feature).To deploy this powerful n8n workflow template, follow these steps:
rightValue fields in the conditions to match the sender ([email protected]) or recipient addresses that you want this automation to target.mimeType values if you need to process different file types (e.g., PDFs, CSVs, etc.). The Sticky Note provides a link to common MIME types.This n8n workflow relies on several core n8n nodes for its functionality:
Gmail Trigger (Trigger on incoming email with attachment):
Function: Serves as the primary n8n trigger, initiating the process when an email with an attachment is detected.
Key Configuration: Filters are set to q: has:attachment -label:DRAFT. Downloads attachments automatically.
Filter (Filter based on sender or receiver):
Function: Filters the email data based on JavaScript expressions checking the sender or recipient address fields ($json.from.value[0].address).
Split Out / Split In Batches (Split Out / Loop attachments):
Function: These two n8n nodes work together to ensure that an email containing multiple attachments is processed item by item, providing robustness to the entire n8n workflow.
Filter (Filter based on file type):
Function: Checks the mimeType property of the binary data, currently configured to pass application/zip and text/plain files.
Compression (Decompress zip):
Function: An essential core n8n node that automatically extracts files contained within a ZIP archive, preparing them for the next processing step.
Google Drive (Upload file to Google Drive):
Function: The primary action n8n node responsible for saving the filtered and processed binary files to the specified Google Drive location, using the original attachment filename.
Gmail (Mark read and archive email):
Function: Performs housekeeping on the Gmail side, marking the email as read and removing the UNREAD and INBOX labels, effectively archiving it once the n8n workflow is complete.
Slack (Send a message):
* Function: Provides a final confirmation message detailing the execution status of the n8n workflow and the number of files processed.
Use this efficient n8n workflow to automatically save email attachments from specific senders directly to Google Drive. A ready-to-use n8n template for reliable file backup.

Use this advanced n8n workflow to classify Gmail messages instantly using Google Gemini AI, generate automated replies requiring human approval via Telegram, and receive daily email digests.

Use this powerful n8n workflow to search your Gmail inbox using natural language commands sent via Telegram. Leverage Gemini AI agents for query construction and summarizing results.

Automate routine Gmail tasks with this advanced n8n workflow template. Use the n8n node for OpenAI (GPT-4o-mini) to intelligently filter unread emails and automatically draft high-quality responses for review.

AI & Automation consultant with many years of experience from both devops and business management. A solid combination to really understand where technology can create real business value. My focus is to help businesses in Sweden work smarter and achieve more by applying technology in a useful and responsible way. Feel free to contact me at [email protected] or schedule a short call at https://smultronstudio.com







































