Watch folder and process files automatically: SharePoint, S3, Teams

Watch a folder and process files automatically: Mail Attachment Downloader runs new files from shares, SharePoint, S3, Teams or Slack through your rules.

To watch a folder and process files automatically, add a watch in Mail Attachment Downloader. It checks a folder, a network share, a SharePoint library, OneDrive or an S3 bucket about every 60 seconds and sends each new file through your PRO Rules, the same rules that handle email attachments: rename it, read it, convert it, upload it, tell someone.

The examples use Contoso’s scanner share \\fileserver\Finance\Scans, the Finance SharePoint and invoices from Acme.

What can you watch?

A watch works like an email account, but its source is something else. Each new file, row or message becomes an “email” for your rules: a file is its attachment and its name the subject, so conditions such as the attachment name work as they do for mail.

  • Folder or network share: a local folder or \\server\share\folder, such as the one a scanner or another program drops files into.
  • Cloud folder: SharePoint, OneDrive, Amazon S3 and S3-compatible storage (Wasabi, Backblaze B2, MinIO and others), or a network share with its own sign-in.
  • DocuSign: envelopes that everybody has signed, with the signed documents as the attachments.
  • Database table: its new rows, and changed rows if the table has a “last changed” time column and a row ID column.
  • Slack and Microsoft Teams channels: their messages, with the files posted in them.

Azure Blob, WebDAV, SFTP, FTPS, Google Drive and Dropbox can be uploaded to, but not watched yet.

What you need

  • Folders, shares, cloud folders and DocuSign: PRO Rules Client or PRO Rules Server.
  • Database tables, Slack and Teams: PRO Rules Server.
  • Windows: Windows 10 or later, 64-bit, on a PC, a server or a cloud VM. Watches don’t count toward the number of email accounts.

How to watch a folder and process new files

1. Add the watch

Click Add account and choose Watch a folder or network share. The same menu has the cloud folder, the database table, Slack, Teams and DocuSign. You can also add one in Settings › Sources › Watches with Add….

Mail Attachment Downloader's Add account menu: Email account, Watch a folder or network share, Watch a cloud folder (SharePoint, OneDrive, S3), Watch a database table's new rows, Watch Slack channels, Watch Microsoft Teams channels and Watch DocuSign for signed envelopes
Add account: email accounts and every kind of watch start here.

2. Choose the folder and when it runs

  • Folder: type it or click Browse…. Use \\server\share rather than a mapped drive letter: the Windows service can’t see mapped drives.
  • Watch name: such as “Scans”. Rules and History know the watch by this name.
  • Run as soon as something changes: on by default. It checks every Seconds between checks (60), and a folder also hears Windows’ own file events, so a file dropped in runs at once. The schedule runs it too.
  • Include the folders inside it: watch the subfolders as well.
  • Also take the files already there: off, the watch takes only what arrives after you save it. On, its first run takes everything in the folder.

Click Test to see what the watch can reach, then Save.

Watch a folder and process files automatically: the Watch Folder window of Mail Attachment Downloader with the network share \\nas\scans, Run as soon as something changes, 60 seconds between checks, Include the folders inside it, and Also take the files already there off
A folder watch on a scanner share: each new scan goes through your rules.

3. Make a rule for it

When you save a new watch, the program offers to make a rule just for it. The rule starts with an Account condition that names the watch; you add what to do with its files under Save and Then. For a scanner share that could be:

  • Make PDFs searchable (OCR) (PRO Rules Server), see make scanned PDFs searchable.
  • Find fields with AI to read the invoice number and total, see process invoices automatically.
  • Upload to cloud to put the result in SharePoint.
  • Move or copy the email, which for a watch moves the file into a folder inside the watched one, such as Processed. Delete the email deletes the file.

Rules without an Account condition run for every account and watch. A watch with no rule saves its files to its own save folder, as an account saves attachments.

How does a watch know what’s new?

  • Each check is small: nothing new, no run, so the Downloads tab doesn’t fill with empty runs.
  • A changed file counts as new: a new version goes through the rules again, under its own name.
  • Half-written files wait: a file still being copied is left for the next run.
  • No loops: files your rules write into the watched folder, such as the Processed folder, are left alone.
  • Nothing twice: each watch has its own History, with its runs in the Downloads tab, and a failed step is tried again.

SharePoint folder automation (and OneDrive and S3)

