Top Podcasts
Health & Wellness
Personal Growth
Social & Politics
Technology
AI
Personal Finance
Crypto
Explainers
YouTube SummarySee all latest Top Podcasts summaries
Watch on YouTube
Publisher thumbnail
Kevin Stratvert
13:462/26/26

The One n8n Automation Everyone Should Build

TLDR

An n8n automation can be easily built to automatically save email attachments containing a specific keyword in the subject line to a cloud storage service like Google Drive.

Takeways

Build a simple n8n automation to automatically save email attachments with a specific subject line keyword to cloud storage.

Utilize Gmail's search syntax within n8n to filter for specific keywords and attachments, ensuring precise automation.

Publish the workflow to enable continuous, 24/7 background operation, eliminating manual file collection and organization.

Building a simple n8n automation can streamline the process of collecting files from multiple people by leveraging a common behavior: sending emails with attachments. This workflow monitors an inbox for a specified keyword in the subject line, automatically extracts the attachment, and saves it to a designated shared folder, eliminating manual uploads and organizing files efficiently. The power of n8n lies in connecting simple building blocks to create practical, time-saving solutions without requiring complex coding or forcing users to learn new tools.

Automating File Collection

00:00:09 Collecting files from a group can be messy due to difficulties with shared folders, but nearly everyone knows how to attach a file to an email. An n8n automation can monitor an inbox for a specific keyword in the subject line, grab the attachment, and drop it into a shared folder automatically, running 24/7. This approach simplifies the process by building automation around existing user behavior.

Setting Up n8n and Gmail Integration

00:02:40 The initial step in building this n8n workflow involves creating a new workflow and adding a Gmail trigger node set to 'on message received.' Crucially, the n8n node requires secure access to your Gmail account using OAuth2 authentication, which involves creating a client ID and client secret through the Google Cloud Console. Once credentials are set up, they can be reused across any n8n workflow.

Configuring Gmail Trigger Filters

00:05:46 To ensure the workflow only triggers for relevant emails, the Gmail trigger node must be configured with specific filters. Using Gmail's search syntax, the filter can be set to detect emails with a predefined keyword, such as 'subject:RECEIPT2026', and also check for the presence of an attachment using 'has:attachment'. Adding 'is:unread' can provide an additional safeguard against re-processing old messages, ensuring only new, matching emails trigger the automation.

Attaching to Google Drive and Publishing

00:09:00 After the Gmail trigger detects a qualifying email and downloads the attachment, the next step is to add a Google Drive node to upload the file. This node needs to be configured with appropriate Google Drive credentials and told to upload the specific attachment identified by the previous node, often named 'attachment_0', into a designated folder. Finally, publishing the workflow ensures it runs continuously, automatically processing and organizing incoming attachments without manual intervention.