AutoFileEmail
    IntegrationsSolutionsComparePricingFAQBlog
    Sign inConnect Drive
    1. Blog
    2. iCloud Mail + iCloud Drive: The Missing Automation
    On this page
    Why iCloud Mail and iCloud Drive don't talk to each otherThe Mail.app + AppleScript route (fragile but possible)The Shortcuts route (limited)The Hazel route (Mac-only, post-download)The third-party app route (most are sketchy)The "iCloud Drive as destination" statusThe minimum-fragile setup for an Apple-first freelancerThe bigger pictureTL;DRThe pivot: what AutoFileEmail does (and where it lands)

    iCloud Mail + iCloud Drive: The Missing Automation

    MMitchel Kelonye
    •
    Jul 17
    •
    Icloud
    Apple
    Imap
    Automation

    Studio Ghibli-inspired banner for iCloud automation article with warm pastels

    You're an Apple person.

    Your email is you@icloud.com. Your files live in iCloud Drive. Your phone, laptop, watch, all wired into iCloud. You haven't touched a Google product on purpose in years.

    Then you sit down to set up auto-filing for receipts and discover that there is, essentially, no way to automatically save iCloud Mail attachments to iCloud Drive.

    No, really. Try to Google this. You'll find a dozen forum threads ending with "I gave up and used Hazel" or "I just do it manually now."

    This article is about why that gap exists, what the half-workarounds are, and the actual fix.


    Table of Contents

    • Why iCloud Mail and iCloud Drive don't talk to each other
    • The Mail.app + AppleScript route (fragile but possible)
    • The Shortcuts route (limited)
    • The Hazel route (Mac-only, post-download)
    • The third-party app route (most are sketchy)
    • The "iCloud Drive as destination" status
    • The minimum-fragile setup for an Apple-first freelancer
    • The bigger picture
    • TL;DR
    • The pivot: what AutoFileEmail does (and where it lands)

    Why iCloud Mail and iCloud Drive don't talk to each other

    This is the structural reason none of this works the way you'd hope.

    iCloud Mail has no server-side rules engine. Gmail has filters that run on Google's servers, 24/7, regardless of whether you're logged in. iCloud Mail does not. The "rules" feature in macOS Mail.app is a client-side feature - it requires Mail.app to be running on your Mac for any rule to fire. If your laptop is closed, no rules run.

    For unattended automation - the whole point of "auto-file my receipts" - this is fatal. Your receipts arrive at 3am Tuesday. Your Mac is asleep. Nothing happens. When you open the Mac on Wednesday, the rule fires retroactively for messages still in the inbox, but if you'd already moved them on iPhone, the rule never sees them.

    iCloud Drive has no public API for third-party automation. Apple does not publish an iCloud Drive API. There's no equivalent of googleapis.com/drive/v3 you can call from a server. The only "automation" surface is:

    • The Files app on iOS (manual moves, Shortcuts integration).
    • The Finder on macOS (manual or AppleScript).
    • iCloud for Windows (sync only).

    That's it. No webhook. No "watch folder for new files." No "drop a file in this folder from a third-party server."

    Apple has explicitly chosen not to be a platform for third-party automation here. That's their right. It's also why the workflows below are all flavors of "fragile."

    The Mail.app + AppleScript route (fragile but possible)

    This is what serious Apple users have been doing for a decade.

    Setup:

    1. Mac that stays awake (sleep disabled, or at least lid-open with caffeinate running).
    2. Mail.app installed and running.
    3. Mail.app rule: "When attachment received from sender X, run AppleScript Y."
    4. AppleScript: extract attachment, save to specific iCloud Drive folder, set name to <vendor>-<date>.pdf.

    It works. Sort of. The failure modes:

    • Mac sleeps: rules don't fire.
    • Mail.app crashes: rules don't fire until you reopen.
    • macOS update: AppleScript permissions revoked, you have to re-grant.
    • Multi-device race condition: if you read the email on iPhone first, the message is marked read by the time Mail.app on Mac sees it, which can prevent some rules from firing depending on the trigger condition.
    • Sender variations: every receipt vendor needs its own rule. AWS sends from aws-receipts@aws.com, sometimes from no-reply@amazon.com. Two rules per vendor, or one rule per regex.

    You also need a Mac that is genuinely always-on. Most freelancers don't have that. Their MacBook closes at the end of the day.

    Mac setup with Mail.app rules and AppleScript saving attachments to iCloud Drive

    The Shortcuts route (limited)

    Apple's Shortcuts app added Mail integration, and you can build "save attachment from email to Files" shortcuts. Triggers include:

    • Manual run (you tap the shortcut).
    • Time of day (8am every weekday).
    • When connected to a specific Wi-Fi.

    What's missing: an "on email arrival" trigger. Shortcuts cannot fire when a new email arrives. The closest you can get is "every hour, check for new emails from [list of vendors] and save attachments." Battery cost is real, and the fanout to specific vendors becomes its own maintenance burden.

    Shortcuts also has no programmatic way to organize by sender domain. You'd have to hand-code a Shortcut per vendor or build one giant shortcut with branching logic. Possible. Painful.

    iPhone and Mac showing Shortcuts automation with limited triggers

    The Hazel route (Mac-only, post-download)

    Hazel is the legendary Mac automation tool. It watches folders and runs rules when files appear.

    The pattern: configure Mail.app to download all attachments to a specific Mac folder. Hazel watches that folder. When a PDF appears, Hazel parses the filename or sender (from saved metadata), moves it to the right iCloud Drive folder.

    This works. Hazel is genuinely good. But:

    • You're back to needing Mail.app running on a Mac.
    • "Download all attachments" is a separate Mail.app config that has to stay enabled.
    • Hazel runs locally on the Mac, which means while you're traveling with iPad-only, nothing files.
    • Hazel costs $42 once. Worth it if you're staying on this stack, but it's another tool.

    Hazel is the most-recommended workaround in r/macapps for this exact problem, which tells you how thin the alternatives are.

    Hazel automations watching a folder on Mac, moving files to iCloud Drive

    The third-party app route (most are sketchy)

    Search the App Store for "iCloud receipts" and you'll find a handful of apps that promise to file iCloud Mail attachments. Most of them either:

    1. Require you to grant your iCloud password, which violates Apple's TOS and risks your account getting locked.
    2. Run only on-device, with the same "your iPhone has to be plugged in and unlocked" constraint.
    3. Are abandoned. Last update 2021.

    A few legit ones use app-specific passwords and IMAP, which is the cleanest path technically but still requires you to trust a third-party app with mailbox access. The privacy and security review on these is uneven.

    For comparison with the broader receipt-app market, see receipt apps and what they do with your data, ranked.

    AutoFileEmail pivots from iCloud to Google Drive for automated filing

    The "iCloud Drive as destination" status

    This isn't on our roadmap. Not because we don't want to ship it - we'd love to - but because there is no public iCloud Drive API for server-side writes from a third party. Apple has consistently chosen not to expose one.

    If Apple ever ships a CloudKit-based public API for Drive writes, we'd revisit. Until then, the destination is Google Drive.

    People sometimes ask "what about syncing the Google Drive folder back into iCloud Drive?" You can do this with iCloud's external storage providers (Drive shows up in Files app), or with rclone on a Mac, or with Hazel watching the synced Drive folder. All workable. None as clean as native.

    The minimum-fragile setup for an Apple-first freelancer

    If you live on iCloud and want auto-filing today:

    Option 1 (recommended): AutoFileEmail with iCloud IMAP + Google Drive destination (when iCloud IMAP ships). Add Google Drive as an external location in Files.app on iOS so receipts appear alongside iCloud.

    Option 2 (today, no Google): Hazel + Mail.app + always-on Mac. ~$42 one-time, plus the Mac power bill, plus ongoing maintenance.

    Option 3 (manual): AirDrop receipts from iPhone to Mac, drag into iCloud Drive folders. Sustainable for ~10 receipts a month, falls apart above that.

    Most people I know who tried option 2 ended up at option 1 within a year because the Mac-always-on requirement just doesn't fit a real life.

    The bigger picture

    The iCloud Mail / iCloud Drive automation gap is one of the more striking examples of Apple's "we don't open APIs to third parties" philosophy producing a real user-facing problem. It's not a thing they screwed up. It's a thing they decided.

    If you're committed to the Apple ecosystem and want auto-filing of receipts, you're going to be making a tradeoff one way or another:

    • Either you accept that automation needs an always-on Mac (Mail.app + Hazel).
    • Or you accept that the destination is Google Drive (AutoFileEmail).
    • Or you do it manually.

    There's no fourth option. Anyone telling you otherwise is hand-waving.

    For more on the broader integration roadmap and what's working today, see our integrations page.

    TL;DR

    • iCloud Mail has no server-side rules engine; rules need Mail.app open to fire.
    • iCloud Drive has no public third-party write API.
    • The native automation routes (Mail.app + AppleScript, Shortcuts, Hazel) all require an always-on Mac.
    • AutoFileEmail will support iCloud via IMAP (coming soon), with Google Drive as the destination.
    • iCloud Drive as destination is structurally not possible for any third-party server-side automation.
    • The "Google Drive in Files.app via external location" trick gives you the appearance of native iCloud filing, with actual automation underneath.

    If you're tired of doing this manually, start with AutoFileEmail's free tier (Gmail + Drive today, iCloud IMAP next). One inbox, free forever, no per-receipt fees.

    We don't read your receipts. We just file them. Even when iCloud refuses to.

    Illustration showing iCloud Mail and iCloud Drive separated by a communication gap

    The pivot: what AutoFileEmail does (and where it lands)

    AutoFileEmail will support iCloud Mail via IMAP using app-specific passwords (coming soon - mark roadmap, Gmail+Drive ships first).

    What that looks like:

    1. Generate an app-specific password on appleid.apple.com.
    2. Connect AutoFileEmail to your iCloud inbox via IMAP using that password.
    3. AutoFileEmail polls your iCloud inbox every 30 seconds for new attachments.
    4. Files them to your Google Drive in /AutoFileEmail/<sender-domain>/<year>/<month>/.

    The destination is Google Drive, not iCloud Drive.

    This is the part that's going to bother some people, and it should be acknowledged directly: there is no public API to write to iCloud Drive from a third-party server. We can't ship that, and neither can anyone else. The only way to file to iCloud Drive automatically is via on-Mac tools (Mail.app, Hazel, Shortcuts).

    Google Drive as the destination has actual benefits even for Apple-first users:

    • Files are accessible from any device including your iPhone.
    • iCloud Drive can add Google Drive as an external location so files appear in your Files app alongside iCloud.
    • The Drive drive.file scope means we can only see folders we created. Same privacy posture as iCloud.
    • All four tax authorities (IRS, HMRC, ATO, CRA) accept PDFs in Drive. See retention rules by country.

    The honest tradeoff is: you get full automation, in exchange for the destination being Google Drive instead of iCloud Drive. For most people that's an acceptable trade. For purists, it isn't.

    AutoFileEmail pivots from iCloud to Google Drive for automated filing

    The "iCloud Drive as destination" status

    This isn't on our roadmap. Not because we don't want to ship it - we'd love to - but because there is no public iCloud Drive API for server-side writes from a third party. Apple has consistently chosen not to expose one.

    If Apple ever ships a CloudKit-based public API for Drive writes, we'd revisit. Until then, the destination is Google Drive.

    People sometimes ask "what about syncing the Google Drive folder back into iCloud Drive?" You can do this with iCloud's external storage providers (Drive shows up in Files app), or with rclone on a Mac, or with Hazel watching the synced Drive folder. All workable. None as clean as native.

    The last time you'll dread tax season.

    Connect Gmail and Drive, watch the 30-day preview file itself, and never think about new email attachments again. Forward filing is free, forever. When tax season comes, grab a Backfill Pack and we'll sweep the rest of your history.

    Connect Drive — free See pricing

    Thanks for reading! If you want to see future content, subscribe to our RSS feed.

    ← Older
    Why We'll Never Charge Per Email Scanned
    Newer →
    Outlook + OneDrive: The Freelancer's Filing Setup
    AutoFileEmail

    We don't read your documents. We just file them. Receipts, invoices, statements — sorted into your cloud, automatically.

    Product
    • Pricing
    • FAQ
    • Blog
    • About
    Compare
    • AutoFileEmail vs. Receiptor AI
    • AutoFileEmail vs. Hubdoc
    • AutoFileEmail vs. Dext
    • AutoFileEmail vs. Zapier
    • AutoFileEmail vs. CloudHQ Save Emails to Drive
    Integrations
    • Auto-save Gmail attachments to Google Drive
    • Auto-save Gmail attachments to Dropbox
    • Auto-save Outlook attachments to OneDrive
    • Auto-save Outlook attachments to SharePoint
    • IMAP + Google Drive Integration
    Solutions
    • AutoFileEmail for Freelancers
    • AutoFileEmail for Bookkeepers
    • AutoFileEmail for Landlords — Schedule E ready by April
    • AutoFileEmail for Consultants
    • Tax-Time Receipt Organization
    Legal
    • Privacy policy
    • Terms
    • Security
    © 2026AutoFileEmail · We don't read your documents.PrivacyTerms