Skip to main content

Automatically save Gmail attachments to Google Drive

Workflow preview

Workflow preview
100%
Automatically save Gmail attachments to Google Drive preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Gmail Attachment Extractor to Google Drive Description: This workflow monitors your Gmail inbox for new emails, specifically those with attachments, and automatically saves those attachments to a d...

Best for

  • File Management automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.googledrive, n8n-nodes-base.gmailtrigger, n8n-nodes-base.if, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by David Olusola.

Original n8n.io source

1.1 Workflow description

Title
Automatically save Gmail attachments to Google Drive
Workflow name
Automatically save Gmail attachments to Google Drive

Gmail Attachment Extractor to Google Drive

Description: This workflow monitors your Gmail inbox for new emails, specifically those with attachments, and automatically saves those attachments to a designated folder in your Google Drive.

Use Case: Automatically archive invoices, client documents, reports, or photos sent via email to a structured cloud storage.

How It Works

This workflow operates in three main steps:

Gmail New Email Trigger:

The workflow starts with a Gmail Trigger node, set to monitor for new emails in your specified Gmail inbox (e.g., your primary inbox).

It checks for emails that contain attachments.

Conditional Check (Optional but Recommended):

An If node checks if the email actually has attachments. This prevents errors if an email without an attachment somehow triggers the workflow.

Upload to Google Drive:

A Google Drive node receives the email data and its attachments.

It's configured to upload these attachments to a specific folder in your Google Drive.

The attachments are named dynamically based on their original filenames.

Setup Steps

To get this workflow up and running, follow these instructions:

Step 1: Create Gmail and Google Drive Credentials in n8n

In your n8n instance, click on Credentials in the left sidebar.

Click New Credential.

Search for and select "Gmail OAuth2 API" and follow the authentication steps with your Google account. Save it.

Click New Credential again.

Search for and select "Google Drive OAuth2 API" and follow the authentication steps with your Google account. Save it.

Make note of the Credential Names (e.g., "My Gmail Account", "My Google Drive Account").

Step 2: Create a Destination Folder in Google Drive

Go to your Google Drive (drive.google.com).

Create a new folder where you want to save the email attachments (e.g., Email Attachments Archive).

Copy the Folder ID from the URL (e.g., https://drive.google.com/drive/folders/YOUR_FOLDER_ID_HERE).

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Upload to Google Drive

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 2 - Gmail Trigger

Type / Role
n8n-nodes-base.gmailTrigger - gmailTrigger
Config choices
Version 1

Block 3 - If (has Attachments)

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 4 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Automatically save Gmail attachments to Google Drive
Complexity intermediate
Nodes 6
Categories File Management
Author David Olusola
Published 26 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6466/6466.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automatically save Gmail attachments to Google Drive do?

Gmail Attachment Extractor to Google Drive Description: This workflow monitors your Gmail inbox for new emails, specifically those with attachments, and automatically saves those attachments to a d...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your File Management use case.