Choose Watch a cloud folder (SharePoint, OneDrive, S3). Pick a Cloud connection, the same ones the Upload to cloud step uses (Manage… adds one in Cloud Connections), then Browse… to the library and folder, such as finance › Contracts. Each check is one small request to the service.

SharePoint folder automation: the Watch Cloud folder window of Mail Attachment Downloader with the Cloud connection Finance SharePoint, the folder finance › Contracts, Run as soon as something changes and 60 seconds between checks
A SharePoint library watch: new contracts go through your rules.

Handy for taking documents out of one system and handing them to another: a contract saved in SharePoint is read, renamed and sent to document management, or a file in an S3 bucket goes to a share and is moved to Processed.

Process files from a Microsoft Teams channel

Choose Watch Microsoft Teams channels, enter your Microsoft account and click Sign in…. Reading channel messages needs an administrator’s consent once in most organizations. Each message goes through your rules as an email from its sender, its text as the body and its files as attachments. The channel is the mailbox folder, so Choose channels… in the folder pane picks the channels to read, and a rule can pick one by its folder.

Process files from a Microsoft Teams channel: the Watch Microsoft Teams window of Mail Attachment Downloader with the Microsoft account box, Sign in, and Also take the messages already posted
A Teams watch: channel messages and their files go through your rules as emails.

Slack works the same way with Watch Slack channels: make a Slack app with the read scopes the window lists, paste its Bot token, and invite the bot to the channels. Messages from apps and bots are left out, so a rule that posts to the channel it watches doesn’t start itself again.

The Watch Slack window of Mail Attachment Downloader: the Slack app scopes to give, the Bot token box, Make a Slack app, and Also take the messages already posted
A Slack watch reads the channels its bot was invited to.

Signed DocuSign envelopes and new database rows

Watch DocuSign for signed envelopes takes each envelope everybody has signed. Under Take, choose The signed documents as one PDF, Each document and The certificate of completion. Sent by limits it to one sender, and it can take only the envelopes the program sent with Send for signature.

The Watch DocuSign window of Mail Attachment Downloader: DocuSign connection, Take the signed documents as one PDF, each document or the certificate of completion, Sent by, and Also take the envelopes already completed
A DocuSign watch: signed contracts are filed without anyone downloading them.

Watch a database table’s new rows reads a table through one of your ODBC Data Sources. Pick the Table and the column in New rows by, such as an ID that grows. Each row becomes an email whose attachment is the row as a .json file, and each column is a field, such as {OrderId}, for file names and steps.

The Watch Database table window of Mail Attachment Downloader: Data source Orders DB, Table dbo.Orders, New rows by OrderId, Row ID none, and 60 seconds between checks
A database watch: each new order row goes through your rules.

Watch around the clock

Watches run while Mail Attachment Downloader is open. To run them 24×7, even when nobody is signed in, install the Windows service with PRO Rules Server. The service runs as Local System, which can’t open most shares: give it a share as a cloud connection with its own sign-in. Want to know when tonight’s file doesn’t come? Tick Check for missing files on the watch’s rule, see alerts for missing emails and files.

Questions people ask

Does it process the files already in the folder?

Only if you tick Also take the files already there. Otherwise the watch starts with what arrives after you save it.

How fast does it pick up a new file?

A local folder or share reacts at once to Windows’ file events. Cloud folders, Teams, Slack, DocuSign and tables are checked every 60 seconds, or as often as you set.

Can it move processed files to another folder?

Yes. Move or copy the email moves the file into a folder inside the watched one, on a folder, share, S3 or SharePoint. Or copy it anywhere with an upload or copy step.

Can it watch Google Drive or Dropbox?

Not yet. They can be uploaded to, but not watched.

Try it: download Mail Attachment Downloader and start with the free edition, or compare the PRO editions, each with a 30-day money-back guarantee.

Related

Questions about this post? Contact us.

Email attachments to DocuSign automatically: send documents for signature and file the signed copies

Send email attachments to DocuSign automatically: Mail Attachment Downloader makes the envelope, adds signers and anchors, and files the signed PDF.

To send email attachments to DocuSign automatically, let a rule pick the emails and add the Send for signature step. Mail Attachment Downloader makes a DocuSign envelope of each saved file (or of all the email’s files), sends it to the signers you name or the ones the email names, and can place the signature on a marked spot. When everybody has signed, a DocuSign watch takes the signed PDF back and your rules file it like an attachment.

