PERSONAL PRODUCTIVITY

Auto-File Gmail Attachments into Smart Drive Folders

Watches your inbox, classifies each attachment with AI, and files it into the right Google Drive folder — no manual sorting, no lost invoices.

CategoryPersonal Productivity
Enginesim
Difficultyintermediate
Triggerevent
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerNew Gmail email receivedGmailGmail
  • LogicSkip if no attachment
  • ActionDownload attachment from GmailGmailGmail
  • LogicClassify document & pick target folderOpenAI
  • OutputUpload file to matching Drive folderGoogle DriveGoogle Drive

What it does

This workflow turns your inbox into a self-organizing filing cabinet. Whenever a new email arrives with an attachment, it pulls the file down, reads the email's subject, sender, and body, and asks an OpenAI model to decide where the document belongs — Invoices, Contracts, Receipts, Resumes, or any folder taxonomy you define. It then uploads the attachment into the matching Google Drive folder, renaming it with a clean, consistent convention (for example `2026-06-16__Acme-Corp__invoice.pdf`). Emails with no attachments are skipped, so the workflow only acts when there is something to file.

When to use it

Reach for this when attachments pile up in your inbox faster than you can sort them: finance teams drowning in vendor invoices and receipts, recruiters collecting resumes, operations staff archiving signed contracts and statements of work, or anyone who keeps "I'll file it later" emails that never get filed. It is especially useful when the right destination depends on what the document actually is rather than who sent it — the AI classification step reads content, not just the sender address, so a receipt forwarded from a colleague still lands in Receipts.

How it works

The trigger fires on each new Gmail message. A filter check short-circuits anything without an attachment. For qualifying messages, the workflow downloads the attachment and passes the email metadata (subject, sender, snippet) plus the filename to OpenAI, which returns a target folder name from your predefined list and a normalized filename. Finally the file is uploaded to that Google Drive folder. You configure the folder taxonomy and naming pattern once in the OpenAI step's prompt; everything after that runs unattended on Sim. Because it runs on Hive's own engine, the Gmail watch and Drive writes execute against live credentials in your colony — not a brittle third-party relay.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GmailRead, draft, send, label.
  2. 2
    Connect OpenAIModels, embeddings, files.
  3. 3
    Connect Google DriveDocs, sheets, slides, files.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.