How to save email attachments automatically from Outlook and Gmail

Outlook rules and Gmail filters do not save attachments as files; Power Automate, Apps Script and Zapier do, with documented size and error limits.

November 11, 2026 Arhivix Team 9 min
How to save email attachments automatically from Outlook and Gmail

Last reviewed: November 11, 2026

Neither Outlook nor Gmail saves attachments to a folder by itself: Microsoft describes Outlook rules that move messages to other folders, change their importance or delete them, and Gmail filters label, archive, delete, star or forward mail. To get the files into OneDrive, SharePoint or Google Drive without doing it by hand, you can use a flow in Power Automate, a Google Apps Script or add-on, or an automation service such as Zapier. Each of them works, and each needs testing for duplicates, signature images and flows that stop without anyone noticing.

What Outlook can and cannot do by itself

Microsoft's guide to rules covers new Outlook, classic Outlook and Outlook on the web, and none of the actions it describes saves an attachment as a file on your computer, in OneDrive or in SharePoint.

  • New Outlook for Windows: Microsoft's feature comparison marks rules as partially available and VBA macros and COM add-ins as not supported. Microsoft's rules guide adds that new Outlook currently does not support rules for Gmail, Yahoo and iCloud accounts, and that some client-side rules made in classic Outlook cannot be processed there.
  • Classic Outlook: a VBA macro can save an attachment to a folder with the Attachment.SaveAsFile method. Rules with custom actions come from add-ins that third-party developers write as .dll files; Microsoft does not provide them. Such a rule runs only on the computer where the add-in is installed and only while Outlook is running.

So the short answer to "can Outlook save attachments from a specific sender to a folder without Power Automate" is: not with a built-in rule. What remains is a VBA macro or a custom action add-in in classic Outlook, or a cloud service that watches the mailbox.

Power Automate: from Outlook to OneDrive or SharePoint

For Microsoft 365 mailboxes, Power Automate is the route Microsoft documents. The three connectors involved (Office 365 Outlook, OneDrive for Business and SharePoint) are in the Standard class, and Microsoft includes basic Power Automate use at no cost for work or school accounts, limited to standard connectors and to cloud flows without sharing.

  1. Create an automated cloud flow with the Office 365 Outlook trigger When a new email arrives (V3). Pick the Folder, put the sender addresses in From separated by semicolons, add a Subject Filter if you need one, and set Only with Attachments and Include Attachments to Yes.
  2. Loop over the attachments of the message and skip every attachment whose Is Inline property is true. The connector reference lists that property for each attachment.
  3. Write each remaining file with Create file. In OneDrive for Business it takes a folder path, a file name and the file content, and characters OneDrive does not allow are replaced with underscores. In SharePoint it takes a site address and a folder path that must start with an existing library.
  4. For a shared mailbox such as invoices@, use When a new email arrives in a shared mailbox (V2) with the mailbox address. Your account needs permission to that mailbox.

The Office 365 Outlook connector reference also documents limits that can lead to missed or doubled runs:

  • The trigger skips any email larger than the limit your Exchange admin set or 50 MB, whichever is less, and it may skip protected emails.
  • For digitally signed emails, the attachment content in the trigger output can be incorrect.
  • If Safe Attachments in Microsoft Defender for Office 365 uses Dynamic Delivery, the trigger may run twice, the first time with no attachments.
  • With Include Attachments set to Yes, the trigger can time out when many emails with attachments arrive at once; Microsoft suggests setting it to No and fetching each file with Get Attachment (V2).
  • The shared mailbox trigger intermittently fires for older emails moved to another folder, which Microsoft describes as by design, and new mailbox permissions can take about two hours to replicate.
  • Emails and calendar items attached to an email are not supported; EML, MSG and ICS files reach the flow only inside a .zip archive.

Gmail: filters, Apps Script and add-ons

Google's help page on Gmail filters lists no action that saves an attachment to Google Drive. Google also notes that a reply to a filtered message is only filtered if it meets the same search criteria. Google offers two ways to add the missing step:

  • Apps Script: a script searches Gmail, reads each message's files with getAttachments() and writes them to a Drive folder with createFile(blob). Inline images are returned too unless you pass includeInlineImages: false, as the GmailMessage reference shows. A time-driven trigger runs the script on a schedule, from every minute to once a month. Quotas apply per user: 6 minutes per run; 90 minutes of trigger runtime a day on a consumer account and 6 hours on Google Workspace; 20,000 email reads and writes a day on a consumer account and 50,000 on Google Workspace. Past a quota, the script throws an exception and stops.
  • An add-on from the Google Workspace Marketplace: the Marketplace lists apps that Google develops under "Built by Google"; other add-ons come from their own developers. Installing one opens an OAuth consent screen with the permissions it asks for, and a Workspace administrator can limit which apps you may install. An add-on can run a time-driven trigger at most once an hour.

Zapier: the same job without code

Zapier's Gmail and Google Drive page lists the Gmail trigger New Attachment, which fires when you receive a new attachment and can be narrowed by label or mailbox and search keywords, and the Google Drive action Upload File. For Microsoft 365, the Outlook and OneDrive page lists the Outlook triggers New Attachment, New Email in Personal Inbox and New Email in Shared Mailbox, and the OneDrive action Upload File. On the Free plan, Zapier checks for new data every 15 minutes.

  • Free plan: 100 tasks a month and two-step Zaps, according to Zapier's pricing page. A task is a successful action and triggers use none (task usage), so a Zap that uploads one file per run uses one task per file. When a plan without pay-per-task billing reaches its limit, Zapier holds new runs until the billing cycle resets.
  • First paid plan: Professional starts at $19.99 a month with yearly billing.
  • Errors: by default Zapier pauses a Zap that hits an error on 95% or more of its runs in the last 7 days (error settings).