New in version 4.0. The examples use Contoso’s mailbox contracts@contoso.com, contracts from Acme and Fabrikam, and the folder \\fileserver\Contracts\Signed.

What can you automate with DocuSign?

  • Contracts from sales: a signed-off contract emailed to contracts@contoso.com goes to the customer for signature, then to your manager.
  • Supplier agreements: Acme sends its agreement; Contoso’s signer gets it at once, without anyone uploading it to DocuSign.
  • Forms from a system: an HR or ERP system emails a PDF to sign; it goes out with a DocuSign template’s roles.
  • The signed copies: completed envelopes are saved, renamed and filed, or sent on to DocuWare, Laserfiche or M-Files.

What you need

  • The edition: PRO Rules Client or PRO Rules Server. Send for signature and the DocuSign watch are part of PRO Rules.
  • DocuSign: an account that may send envelopes, on the production service or in DocuSign’s demo sandbox to try it first.
  • Windows: Windows 10 or later, 64-bit, on a PC, a server or a cloud VM.
  • The mailbox: Gmail, Google Workspace, Microsoft 365, Outlook.com, Exchange, or any IMAP or POP3 mailbox.

Step 1: Connect DocuSign once

Open Settings › Sources › Document Management, click Add… and choose DocuSign. You need an integration key, which you add in DocuSign under Settings › Apps and Keys; Where to find these values shows where each value is. Sign in with offers two ways:

  • Integration key with the user’s consent: nobody has to be signed in, also when the Windows service runs it. Enter the Integration key, the API user ID and the key’s RSA Private key (or Load file…), then click Give consent… once and allow it as the API user.
  • Sign in in the browser: you sign in at DocuSign as yourself. The sign-in is kept, encrypted, and renewed on its own.

Leave Environment empty for production, or enter demo for the developer sandbox. List finds the Account. Name the connection, such as “Contoso DocuSign”, and click Test.

New DocuSign connection window in Mail Attachment Downloader for DocuSign automation: Sign in with Integration key with the user's consent, Environment production or demo, Account with List, Integration key, API user ID, Private key with Load file, Redirect port, Give consent and Test
A DocuSign connection: production or the demo sandbox, with nobody signed in.

Step 2: Add Send for signature to a rule

  1. On the PRO Rules tab, click New rule…. Under Which emails, add a condition, such as “to sign” in the subject, or the folder Contracts. New to rules? Save emails and attachments to folders walks through one.
  2. Under Save, save the attachments. Only PDFs? Add an attachment name condition such as \.pdf$.
  3. Under Then, click Add a step…, open Other systems and double-click Send for signature.
Add a step window with Other systems chosen: Send for signature sends the saved files for signature with DocuSign, next to Upload to cloud, Send to document management, Send to Zapier and Web hook
Add a step › Other systems › Send for signature.

Signers, routing order and signature anchors

Pick the Connection (Manage… adds one). Under Recipients, the step starts with one signer: the email’s sender. Add a signer adds more, and Add a copy adds someone who gets the signed document but doesn’t sign. For each one:

  • Name and Email: fixed, such as legal@contoso.com, or from a field. {EMAIL_FROM} is the sender’s address; a field the rule found, such as {SIGNER_EMAIL} from the contract, works too.
  • Order: the routing order. Signers with the same number are asked together; a higher number is asked after the lower ones signed. With 0, signers are asked together and copies go after them.
  • Where it’s signed: a signature anchor, text in the document such as /sn1/, where this signer’s signature goes. Empty: the signer places it.

Then the envelope itself:

  • Subject and Message: what DocuSign’s email says, with fields if you like. An empty subject reads “Please sign:” and the file’s name.
  • Each envelope holds: one saved file (each attachment is an envelope), or the email’s saved files together in one envelope.
  • Leave it as a draft in DocuSign: a person checks the envelope in DocuSign and sends it.
  • Test the connection: signs in and finds the account (and the template). It sends nothing.
Mail Attachment Downloader's Send for signature step on the rule Contracts to sign: the Contoso DocuSign connection, two signers (Acme Legal from the email, order 1, signing at /sn1/; Contoso Finance, order 2) and a copy to Contoso Legal, the subject Please sign: {SUBJECT} and a message
Send for signature: signers from the email or fixed, their order, and where each one signs.

DocuSign templates and roles

