Templates / Get multiple attachments from Gmail and upload them to GDrive

Get multiple attachments from Gmail and upload them to GDrive

Needs changes

by Ria ✓ · 11,620 views · created 2024-07-16 · File Management

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: Function (legacy). 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 3 nodes and runs on Gmail events. Along the way it connects Gmail and Google Drive.

How it runs

Trigger: On Gmail events.

  1. attach binary data outputs (Function): runs custom JavaScript (legacy Function node)
  2. upload files to google drive (Google Drive): uses Google Drive

Services it uses

GmailGoogle Drive

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • Function (legacy) in attach binary data outputs: replace with Code node, mode 'Run Once for All Items'.
  • Also check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll).
Removed in 3.0Replace with
Function (legacy)
attach binary data outputs
Code node, mode 'Run Once for All Items'

Nodes used (3)

From the author

This is a simple template to show how to extract multiple email attachments and return them as an iterable output. How it works: The Gmail Trigger node detects any new email that has attachments. The Code node will then extract them as binary files and…

Excerpt from Ria's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.