Where these recipes break: what to test

Run each test with a real message before you rely on the flow. These are checks, not known faults, unless a vendor documents them.

  1. Replies in a thread. Reply to a message that had an attachment, and have the sender answer with the file still attached. Check whether the file is saved twice. Besides the double runs listed above, Microsoft's connector reference notes that after a request times out, the default retry policy can run the same action more than once.
  2. Signature images. Send a message from someone whose signature has a logo. If the logo lands in the folder, filter on Is Inline in Power Automate or set includeInlineImages to false in Apps Script.
  3. Zipped attachments. Send a .zip. A flow saves the archive as one file unless you unpack it; the OneDrive action Extract archive to folder accepts archives up to 50 MB with up to 100 files inside.
  4. Files with the same name. Have two senders send a file called invoice.pdf on the same day and see whether the second one replaces the first, fails or gets a new name. Putting the date and the sender into the file name makes a clash less likely.
  5. Silent stops. Decide who reads the error emails. Power Automate turns off a flow whose trigger or actions fail continuously for 14 days, and may turn off a flow that is not triggered within 90 days, with a notice to the owners and co-owners 30 days before; flows owned by users with premium or capacity licences are exempt from that rule (flow limits). Apps Script emails a summary when a trigger fails, but not for triggers created by add-ons. Flows on the Power Automate Free licence cannot be shared, so plan for the day their owner is away.

When a document system makes more sense

A recipe saves files. It does not record what each file is or whether the same invoice already came in (see why email is not for business documents). With several inboxes and several people, a system that treats the inbox as an intake can be simpler to check than a chain of flows.

In Arhivix, company email inboxes on Gmail, Microsoft 365 or IMAP are connected as an intake and assigned to users. Email rules by sender, subject or content file the attachment into a folder, set the document type or notify someone. Documents Arhivix is unsure about wait in the Smart Inbox with a suggested place for a person to accept or reject, and possible duplicates (the same invoice number, the same supplier and amount, or an identical file) are flagged for a person to decide. Filed documents are searchable: by file name on the free plan, by content and by a plain description on the paid plans. The files are stored in Arhivix, hosted on AWS in the EU (Frankfurt and Dublin).

The free plan, Arhivix Lite, includes one email inbox and two users; paid plans are priced per company, not per user, and include 5, 10 or 20 user accounts and 3, 10 or 30 email inboxes (pricing). The mail and sign-in connections are listed on the integrations page, and if your files end up in SharePoint, see Arhivix and SharePoint compared.

Questions people ask

Can Outlook save attachments from a specific sender to a folder automatically, without Power Automate?

Not with a built-in rule. Microsoft's guide to Outlook rules describes rules that move messages to other folders, change their importance or delete them, and lists no action that saves an attachment as a file. In classic Outlook a VBA macro can save an attachment with the Attachment.SaveAsFile method, and a rule can run a custom action from a third-party add-in; Microsoft notes that a rule with a custom action runs only on the computer where it is installed and only while Outlook is running. New Outlook does not support VBA macros or COM add-ins.

Why does my Power Automate or Zapier flow save the same attachment twice?

Test replies first: a reply that still carries the file can reach the trigger as a new message. Microsoft also documents that the Outlook trigger may run twice when Safe Attachments uses Dynamic Delivery, that the shared mailbox trigger intermittently fires for older emails moved to another folder, and that after a request times out the default retry policy can run the same action more than once. Add a check on file name or content before the file is written.

How do I save Gmail attachments to Google Drive automatically for free?

Not with a filter: Google's help page lists filter actions that label, archive, delete, star or forward mail, and none of them saves a file. Google Apps Script can do it: a script on a time-driven trigger reads attachments with getAttachments() and writes them to a Drive folder with createFile(), within daily quotas such as 90 minutes of trigger runtime on a consumer account. Zapier's free plan also works for up to 100 tasks a month, checking for new mail every 15 minutes.

Can Power Automate save attachments from a shared mailbox?

Yes, with the trigger When a new email arrives in a shared mailbox (V2) and an account that has permission to the mailbox. Microsoft notes that new permissions can take about two hours to replicate and that this trigger intermittently fires for older emails moved to another folder, by design.

Do I need a paid Power Automate licence to save Outlook attachments to OneDrive?

Not for the basic flow. The Office 365 Outlook, OneDrive for Business and SharePoint connectors are Standard connectors, and Microsoft includes basic Power Automate use at no cost for work or school accounts, limited to standard connectors and to cloud flows without sharing.

Sources

  1. Microsoft Support: Manage email messages by using rules in Outlook checked
  2. Microsoft Support: Feature comparison between new Outlook and classic Outlook checked
  3. Microsoft Learn: Attachment.SaveAsFile method (Outlook) checked
  4. Microsoft Learn: Office 365 Outlook connector checked
  5. Microsoft Learn: OneDrive for Business connector checked
  6. Microsoft Learn: SharePoint connector checked
  7. Microsoft Learn: Types of Power Automate licenses checked
  8. Microsoft Learn: Limits of automated, scheduled, and instant flows checked
  9. Gmail Help: Create rules to filter your emails checked
  10. Google Apps Script: Class GmailMessage checked
  11. Google Apps Script: Class Folder checked
  12. Google Apps Script: Installable triggers checked
  13. Google Apps Script: Quotas for Google services checked
  14. Google Workspace Help: Find and install an app in the Marketplace checked
  15. Zapier: Plans and pricing checked
  16. Zapier: Gmail and Google Drive integrations checked
  17. Zapier: Microsoft Outlook and OneDrive integrations checked
  18. Zapier Help: How is task usage measured in Zapier? checked
  19. Zapier Help: Decide how your Zap handles errors with advanced settings checked