Already have a DocuSign template with its fields and tabs? Click List the templates and choose it under Template. Each recipient then takes one of the template’s roles in Template role, such as Client or Manager, with the name and email filled from the email or fixed.

No envelope sent twice

If the email comes again, for example after a Redo, the default sends nothing while an envelope is out for the file. You can send another only if the earlier one was voided, declined or timed out, or send one each time. Before you turn the rule on, click Test this rule…: it shows which emails the rule picks and only describes the envelope, without sending it.

Test rule window in Mail Attachment Downloader: emails from Acme, Northwind and Fabrikam marked Matched, Taken by another rule or Not matched; steps that reach outside the computer, such as sending for signature, are only described
Test this rule: see which emails would be sent for signature, without sending anything.

Step 3: Take the signed documents back with a DocuSign watch

A watch works like a mail account whose new items are completed envelopes. Open Settings › Sources › Watches, click Add… and choose DocuSign: signed envelopes.

  • DocuSign connection: the same connection (New… adds one).
  • Take: The signed documents as one PDF, Each document, and The certificate of completion if you keep it.
  • Envelopes: only the envelopes sent by Send for signature, or all of them. Sent by limits it to one sender’s envelopes.
  • When it runs: Run as soon as something changes, with a check every 60 seconds. A new watch takes only envelopes completed after it is saved, unless you tick Also take the envelopes already completed.
DocuSign watch window (DocuSign: signed envelopes): DocuSign connection, Take the signed documents as one PDF, each document or the certificate of completion, only the envelopes sent by Send for signature, Sent by, Run as soon as something changes, Seconds between checks 60
The DocuSign watch takes completed envelopes, signed PDFs and all.

Each completed envelope then goes through your PRO Rules like an email from its sender, with the signed documents as the attachments. In a rule for the watch (an Account condition with the watch’s name), Which emails reads Which envelopes, and fields such as {DOCUSIGN_SIGNERS}, {DOCUSIGN_COMPLETED} and {DOCUSIGN_ENVELOPE_ID} name and file the PDF, for example in \\fileserver\Contracts\Signed\{DATE[yyyy]}. Steps such as Upload to cloud or Send to document management can follow. The watch has History too, so an envelope is taken once.

Questions people ask

Can I send an email attachment to DocuSign automatically without opening DocuSign?

Yes. The rule makes and sends the envelope on its own. Tick Leave it as a draft in DocuSign if someone should look first.

Does it work with the DocuSign developer sandbox?

Yes. Enter demo as the Environment of the connection; leave it empty for production.

Does it work with Adobe Sign or other e-signature services?

Not directly: DocuSign is the e-signature service the step supports. For others, a web hook or Zapier step can hand the file to their API.

Does the program have to run while people sign?

Only to send and to take the signed envelopes back. For 24×7, even when nobody is signed in, use the Windows service of PRO Rules Server with the integration key sign-in.

Try it: download Mail Attachment Downloader and start with the free edition, or compare the PRO editions, each with a 30-day money-back guarantee.

Related

Questions about this post? Contact us.

Email to DocuWare, Laserfiche or M-Files: file email attachments with index fields automatically

Email to DocuWare, Laserfiche or M-Files: Mail Attachment Downloader files attachments with index fields from the email and never files one twice.

To get email into DocuWare, Laserfiche or M-Files without dragging files by hand, let a rule pick the emails and add the Send to document management step. Mail Attachment Downloader then files each saved attachment in your file cabinet, repository folder or vault, with its index fields filled from the email and from values found in the document. If the same email is processed again, the document it filed is updated, not duplicated.

New in version 4.0. The examples use Contoso’s mailbox finance@contoso.com, invoices from Acme and Fabrikam, and invoice numbers like INV-2026-0423.

Which document management systems does it work with?

  • DocuWare: DocuWare Cloud or your own DocuWare server. Documents go into a file cabinet (or a basket).
  • Laserfiche Cloud, and Laserfiche on your own server with the Laserfiche API Server, version 11 or later. Documents go into a folder of the repository.
  • M-Files: a vault on your M-Files server or in M-Files Cloud. Documents get a class, whose properties are the fields.

Using another system, or a capture tool such as Chronoscan? See email capture through a watched folder below.

