How to automatically save Gmail attachments to Google Drive with Make
Build a private document archive using Make, Gmail and Drive. Filter test messages, map filenames and file data, prevent unwanted uploads and check duplicates.

In this article
- Before you begin: create a safe test folder
- Step 1: open the attachment template
- Step 2: narrow down what Gmail reads
- Step 3: map the attachment to a real file
- Step 4: test a one-file and two-file email
- Protect against duplicate names and repeated runs
- If something goes wrong
- When this workflow actually saves time
- Official setup references
Get the real workflow template
Open the official Make template (separate, non-affiliate template link). Use the visual setup guide below to configure your own connections.
Before you begin: create a safe test folder
In Google Drive, create a private folder named Important Documents Test. In Gmail, make a label named File-in-Drive. Send yourself a harmless PDF with a unique subject such as PULSSIX test warranty; do not begin with tax records, ID photos or bank documents. Check which Google account is connected before you select the folder.
Step 1: open the attachment template
Use the official Make template below. It connects Gmail to attachment handling and Google Drive. The current Gmail documentation describes Watch emails and List email attachments and media; a template may use older module names. Use the equivalent modules in your editor and keep the scenario disabled while configuring it.
Step 2: narrow down what Gmail reads
In Watch emails use the label File-in-Drive, or the Gmail filter option with a narrow search such as label:File-in-Drive has:attachment. For the first run, limit the number of messages to a small batch. Keep the setting that automatically marks emails as read off if you want to preserve your inbox state. Apply the label to a new test message before the first check. Do not assume that labeling old messages will trigger a new-email watcher; test that separately if you need it.
Step 3: map the attachment to a real file
In the attachment module, map the message ID from Gmail and enable attachment file data; exclude inline media where possible so signature logos are not archived. In Google Drive, select the private test folder. Map the attachment filename to File Name and the actual file bytes to Data in the upload action. A filename alone is not the document.
Step 4: test a one-file and two-file email
Run once with Warranty-sample.pdf. Open the uploaded file and confirm the contents, format and intended folder. Send a new message with two differently named PDFs and check that both arrive. Send an unrelated email without the label and confirm nothing is copied from it. These are acceptance tests to perform in your own account, not results from an executed PULSSIX scenario.
Protect against duplicate names and repeated runs
Example: two shops send invoice.pdf. A filename is not a unique identifier. A more dependable archive uses the message ID and attachment ID together, optionally storing them in a small log or Make data store before processing a repeat. Only mark an attachment as processed after its upload succeeds. In a simple first version, keep the original email, use a unique date or message identifier in the filename and review repeated uploads manually.
If something goes wrong
An empty file usually means the filename was mapped without the attachment bytes; check the attachment output and upload data field. If nothing is found, inspect the label, filter and trigger start position. If access is denied, use the official Gmail and Drive connection guidance rather than weakening security. Stop the scenario if unexpected personal files are uploaded, and review folder sharing and connection permissions. Never open an unexpected attachment merely because the automation saved it.
When this workflow actually saves time
Illustrative example: manually saving eight useful attachments each week at 45 seconds each takes six minutes, or 24 minutes in four weeks. A 15-minute setup and five-minute review would leave about four minutes saved initially. The bigger benefit may be finding a receipt or warranty quickly later. If your inbox has only one useful document a month, manual filing may be easier.
Official setup references

Primary source · Make · official workflow template
Make Help Center · How to work with templates
Explore more: Automation stories · Free tools
Continue with another everyday automation
- All 10 Make guides for everyday life
- A simple receipt tracker for people who hate spreadsheets
- How to email new Google Calendar events with Make
- Calculate how much time your routine could save
- Avoid duplicate events and failed automations
Explore the collection: Automation library
Read next
- The 3-2-1 backup rule: protect your photos and important files
A simple, affordable backup routine that separates copies, adds a recovery plan and tests whether your files can actually be restored.
Estimate time you could save
Enter your own assumptions. This is an estimate, excluding setup and maintenance.