What you need

  • The edition: PRO Rules Client or PRO Rules Server. Send to document management is a step in a PRO rule.
  • Windows: Windows 10 or later, 64-bit, on a PC, a server or a cloud VM. No Outlook needed.
  • The mailbox: Gmail, Google Workspace, Microsoft 365, Outlook.com, Exchange, or any IMAP or POP3 mailbox.
  • The system: a sign-in with the right to store documents where they should go.

Step 1: Connect DocuWare, Laserfiche or M-Files once

Open Settings › Sources › Document Management, click Add… and choose the system. Each window says what it needs; Where to find these values explains where they are in the system. Give it a Connection name, such as “Accounts payable”, click Test, then OK. Rules pick the connection by name, so many rules share one sign-in.

DocuWare (Cloud or on-premises)

Enter the Server: your DocuWare Cloud name, such as contoso, or the address of your own server. Sign in with offers three ways:

  • Service application (client ID and client secret): an app registration that signs in for itself. Nobody has to be signed in.
  • DocuWare user name and password: a DocuWare user, not a single sign-on one.
  • Sign in in the browser: for organizations that sign in through single sign-on.

List then finds the Organization.

New DocuWare connection window in Mail Attachment Downloader for email to DocuWare: Sign in with Service application (client ID and client secret), Server, Organization with List, Client ID, Client secret, Connection name DocuWare and Test
A DocuWare connection: DocuWare Cloud or your own server.

Laserfiche Cloud

In Laserfiche Cloud’s Developer Console, create a service app with a service principal that has rights to the repository, and an access key. Paste the Access key (or Load file…) and the Service principal key; List finds the Repository.

New Laserfiche Cloud connection window for Laserfiche email import: Sign in with Service app (access key and service principal key), Access key with Load file, Service principal key, Repository with List and Connection name Laserfiche Cloud
Laserfiche Cloud signs in with a service app’s access key.

Laserfiche on your own server

Enter the API Server, such as https://lfserver.contoso.com/LFRepositoryAPI, and sign in with a repository user, a Directory Server user or a Windows user (DOMAIN\user), or through Directory Server in the browser.

New Laserfiche connection window for Laserfiche on your own server (API Server, version 11 or later): Sign in with User name and password, API Server, Repository with List, User name, Password, Certificate Windows' own trust
Self-hosted Laserfiche needs the API Server, version 11 or later.

M-Files (server or M-Files Cloud)

Enter the Server: the M-Files Web address, or your M-Files Cloud vault’s address. Sign in with an M-Files user and password, a Windows user, or a federated sign-in in the browser (Entra ID, Okta, Google…). List finds the vaults the user can open.

New M-Files connection window to save email attachments to M-Files: Sign in with M-Files user name and password, Server, Vault with List, User name, Password and Connection name M-Files
An M-Files connection: your server or M-Files Cloud.

For your own server, the certificate must be one Windows trusts; one it doesn’t is shown when you test, for you to check and accept. Keys and passwords stay on this computer, encrypted, and nothing is sent until a rule uses the connection.

Step 2: Add Send to document management to a rule

  1. On the PRO Rules tab, click New rule…. Under Which emails, add a condition such as the sender’s domain acme.example. New to rules? Save emails and attachments to folders walks through one.
  2. Under Save, save the attachments. The step files these saved files.
  3. Under Then, click Add a step…, open Other systems and double-click Send to document management.
Add a step window with Other systems: Send to document management files the saved files in Laserfiche, M-Files or DocuWare, next to Upload to cloud, Send for signature, Send to Zapier and Web hook
Add a step › Other systems › Send to document management.

Then set up the step:

  • Connection: pick it. Manage… adds one if it isn’t there yet.
  • File cabinet, Folder or Class: click Browse… and choose where the documents go: the DocuWare file cabinet, the Laserfiche folder, or the M-Files class.
  • Fields: click Mapping… to fill the index fields (next section).
  • Test: signs in, finds the place and checks the fields. It sends nothing.
Mail Attachment Downloader's Send to document management step: connection Accounts payable (DocuWare), file cabinet Invoices, 5 fields filled, document name {INVOICE_NUMBER} {FILENAME}, one document per saved file, and Update the document filed before if the email comes again
Send to document management: pick the connection and the file cabinet, then map the fields.

Map index fields from the email and the document

Mapping… lists the fields of the file cabinet, the Laserfiche template or the M-Files class, with the required ones marked *. For each field, choose where its value comes from:

  • Rule fields: the email’s details, such as {SUBJECT}, {EMAIL_FROM} or {DATE[yyyy-MM-dd]}. Fill in the email’s details fills fields named Subject, From, To, Received or File name in one click.
  • Extracted field: a value the rule found in the document, such as {INVOICE_NUMBER} or {TOTAL_INCLUDING_TAX}, from Find fields in the file, Find fields with AI or the Parser.
  • Fixed text: the same value for each document, such as “Accounts payable”.

For dates and numbers, Format gives the form the field needs, such as MM/dd/yyyy. When empty says what happens to a value that comes out empty: Leave it empty, Use the fallback or Fail the send. Laserfiche documents can also get Tags; an M-Files lookup can add a list item for a value that isn’t one yet.

The field mapping window for the DocuWare file cabinet Invoices: Invoice number and Total from extracted fields, Supplier and Invoice date from the email's fields, Department as fixed text, and what to do when a value is empty
Map each index field to an email field, a value the rule found, or fixed text.

No duplicates when an email is processed again

The step remembers the ID of each document it filed. Under More options, If the email comes again decides what a second run does, for example after a Redo in the Downloads tab:

  • Update the document filed before (the default): its fields, name, and its file when it changed.
  • Add a new version of it: for M-Files; the others update it.
  • File another document, and keep both, or Leave the document as it is, send nothing.

Also under More options:

  • Document name: left empty, the saved file’s name; or fields, such as {INVOICE_NUMBER} {FILENAME}.
  • One document holds: each attachment as its own document, or, in M-Files and DocuWare, the email’s saved files together as one document.
  • If the name is taken (Laserfiche and M-Files; DocuWare doesn’t ask): by a document the program didn’t file. Let the system give it another name (the default), put the file into that document, send nothing, or fail the step.

Before you turn the rule on, click Test this rule…: it shows which emails the rule picks and only describes the send. And each account’s History remembers the emails it has handled, so a normal run doesn’t file the same email twice.

Email capture with Chronoscan or another tool

There’s no direct connector for capture tools such as Chronoscan. Let the rule save the attachments to the folder the tool watches, such as \\fileserver\Finance\Capture, named the way it likes, and the tool takes them from there. For SharePoint, OneDrive or S3, use Upload to cloud instead.

File documents around the clock

To file documents 24×7, even when nobody is signed in, run the program as the Windows service of PRO Rules Server. Pick a sign-in that needs no person: a DocuWare service application, a Laserfiche service app or user, or an M-Files or Windows user.

Questions people ask

Can I file the email itself in DocuWare or M-Files, not only the attachments?

Yes. Under Save, set What to save to The email and its attachments: the email is saved as an .eml file and filed with them. In M-Files and DocuWare, One document holds can keep them together as one document.

Does it fill DocuWare index fields from the PDF?

Yes, from values a Find fields step or the Parser found in the PDF, mapped with Mapping….

Does it work with Laserfiche 10?

The self-hosted connection needs the Laserfiche API Server, version 11 or later.

What if a send fails?

A busy system is tried again a few times. If it still fails, the step fails, the Downloads tab shows it, and History tries it again later.

Try it: download Mail Attachment Downloader and start with the free edition, or compare the PRO editions, each with a 30-day money-back guarantee.

Related

Questions about this post? Contact us.

Save email attachments to SharePoint, OneDrive, S3, Dropbox or Google Drive automatically

Save email attachments to SharePoint, OneDrive, Amazon S3, Google Drive, Dropbox, SFTP or a NAS automatically, in folders named from the email.

Many teams want invoices, contracts and receipts from email in SharePoint, OneDrive or a cloud bucket, not in a mailbox. Mail Attachment Downloader puts them there. A rule picks the emails, saves the attachments, and its Upload to cloud step sends each saved file to a folder in your cloud storage, in subfolders and with names built from the email.

New in version 4.0. The examples use Contoso’s mailbox finance@contoso.com and invoices from Acme.

Which cloud storage can you save email attachments to?

One step works with all of these:

  • Microsoft: OneDrive (personal, work or school) and SharePoint document libraries, Online and on-premises.
  • Amazon S3 and S3-compatible storage: Wasabi, Backblaze B2, Cloudflare R2, DigitalOcean Spaces, Google Cloud Storage (with an HMAC key), MinIO and others.
  • Azure Blob Storage.
  • WebDAV: Nextcloud and ownCloud, pCloud, Koofr, Yandex Disk, a Hetzner Storage Box, a Synology or QNAP NAS, or any WebDAV server.
  • File servers: SFTP, FTPS (FTP over TLS), and a network share (SMB) with its own sign-in.
  • Google Drive and Dropbox: through your own Google Cloud or Dropbox app (more on that below).

What you need

  • The edition: PRO Rules Client or PRO Rules Server. Upload to cloud is a step in a PRO rule, so Free, PRO Backup and PRO Parser don’t have it.
  • Windows: Windows 10 or later, 64-bit, on a PC, a server or a cloud VM. No Outlook needed.
  • The mailbox: Gmail, Google Workspace, Microsoft 365, Outlook.com, Exchange, or any IMAP or POP3 mailbox, added with Add account.
  • The storage: an account at the service that may write to the folder or bucket.

Step 1: Connect your cloud storage once

Open Settings › Sources › Cloud Connections. Add each service or server once, with a name; rules then pick the connection by name, so many rules share one sign-in.

  1. Click Add… and choose the service.
  2. Fill in what it asks for (see the list below) and give it a Connection name, such as “Finance SharePoint”.
  3. Click Test, then OK.
The Cloud connections window with five connections: Finance SharePoint (SharePoint), Google Drive, Office share (Network share), Partner SFTP (SFTP) and Wasabi (S3), and the buttons Add, Sign in again, Edit, Test, Rename, Show rules and Remove
Cloud connections: add each service once. Rules pick a connection by its name.

What each service asks for:

  • SharePoint and OneDrive: your Microsoft account. Sign in… opens Microsoft’s sign-in in the browser; sign in and accept. No password is kept.
  • S3 and S3-compatible: pick the Provider (Amazon S3, Wasabi, Backblaze B2, Cloudflare R2…), then the Endpoint, Region, Access key ID and Secret access key of a user that may list, read and write the bucket.
  • Azure Blob Storage: the Storage account and its Account key, or a SAS token for one container.
  • WebDAV: pick the Provider, such as “Nextcloud or ownCloud”, and enter the Server URL, User name and an app password where the service has them.
  • SFTP and FTPS: the Server, Port, User name and a password (SFTP can use a private key). The first Test shows the server’s host key or certificate to check and accept. Plain FTP isn’t offered: it sends the password unencrypted.
  • Network share: the Share, such as \\fileserver\Finance, with its own user name and password. Nothing is mapped to a drive letter.

Google Drive and Dropbox: with your own app

Google Drive and Dropbox connect through an app you make in your own Google Cloud or Dropbox account. It takes a few minutes. The window says what to do, and How to create one opens a guide.

  • Google Drive: in the Google Cloud console, enable the Google Drive API, publish the OAuth consent screen (or the sign-in stops working after 7 days) and create an OAuth client ID of type “Desktop app”. Paste its Client ID and Client secret, or use Load both from the downloaded JSON file…, then click Sign in….
  • Dropbox: in the Dropbox App Console, create a Scoped access app with Full Dropbox, tick files.content.write and files.metadata.read, and copy the App key. Click Sign in…, allow access, paste the code Dropbox shows into Code and click Continue.
The New Google Drive connection window: what to set up in the Google Cloud console, the How to create one link, Client ID and Client secret boxes, Load both from the downloaded JSON file, Sign in, and the connection name Finance GoogleDrive
A Google Drive connection uses your own Google app: paste its ID and secret, then sign in.

Later, Sign in again renews a sign-in that stopped working, and Show rules lists the rules that use a connection.

Step 2: Add the Upload to cloud step to a rule

New to PRO Rules? Save emails and attachments to folders walks through a first rule.

  1. On the PRO Rules tab, click New rule….
  2. Under Which emails, click Add a condition, for example the sender’s domain acme.example, or “invoice” in the subject.
  3. Under Save, choose what to save and where, such as the attachments to D:\Finance\Invoices. The upload sends these saved files.
  4. Under Then, click Add a step…, open Other systems and double-click Upload to cloud.
The Add a step window with Other systems chosen: Upload to cloud, Send to document management, Send for signature, Send to Zapier and Web hook, and Add it: Then
Add a step › Other systems › Upload to cloud.

Now set up the step:

  1. In Cloud connection, pick the connection. Manage… opens Cloud connections if it isn’t there yet.
  2. Next to Destination, click Browse… and choose the folder: the site, library and folder in SharePoint, the bucket and folder in S3, the container in Azure Blob, a folder on the server or share. New folder makes one.
  3. Run is For each saved file: each attachment the rule saves is uploaded.
  4. Click Test upload. It uploads a small test file to the destination and deletes it again, so you know the connection and the folder work.
  5. Click Save.
The Choose a folder window for an S3 connection: the bucket acme-invoices with the folders Suppliers, Customers, Statements and Archive, Suppliers chosen, the address acme-invoices/Suppliers and a New folder button
Browse… shows the folders of the connection, here an S3 bucket.

Subfolders and file names from the email

Open More options on the step to build the path in the cloud from fields, such as the date, the sender or the subject. Click Fields… next to a box to pick one.

  • Subfolders: folders inside the destination. {DATE[yyyy]}/{DATE[MM]} files each invoice under its year and month, such as Suppliers/2026/04. Folders that aren’t there yet are made. Left empty, files go straight into the destination.
  • File name: left empty, the file keeps the name it was saved with. {FROM}_{FILENAME}{EXT} puts the sender in front of the attachment’s name.

Characters a service doesn’t accept are replaced, and a name that is too long is shortened.

The Upload to cloud step in the Rule Editor of a rule named Supplier invoices: Cloud connection Invoices archive, Destination acme-invoices › Suppliers, Run For each saved file, Subfolders {DATE[yyyy]}/{DATE[MM]}, File name {FROM}_{FILENAME}{EXT}, If the name is taken Keep both (add a number), and the Test upload and Diagnostics buttons
The Upload to cloud step: an S3 bucket, a folder for each year and month, and the sender in each file name.

When a file with the same name is already there

If the name is taken decides what happens:

  • Keep both (add a number), the default: the new file gets a number added to its name. Nothing is overwritten.
  • Replace it (new version): the new file takes the place of the old one.
  • Skip the upload: the file already there stays, and the step counts as done.
  • Fail the step: the step fails, and the Downloads tab shows it.

More options worth knowing

  • Keep no local copy: tick Delete the saved file after the upload.
  • Email details as SharePoint columns: for SharePoint and OneDrive, tick Add the email’s details as columns and choose them with Details…, such as the sender and the subject. They show in the library’s views and search.
  • Steps after the upload: steps inside Upload to cloud can use {CLOUD_URL}, {CLOUD_PATH} and {CLOUD_FILENAME}, such as a link to the file.
  • When an upload fails: a busy or offline service is tried again a few times. Diagnostics… shows what went wrong.
  • Nothing uploaded twice: each account’s History remembers the emails it has handled, so the next run doesn’t upload the same email again.

Before you turn the rule on, click Test this rule… to see which emails it picks.

What leaves your computer

  • Only what the step uploads: the files the rule saved (and, for SharePoint and OneDrive, the email details you chose as columns) go straight from your own system to the service you picked. There is no Gearmage cloud in between.
  • Secrets stay encrypted: access keys, passwords, private keys and sign-in tokens are kept encrypted on this computer, never in the settings or the logs. Diagnostics keep times, results and errors, never passwords or tokens.

Upload around the clock as a Windows service

Uploads run whenever the rule runs: on the program’s schedule, or as soon as new email arrives. To run 24×7, even when nobody is signed in, install the Windows service with PRO Rules Server: Schedule › Service schedule › Install service. Two things to know:

  • Reinstall after a change: the service uses the connections it copied when it was installed. After adding or changing a connection, or signing in again, click Reinstall… so the service gets the change.
  • Network shares: the service runs as Local System, which can’t open most shares. Add the share as a Network share (with its own sign-in) connection with a user that may write to it.
The New Network share connection window: why a share needs its own sign-in when the service runs as Local System, the Share box (\\server\share or \\server\share\folder), user name OFFICE\uploader, password and the connection name Finance NetworkShare
A network share with its own sign-in, for a service that runs as Local System.

More on the service: save Outlook attachments to a network folder automatically.

The other way round: watch a cloud folder

PRO Rules Client can also watch a SharePoint library, OneDrive, an S3 or S3-compatible bucket, or a network share, and send each new file through your rules. The other services can be uploaded to, but not watched yet. See watch SharePoint, OneDrive and S3.

Try it: download Mail Attachment Downloader and start with the free edition, or compare the PRO editions, each with a 30-day money-back guarantee.

Related

Questions about this post? Contact us.