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 to webhook: send email data and attachments to an API or Zapier automatically

Email to webhook, automatically: Mail Attachment Downloader sends invoice data, fields and attachments from email to any API or a Zapier Zap.

To send email to a webhook, let a rule pick the emails and add a Web hook step to it. Mail Attachment Downloader then calls your web address for each email or saved file, with a body built from the email’s fields and the values it found, and the attachments too if you want them. For Zapier there is a ready-made Send to Zapier step that starts a Zap the same way.

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

What can you do with email to webhook?

Anything a system does when it is called. Some common ones:

  • Post invoice data to an accounting API: the invoice number, due date and total from Acme’s PDF go to your accounting system as a new bill, with the PDF attached.
  • Start a Zap: Zapier adds a row to a Google Sheet, creates a task in your task app or posts to a channel for each order email.
  • Open a ticket: a support or service desk system gets the sender, subject and text of each email to a shared mailbox.
  • Hand a file to another program: an internal service that reads, checks or stores documents.

What you need

  • The edition: Web hook, Send to Zapier, Run a script and Run a command line are steps of PRO Rules Server.
  • 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 address: the web address (endpoint) to call, and its key or token if it needs one.

How to send email data to an API with the Web hook step

1. Make a rule and find the values

On the PRO Rules tab, click New rule…. Under Which emails, add a condition such as the sender’s domain acme.example, and under Save, save the attachments. New to rules? Save emails and attachments to folders walks through a first one.

The email’s own details are fields already: {FROM}, {SUBJECT}, {DATE} and many more (see fields). Values inside the attachment, such as the invoice number or the total, come from Find fields in the file (patterns), Find fields with AI or the Parser. Put the web hook after or inside that step, so it can use them.

Rule Editor of Mail Attachment Downloader for the rule Scanned invoices: Find fields with AI fills INVOICE_NUMBER, DUE_DATE and TOTAL_INCLUDING_TAX, and the Web hook step inside it sends the values to an API
Find fields with AI reads the invoice; the Web hook step inside it sends the values on.

2. Add the Web hook step

Under Then, click Add a step…, choose Other systems and double-click Web hook. Select a step first to add the new one after it or inside it; Add it says where.

Add a step window in Mail Attachment Downloader with Other systems chosen: Upload to cloud, Send to document management, Send for signature, Send to Zapier and Web hook, the step that sends email data to an API
Add a step › Other systems › Web hook.

3. Set the address, method and body

  • Address: the web address to call, such as https://erp.contoso.com/api/bills. Fields work here too; their values are URL-encoded, so ?invoice={INVOICE_NUMBER} is safe.
  • Method: POST (the default), PUT, PATCH, GET or DELETE.
  • Content type: application/json by default; XML, plain text, a form and others are in the list.
  • Body: what is sent, with fields in it. Click Fields… to pick one.

A body for Acme’s invoice could be:

{
  "invoice": "{INVOICE_NUMBER}",
  "supplier": "{EMAIL_FROM}",
  "due": "{DUE_DATE}",
  "total": "{TOTAL_INCLUDING_TAX}"
}

Each value is escaped for where it goes, so a value with quotes or a line break can’t break the JSON. Run decides how often it is called: For each saved file (the default) or Once per email.

Mail Attachment Downloader's Web hook step on the rule Acme invoices: POST to https://erp.contoso.com/api/bills as JSON with the invoice number, supplier, due date and total from the email's fields, the saved file sent along, the answer kept in {BILL}, an Authorization header, a 30-second timeout and 3 retries
The Web hook step: send the email’s fields as JSON to any API, with the file, headers and retries.

4. Headers, files and retries

  • Send files: None: only the body, The file it runs for, or Every file the rule saved from the email so far. With files, the call is sent as a form: the body in a field named payload, and each file as a file.
  • Headers: under More options, Add a header adds one, such as Authorization with Bearer and your API key, or an API key header your service asks for.
  • Timeout (seconds) and Retries: 30 seconds and 3 retries by default. A call that gets no connection, no answer in time, or HTTP 408, 429 or a server error is tried again after 2, 4, 8… seconds. An answer like 400 or 401 isn’t, since the same call would get the same answer.

If it still fails, the step fails: the Downloads tab shows it, the steps under If something fails run, and the email’s History tries the step again later. History also keeps the address without its query, which can hold a key.

5. Test it

Click Test the web hook. It calls the address once with a sample email’s values and shows the answer. Then click Save, and Test this rule… to see which emails the rule picks; the test only describes the call, it doesn’t make it.

Keep fields from the API’s answer

The answer is kept in the field named in Save the answer in, such as {BILL}. Steps inside the web hook, and the steps after it, can use it. When the answer is JSON, a Fill a template (Handlebars) step picks out what you need: with {{id}} as its template, the bill’s ID from your accounting system becomes a field for a file name, a database row or a notification.

How do I send email to Zapier?

With Send to Zapier. It is the web hook step set up for a Zap that starts with Webhooks by Zapier, so there is no method or content type to choose.

  1. In Zapier, make a Zap with Webhooks by Zapier and the Catch Hook event, and copy its web address.
  2. In the rule, click Add a step… › Other systems › Send to Zapier.
  3. Paste the address into Zap’s address.
  4. Check Fields to send. It starts with the sender, subject, date, account and save path, plus the fields your rule finds. Add more with Fields….
  5. Click Send a sample to Zapier, then Test trigger in Zapier to see the fields.
Add a step window with the Send to Zapier step selected: starts a Zap with the email's fields (Webhooks by Zapier, Catch Hook)
Send to Zapier is in Add a step › Other systems.

It runs Once per email. Files go only if you choose them under More options; the step says what leaves the computer: the fields to send, and those files, to hooks.zapier.com.

Send to Zapier step in the Rule Editor for the rule Orders to Zapier: Zap's address https://hooks.zapier.com/hooks/catch/..., Fields to send with from, subject, date, account_email and save_path, Run Once per email, and Send a sample to Zapier
Send to Zapier: paste the Zap’s address and choose the fields to send.

In Zapier, add the actions that use the fields: Google Sheets’ “Create Spreadsheet Row” to log each Northwind order, or a task app’s create-task action with the subject as the task name. Same retries as the web hook, and the answer is kept the same way.

Run a script or a command line instead

When the work is on your own system rather than behind a web address, use Add a step… › Programs:

  • Run a script: a PowerShell script, a .bat or .cmd file, or a program, with the fields in its Arguments, and a Timeout (seconds).
  • Run a command line: a program or a .bat file, with arguments such as --supplier "{SUPPLIER}" --file "{SAVE_PATH}\{FILENAMEEXT}".

Click Run it once (test) to try it with a sample email’s values. Both are PRO Rules Server steps. More in email actions: run a script.

Run a command line step in the Rule Editor for the rule Supplier invoices: Command C:\Tools\ArchiveInvoice.exe, Arguments with the SUPPLIER, SAVE_PATH and FILENAMEEXT fields, Run For each saved file, and Run it once (test)
Run a command line: a program gets the fields as arguments.

Questions people ask

Can I send email attachments to a webhook?

Yes. Set Send files to The file it runs for or Every file the rule saved from the email so far. They are sent as a form upload with the body.

Does it work with Make, n8n or Power Automate?

Any service that gives you a web address to call works with the Web hook step. Send to Zapier is only a shortcut for Zapier.

Will the same email be sent twice?

No. Each account’s History remembers the emails it has handled, so the next run doesn’t call the address for them again.

Does the program have to be running?

Yes, or run it as the Windows service of PRO Rules Server, which works 24×7, even when nobody is signed 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 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.

Save email data to Excel or Google Sheets: one row per email or invoice line

Save email data to Excel or Google Sheets automatically: one row per email or invoice line, read from emails and attachments, never added twice.

To save email data to Excel or Google Sheets, a program has to read the values out of each email and add them as a row. Mail Attachment Downloader does both: its Parser reads the invoice number, the supplier, the total or any other value from the email and its attachments, and adds one row per email, or one per invoice line, to an Excel workbook or a Google Sheet. Process the same email again and its row is replaced, never added twice.

The examples use Contoso’s mailbox finance@contoso.com, the workbook \\fileserver\Finance\Invoices.xlsx, and invoices from Acme, Northwind and Fabrikam, such as INV-2026-0412.

Three ways to get email attachments into a spreadsheet

  • The Parser’s outputs: the easiest. You show the Parser which values to read, then turn on Excel workbook or Google Sheets. The lines of an invoice table can get a tab of their own.
  • The rule step Add a row to a spreadsheet: a row for each email a PRO rule picks, with any fields the rule has: the sender, the subject, the date, or values its steps found.
  • Save metadata: a CSV file of the email’s details for each saved file, which Excel opens. The simplest log.

What you need

Parse email to Excel with the Parser

  1. On the Parser tab, click New parser and add a few sample emails, such as one invoice each from Acme, Northwind and Fabrikam.
  2. In the Fields step, mark the values: highlight the invoice number in a sample, or describe it in plain words and let the AI find it. See Extract data from email with AI.
  3. In the Output step, choose One record for each: email, or attachment named (such as order_*.pdf) for a row per attachment.
  4. Turn on Excel workbook. Enter the Workbook (.xlsx), such as \\fileserver\Finance\Invoices.xlsx, and the Sheet (empty: the parser’s name).
  5. Under Columns, give each column a Heading and a Value (fields in braces), such as “Invoice number” and {INVOICE_NUMBER}. Fields… picks one, and Every field, as at first puts back one column per field.

The CSV file, the Excel workbook and the Google Sheet share one Columns list, so they hold the same columns. The preview on the right shows the row of the sample you’re on.

Parse email to Excel or CSV: the Output step of the Parser for Supplier invoices, one record for each email, the Columns list Invoice number, Invoice date, PO number, Due date, Total and Supplier with fields in braces, a CSV preview of sample INV-2026-0412, and Run it again and nothing doubles
The Output step: one Columns list for the CSV file, the Excel workbook and the Google Sheet.

Before you turn it on, click Test on the card, then Try the write on a temporary copy: it writes into a copy of the workbook, shows it, and deletes the copy. Your workbook is only read.

The Parser's Output step for Supplier invoices: the Excel workbook card on, writing to \\fileserver\Finance\Invoices.xlsx with four columns and the table lines on their own tab, and the Google Sheets card on with the Finance Google Drive connection, with a preview of each row on the right
The Parser’s Output step: the same row to an Excel workbook and a Google Sheet, and the invoice lines on a tab of their own.

Save email to Google Sheets

Google Sheets is reached through a Google Drive connection you make once with your own Google Cloud app:

  1. In the Google Cloud project of that app, enable the Google Sheets API as well as the Google Drive API.
  2. Add the connection in Settings › Sources › Cloud Connections. Save email attachments to SharePoint, OneDrive, S3 or Google Drive shows how.
  3. In the Google Sheet, add the tab the rows go to.
  4. In the Parser’s Output step, turn on Google Sheets, pick the Google connection, paste the Address of the Google Sheet from the browser, and enter the Tab.

The values leave your computer for Google, so the Parser asks first and names where they go. Its Test, Write one test row…, writes to a tab called PARSER TEST, shows it and removes it again. Values go in as plain values: a text that starts with = is never run as a formula.

One row per invoice line

Many invoices are a table of lines. When the parser reads a table, the Excel workbook and Google Sheets cards offer Also write the table lines. The lines go to a tab of their own, one row per line, the email’s key first, so a lookup joins them to the email’s row. Under Repeat on each line, choose The email’s key only, Every field the parser reads (the supplier and the invoice number on each line, ready for a pivot table), or Choose fields….

Email invoice lines to a spreadsheet: the Parser's table lines with columns description, qty, unit and amount read from INV-2026-0412.txt, adding up to the subtotal 416.50, written as one row for each line
A table of invoice lines: written as one row for each line.

Run it again and nothing doubles

Each row starts with the email’s key (its account and message), kept in the first column. When the same email is processed again, after you correct a value in Needs you or with Process again…, its row is replaced, and its invoice lines are replaced where they were. Other emails’ rows are not touched.

A value is a number only when it is plain digits, so an invoice number like 00123 keeps its zeros.

Add a row to a spreadsheet in a PRO Rule

With PRO Rules Client or PRO Rules Server, any rule can add a row:

  1. On the PRO Rules tab, click New rule… or Edit, and set Which emails, such as the sender’s domain acme.example.
  2. Under Then, click Add a step…, open Data and fields and double-click Add a row to a spreadsheet.
  3. In Where the rows go, choose An Excel workbook (.xlsx) or A Google Sheet.
  4. Enter the Workbook file, or address of the Google Sheet, and the Sheet or tab (Parsed to begin with). A Google Sheet also needs its Google connection.
  5. Under Columns, click Add a column for each one: a heading and a value such as {FROM}, {SUBJECT}, {DATE} or {TOTAL}.

The step adds one row for each email, after the email is processed. For values from inside the attachments, put Find fields with AI or Find fields in the file before it.

Email attachments to spreadsheet: the Add a step window with Data and fields chosen, showing Find fields in the file, Find fields with AI, Look up from a database, Save to a database, Store CSV / SQL, Save metadata, Fill a template, Run an AI prompt and Add a row to a spreadsheet
Add a step › Data and fields › Add a row to a spreadsheet.
Mail Attachment Downloader's Add a row to a spreadsheet step: rows go to the Excel workbook \\fileserver\Finance\Invoices.xlsx, sheet Invoices, with the columns From, Subject, Received and Total from the email's fields, once per email
Add a row to a spreadsheet: one row per email, replaced if the same email comes again.

The simplest log: Save metadata to a CSV file

If you only need who sent what and when, the Save metadata step adds a line for each saved file to a CSV file, with the email’s details: the file’s name, the sender, the recipients, the subject and the date to begin with. Tick Add to the file when it is there (otherwise replace it) to keep one running log, and open it in Excel.

The Save metadata step in the Rule Editor for Supplier invoices: a CSV file in the save folder with the columns file name, original file name, from, to, CC, subject and date, Add to the file when it is there ticked, Run For each saved file
Save metadata: a CSV line for each saved file.

The other way round: Excel attachments into a database

Receive a daily sales report as an Excel or CSV attachment? With PRO Rules Server, the Store CSV / SQL step reads its rows and adds them to a database table. See Save CSV and Excel attachments to a database.

The Store CSV / SQL step for Fabrikam daily sales: data source Contoso Finance, table dbo.SalesLines, an INSERT statement, and the columns Description, Price and Quantity read from the sheet Daily sales of an .xlsx sample file
Store CSV / SQL: the rows of an Excel attachment into a table.

Questions people ask

Can I save each email to Google Sheets automatically?

Yes. Each email the parser or rule picks adds a row as it is downloaded, on the program’s schedule or as soon as new email arrives.

Does Excel have to be installed?

No. The program writes the .xlsx file itself. Keep the workbook closed in Excel while downloads run: a workbook that is open can’t be replaced, and the step fails until it is closed.

Can I get one row per attachment instead of per email?

Yes, in the Parser: set One record for each to attachment named, such as order_*.pdf.

What leaves my computer?

Nothing for an Excel workbook or a CSV file. For a Google Sheet, the values in the row go to Google, through your own Google app.

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.

Email to Slack notifications: Teams, Telegram and more when attachments arrive

Email to Slack notifications: post new attachments, run summaries and error alerts to Slack, Teams, Telegram, Discord, ntfy or email automatically.

Want a Slack message when an invoice email arrives, or a Teams alert when a download goes wrong? Mail Attachment Downloader posts it for you. Set up a channel once, then a rule’s Send notification step posts the sender, subject and saved files of the emails it picks, and a run summary says what each download did. It works the same for Microsoft Teams, Telegram, Discord, Google Chat, ntfy, Pushover, your own webhook and email.

The examples use Contoso’s mailbox finance@contoso.com, invoices from Acme and Northwind, and the channels Finance team (Slack) and Operations (Teams).

Which apps can get email notifications?

Nine kinds of channel, each set up once and shared by rules, run summaries and alerts:

  • Slack: an incoming webhook of a channel.
  • Microsoft Teams: a Workflows webhook of a channel.
  • Discord: a channel webhook. It can carry the files, up to 10 MB each.
  • Google Chat: a webhook of a space.
  • Telegram: your own bot, in a chat, group or channel. Files up to 50 MB.
  • ntfy: a topic on ntfy.sh or your own ntfy server, for push messages to your phone. Files up to 15 MB.
  • Pushover: push messages to your phone.
  • Custom webhook: JSON posted to any address, with an optional Authorization header.
  • Email: an HTML message from one of your own accounts, attachments up to 18 MB together.

Slack, Teams, Google Chat and Pushover get the files’ names instead of the files. There is no SMS, WhatsApp or PagerDuty channel; ntfy and Pushover reach a phone.

What you need

Step 1: Set up a Slack, Teams or Telegram channel

Open Settings › Sources › Notification Channels and click Manage… (or Settings › Run summary › Configure Channels…). In the Notifications window:

  1. Click Add, give the channel a Name, such as “Finance team (Slack)”, and pick its Type.
  2. Paste what the service gives you (see below). Where do I find this? opens the service’s own guide.
  3. Click Send test message. When it arrives, click OK.

A webhook address or token is a secret: it is kept encrypted on this computer and never shown again.

The Notifications window of Mail Attachment Downloader with nine notification channels, Slack, Microsoft Teams, Telegram, Discord, Google Chat, ntfy, Pushover, Custom webhook and Email, all Ready; Finance team (Slack) chosen with its saved Webhook URL, Max per run 50 and Send test message
The Notifications window: nine channels, each set up once. Here the Slack channel Finance team.

Slack, Discord and Google Chat: a webhook URL

Make an incoming webhook for the channel or space and paste it as the Webhook URL.

Microsoft Teams: a Workflows webhook

In Teams, open the channel’s … menu, choose Workflows and the template “Post to a channel when a webhook request is received”. Paste the address it gives as the Webhook URL. The old Office 365 connector webhooks stopped working in May 2026, so use Workflows.

Microsoft Teams notification channel in Mail Attachment Downloader: the channel Operations (Teams) of type Microsoft Teams with a saved Webhook URL, Where do I find this? and Send test message
A Teams channel takes the address of a Workflows webhook.

Telegram: a bot token and a chat ID

Create a bot with @BotFather in Telegram and paste its Bot token. Add the bot to the chat, then enter the Chat ID: a number such as -1001234567890 for a group or channel, or @channelname for a public channel.

Telegram email alerts in Mail Attachment Downloader: the channel On-call (Telegram) with a saved Bot token, a Chat ID and Max per run 50
Telegram: your bot’s token and the chat it posts to.

ntfy and Pushover: alerts on your phone

For ntfy, enter the Topic URL, such as https://ntfy.sh/ followed by a topic that is hard to guess (anyone who knows the topic can read it), and an Access token if the topic needs a sign-in. For Pushover, the App token and your User key (or a group key).

Email and your own webhook

An Email channel sends from one of your accounts that can send mail (SMTP, Exchange or Microsoft 365), picked in Send from, to the addresses in To, separated by commas. Don’t send it to a mailbox your rules download from. A Custom webhook gets a POST with a JSON document: source, kind, level, title, text, files, and the totals for run summaries.

Email notification channel Finance mailbox (email): Send from ap@acme.example, one of the accounts that can send mail (SMTP, Exchange or Microsoft 365), To finance@acme.example
An Email channel sends from one of your own accounts.

Step 2: A Slack or Teams notification for each new email attachment

With PRO Rules Server, a rule can post a message for the emails it picks. New to rules? Save emails and attachments to folders walks through a first one.

  1. On the PRO Rules tab, click New rule…, or pick a rule such as “Supplier invoices” and click Edit.
  2. Under Which emails, add the conditions, for example the sender’s domain acme.example and “.pdf” in the attachment name.
  3. Under Then, click Add a step…, open Notify and double-click Send notification.
The Add a step window of the Rule Editor with Notify chosen: Send notification, which tells you in Teams, in Slack, by email or through a web hook
Add a step › Notify › Send notification.

Then set up the step:

  • Channel: the channel, such as Finance team (Slack). Channels… adds one.
  • Title and Message: the subject and the sender, account and time to begin with. Click Fields… to add others, such as {FROM}, {SUBJECT} or an invoice number your rule found.
  • Attach: No files, The file it runs for, or Every file the rule saved from the email so far. The step says whether the channel gets the files or only their names.
  • Run: Once per email, For each saved file, or Both.

Click Send a test to post one with sample values, then Save. Test this rule… only describes the step: it sends nothing.

Mail Attachment Downloader's Send notification step on the rule Supplier invoices: the channel Finance team (Slack), the title New invoice from {FROM}, the subject and saved file name in the message, the file attached, for each saved file
The Send notification step: a message to Slack, Teams or another channel each time a rule saves a file.

A busy rule can’t flood a channel. The same email isn’t posted twice in one run, and each channel takes at most Max per run messages from rules in one download (50 to begin with; 0 means no limit), then one message saying the rest weren’t sent. A failed post is tried up to three times, and a service that says “too many requests” gets the wait it asks for.

Run summaries: one message when a download ends

A run summary says what a download did: how many emails and files were saved, and what went wrong. Open Settings › Run summary:

  • Send a summary when a run ends: Never, Always, Files saved or problems, or Only problems.
  • Send it to: tick the channels, each Short (the totals and the problems) or Detailed. A detailed summary by email lists the emails of the run, their files and what was done to them.
  • For these accounts: untick an account that should send none.

Send sample posts a made-up summary to see how it looks. A download of several accounts sends one summary for all of them, after the last one.

Run summary settings in Mail Attachment Downloader: send a summary when a run ends Always, to Finance team (Slack) and Operations (Teams) Short and Finance mailbox (email) Detailed, for 2 of 3 accounts, with Configure Channels and Send sample
Run summaries: short ones to Slack and Teams, a detailed one by email.

Error alerts: hear only when something goes wrong

Two ways to hear only about problems:

  • A run summary set to Only problems: nothing on a quiet day, a message when an email, a folder or a step failed.
  • A Send notification step under If something fails: in the Rule Editor, add the step to the rule’s If something fails section, and it runs when a step of that rule fails, such as an upload or a database write.

A notification that can’t be posted doesn’t stop the rule. To treat it as a failure, tick Treat a failed notification as an error of the rule under the step’s More options.

Alerts when an expected email doesn’t arrive

Expected emails tells you what didn’t come: a rule learns when Acme’s invoices usually arrive and sends a notification when one is late. See Alert if email not received.

What is sent, and where?

Only the title, the message and the files you chose, straight from your own system to the service. There is no Gearmage cloud in between, and webhook addresses and tokens never go into the settings, a rule or a log.

Questions people ask

Can I get a Slack notification only for emails from one sender?

Yes. The rule’s conditions decide: a sender, a subject, an attachment name, an account or a folder.

Can Telegram or Discord receive the attachment itself?

Yes. Telegram takes files up to 50 MB, Discord up to 10 MB, ntfy up to 15 MB, and an Email channel up to 18 MB together. A larger file is named instead.

Does it work when nobody is signed in to Windows?

Yes, with the Windows service of PRO Rules Server. The service sends notifications and run summaries too. After adding or changing a channel, reinstall the service so it gets the change.

Can the Parser post the values it reads?

Yes. The Parser’s Tell me output posts the values of each email, such as an invoice number and a total, to a channel. It needs PRO Rules Server.

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.

Download attachments from a shared mailbox in Microsoft 365 automatically

Download attachments from a shared mailbox in Microsoft 365 or Exchange automatically, to a network folder or SharePoint. No Outlook, no extra password.

To download attachments from a shared mailbox automatically, add the shared mailbox’s address in Mail Attachment Downloader, pick Microsoft 365, tick This is a shared mailbox and sign in as yourself, with a work account that has access to it. From then on the attachments are saved to a folder, a network share or SharePoint on your schedule, without Outlook.

The examples use Contoso’s shared mailboxes invoices@contoso.com and ap@contoso.com, the user you@contoso.com and the share \\fileserver\Finance.

What you need

  • The edition: shared mailboxes need a PRO edition, from PRO Backup up. Rules that send each kind of attachment to its own folder, and uploads to SharePoint, need PRO Rules Client or PRO Rules Server.
  • Access to the mailbox: your work account needs Full Access to the shared mailbox, which your Microsoft 365 administrator gives in the Exchange admin center. If you can open it in Outlook, you have it.
  • Windows: Windows 10 or later, 64-bit, on a PC, a server or a cloud VM. No Outlook needed.

How to save shared mailbox attachments automatically

1. Add the shared mailbox as an account

Click Add account and type the shared mailbox’s address, such as invoices@contoso.com, in Email address. The program picks the Microsoft 365 tile from the address, and the Server tab says it Connects with Microsoft Graph, the way Microsoft recommends.

2. Tick “This is a shared mailbox”

On the Server tab, tick This is a shared mailbox. The sign-in then asks Microsoft for access to shared mailboxes too, and lets you sign in as a different user than the mailbox’s address.

Download attachments from a shared mailbox: the Mail account and server configuration window of Mail Attachment Downloader with the Microsoft 365 tile, sign-in in the browser, Connects with Microsoft Graph, and This is a shared mailbox ticked
The Microsoft 365 tile with This is a shared mailbox ticked.

3. Sign in with your own account in the browser

Click Test Connection. Microsoft’s sign-in page opens in your browser. Sign in as yourself (you@contoso.com), not as the shared mailbox: a shared mailbox has no password of its own. Allow access, come back and click Continue, then Save. No password is stored; the program keeps a sign-in token, encrypted on your system.

Signed in to the browser with another account? Tick Private window. What the app asks for lists each permission in plain words.

Microsoft 365 sign-in for a shared mailbox in Mail Attachment Downloader: the Sign in to Microsoft 365 window waiting for the browser, with Use my default browser, Private window, the permissions it asks for (read and manage mail, send email, stay signed in) and Copy for IT
The sign-in happens on Microsoft’s own page; this window says what the app asks for.

4. Choose what to save and where

Next to Save location, type a network folder such as \\fileserver\Finance\Invoices, or click Browse…. Use the UNC path, not a mapped drive letter. The folder pane searches the Inbox; Choose other folders… adds others. The Account rule tab’s pages decide which emails and files to keep, such as only PDFs. Click Connect and Download, then set a schedule on the Schedule tab.

Each account has its own History, so the next run takes only new emails, and nothing is saved twice. See save Outlook attachments to a network folder for folders, file names and the service.

What permissions must IT grant?

Two things, and many organizations need both:

  • Full Access to the shared mailbox: for the user who signs in, given in the Exchange admin center.
  • Approval of the app: where users may not let apps in themselves. With This is a shared mailbox ticked, the app asks Microsoft Graph for Mail.ReadWrite and Mail.Send, Mail.ReadWrite.Shared (“Read and manage mail in shared mailboxes”), Mail.Send.Shared (“Send email from shared mailboxes”) and offline_access, so downloads keep running without signing in again. Sending is asked for so rules and email notifications can send from the mailbox.

Blocked by your organization? Copy for IT in the sign-in window copies the list to send your administrator. After a test, the account window’s Permissions tab shows what was Requested and what was Granted.

The Microsoft 365 account window for the shared mailbox invoices@contoso.com on the Permissions tab after Test Connection: Granted lists the Microsoft Graph permissions Mail.ReadWrite, Mail.ReadWrite.Shared, Mail.Send, Mail.Send.Shared and offline_access, and Connected to Microsoft 365
The Permissions tab shows what Microsoft granted, including the two permissions shared mailboxes need.

Use your organization’s own app registration

For a server that runs unattended, IT may prefer an app of its own to a user’s sign-in. In the account window, pick App registration as the sign-in and fill in the App registration tab: Client ID, Client secret and Tenant ID. With all three, the program signs in as your organization’s own app, with no sign-in page and no user account.

What IT sets up in Microsoft Entra ID:

  1. Register an app and make a client secret.
  2. Add the Microsoft Graph application permission Mail.ReadWrite (and Mail.Send if rules send email), and grant admin consent.
  3. Limit the app to the mailboxes it needs with RBAC for Applications in Exchange Online. Without it, the app can read every mailbox in the organization.

Configuration help on the tab opens the guide. App registrations are in the PRO editions.

Microsoft 365 shared mailbox with an app registration in Mail Attachment Downloader: the App registration tab with Client ID, a kept Client secret and Tenant ID, the hint Signs in as your organization's own app, with no sign-in page, and Configuration help
Your organization’s own app: client ID, secret and tenant ID, and no sign-in page.

Several shared mailboxes in one run

Add each shared mailbox as its own account, the same way. Then pick <multiple@multiple> in the Account box, click Choose accounts…, tick the mailboxes and click Validate and use selected. They are downloaded one after the other, each with its own settings. PRO Backup runs up to 3 accounts together, PRO Parser up to 5, and the PRO Rules editions any number.

Save attachments from several shared mailboxes in one run: the Select accounts window of Mail Attachment Downloader with two of three mailboxes ticked and Validate and use selected
Tick the mailboxes to download in one run.

With PRO Rules, one rule can serve every mailbox and file each one apart: a save folder such as \\fileserver\Finance\{ACCOUNT_EMAIL} gives each shared mailbox its own folder, and an Account condition makes a rule for one mailbox only.

Microsoft 365 shared mailbox attachments to SharePoint

A shared mailbox often belongs to a team whose files live in SharePoint. Add the Upload to cloud step to the rule, pick a SharePoint connection and a library folder, and each saved attachment goes there too, in subfolders named from the email if you like. See save email attachments to SharePoint, OneDrive or S3.

Around the clock, as a Windows service

With PRO Rules Server, the Windows service downloads the shared mailboxes 24×7, even when nobody is signed in: Schedule › Service schedule › Install service. The service runs as Local System, which can’t open most network shares, so run it as an account that may write to the share, or upload to a share with its own sign-in.

The New Network share connection window of Mail Attachment Downloader: why a share needs its own sign-in when the service runs as Local System, the Share box, a user name and password, and the connection name
A network share with its own sign-in, for the Windows service.

Exchange on your own server

For Exchange on your own network, pick the Exchange tile (Exchange Web Services). Shared mailboxes you have Full Access to show in the folder list next to your own Inbox, and Add all Inboxes under the folder pane’s Options… ticks the Inbox of each. For Microsoft 365, use the Microsoft 365 tile: Microsoft is switching EWS off for Exchange Online.

Questions people ask

Do I need the shared mailbox’s password?

No. A shared mailbox has no sign-in of its own. You sign in as a user with access, or IT uses an app registration.

Does it need Outlook?

No. It talks to Microsoft 365 directly through Microsoft Graph. Outlook doesn’t have to be installed or open.

Can it save the emails too, not just the attachments?

Yes. On the Account rule tab, What to save can be the email and its attachments, or the email only. To keep a searchable copy of the whole mailbox, see back up Microsoft 365 email.

Why does the sign-in say my administrator must approve the app?

Your organization lets only approved apps read mail. Click Copy for IT and send the list to your administrator.

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.

Create email rules with AI: describe what you want, test it, save it

Create email rules with AI: say in plain words which emails to save and what to do, and Mail Attachment Downloader writes the rule for you to test.

To create email rules with AI, open the AI Assistant tab in Mail Attachment Downloader and say in plain words which emails to pick and what to do with them. The AI writes the PRO rule, with its conditions, save folder and steps, and shows it as a tree you can read. You test it on your own emails and save it.

The examples use Contoso’s mailbox finance@contoso.com and invoices from Acme and Fabrikam.

What can the AI Assistant write?

Everything a rule in the Rule Editor has:

  • Which emails: the sender, words in the subject or body, attachment names, dates, the account or mailbox folder.
  • Save: the attachments, the email, or both, and the folder, such as D:\Finance\Invoices.
  • Then: the steps after saving, in order: convert to PDF, upload to SharePoint, send a notification to Slack or Teams, move the email to a folder, and more.
  • If something fails: what to do when a step goes wrong.

Some things people ask for:

  • “Save the PDF invoices from acme.example into D:\Finance\Invoices and tell the finance team on Slack.”
  • “Put statements from Fabrikam in a folder for each year and month, and move the email to Processed.”
  • “Upload signed contracts to the Finance SharePoint, only from the last 3 months.”

What you need

  • The edition: anyone can try the AI Assistant, with the free edition too. There, Apply to my filters… puts what Free can do into the account’s own settings. To save the result as a PRO rule you need PRO Rules Client or PRO Rules Server. The preview marks a step that needs more, such as “Needs PRO Server”.
  • An AI: the built-in AI model (a one-time download of about 2 GB), your own AI server, or a cloud AI with your own account. More on that below.
  • An email account: Gmail, Microsoft 365, Exchange or any IMAP mailbox, so the rule can be tested on real emails.

How to create an email rule with AI

1. Set up the AI once

Click the AI Assistant (beta) tab, the first tab under the Account box. Click Download to get the built-in model, or Use my own AI… for your own server or a cloud AI. The line at the top says which AI answers, such as “AI: Built-in AI model, on this computer”.

2. Describe the rule

Type what you want under Your message and click Send. Write it the way you would tell a colleague. If the AI needs something only you know, such as who to notify or which mailbox folder, it asks, with the channels and folders you have set up as buttons to pick from.

3. Check the rule it wrote

The rule appears on the right as a tree: Which emails, Fields to find, Save, Then and If something fails, the same outline the Rule Editor shows. The AI also says in one sentence what the rule does. Prefer words? Show as text.

Create email rules with AI in the AI Assistant tab of Mail Attachment Downloader: the request to save the PDF invoices from acme.example into D:\Finance\Invoices and tell the finance team on Slack, and the rule Supplier invoices with From acme.example, Attachment name pdf, Save the attachments, Then Convert documents and Send notification
One sentence in, one rule out: conditions, save folder and steps, ready to test.

Not quite right? Say what to change: “only the last 3 months”, “also save the email”. Each change is a new version, and the arrows next to the version go back to an earlier one.

4. Test it on your emails

Click Test it…. The rule runs on emails you pick, without saving or changing anything. Under Test results you see which emails it matched. Where a result is wrong, change the tick in Should match and click Fix from my ticks: the AI changes the rule so it picks the right ones.

Mail Attachment Downloader's AI Assistant with the built-in AI on this computer: the request to save supplier PDF invoices to \\fileserver\Finance\Invoices and mark them read, the rule it wrote, and Test results: 4 of 5 emails match, with Should match ticks and Fix from my ticks
Test it shows which emails the rule picks; tick the ones it should, and Fix from my ticks asks the AI to correct the rule.

5. Save the rule

Click Open in Rule Editor (advanced), check the rule’s name and click Save. It is now on the PRO Rules tab and runs with each download. Later changes in the AI Assistant go over it with Save changes (you see what changes first), or into a copy with Save as a new rule….

If the rule changes emails on the mail server, such as moving or deleting them, the AI Assistant asks you to review it in the Rule Editor before it is saved.

Change a saved rule with AI

A saved rule can be changed in words too. In the Rule Editor, click Edit using AI. The AI pane opens beside the rule: describe the change, such as “Also save the invoices from Fabrikam”, and the AI makes it. What it changed is highlighted in the rule and listed under the conversation, and Undo puts the rule back as it was.

Edit using AI in the Rule Editor of Mail Attachment Downloader: the AI pane beside the rule Supplier invoices, the request Also save the invoices from Fabrikam, the new condition From fabrikam.example highlighted, and the Undo button
Edit using AI: the AI adds the condition, highlights it, and Undo takes it back.

Other ways in: on the PRO Rules tab, pick a rule and choose Edit using AI (or tick Always edit using AI); the arrow next to New rule… has Create using AI…; and the AI Assistant tab’s Open a rule carries on the conversation about a rule where it was.

AI email automation inside your rules

The AI can also do work in the rule itself, as a step. Find fields with AI reads values such as the invoice number, due date and total out of each saved file, for the steps after it (PRO Rules Client). Run an AI prompt runs your own prompt on each email and saves the answer (PRO Rules Server). See extract data from emails and attachments.

AI email automation in a PRO rule: the Rule Editor with the rule Scanned invoices, Make PDFs searchable (OCR), then Find fields with AI reading INVOICE_NUMBER, DUE_DATE and TOTAL_INCLUDING_TAX with the built-in AI model, then Save to a database, Web hook, Upload to cloud and Send notification
A rule with an AI step: the fields it finds go to a database, a web hook and SharePoint.

Built-in AI or your own provider?

You choose which AI writes your rules, in the AI Assistant tab’s AI settings…:

  • The built-in AI model: runs on your own system with limited rights, after a one-time download. Nothing you type or test is sent anywhere, and it costs nothing.
  • Your own AI server: Ollama, LM Studio or another OpenAI-style server, on your network or elsewhere.
  • A cloud AI service with your own account: OpenAI, Anthropic Claude, Google Gemini or Microsoft Azure OpenAI, with your own key. You pay the service for what you use.

Keys are kept encrypted on your system, one for each provider. They are also in Settings › Sources › AI Providers, where Test provider checks a key and Make this the default AI picks the AI the rules’ AI steps use.

Use your own AI provider for email automation: the AI provider OpenAI window in Mail Attachment Downloader with a Key box, An API key from the OpenAI platform, not a ChatGPT subscription, the Default model, Make this the default AI and Test provider
Your own OpenAI key: the window says where the text goes and whose terms apply.

Cloud AI is never used without asking

Nothing goes to a cloud service until you pick it and say yes to a question that names the service and says what is sent. It asks again if you change the service or its address, and the built-in model is always the way back. What goes:

  • Always: what you type, and the names the AI needs to write the rule: your accounts’ addresses, mailbox folder names, cloud connection and notification channel names.
  • Only if you allow it: the senders, subjects and attachment names of recent emails (Also send the senders, subjects and attachment names of recent emails, off for cloud services), and of the emails you test the rule on.
  • Never: the text of your emails or the files.

Questions people ask

Can I automate email with ChatGPT?

Yes, through OpenAI, the company behind ChatGPT. Pick OpenAI and enter an API key from the OpenAI platform (platform.openai.com). A ChatGPT subscription doesn’t include one. The same goes for Claude: an API key from the Anthropic Console.

Does the AI read my emails?

Not their text. The built-in model runs on your own system, so nothing leaves it. With a cloud AI, only what’s listed above goes, and only after you say yes.

What if the AI gets the rule wrong?

Nothing runs until you save it. Test it first, fix it with your ticks or a sentence, or go back a version. You can also open it in the Rule Editor and change it by hand.

Do I have to use the AI to make rules?

No. Every rule can be made and changed in the Rule Editor without AI. The AI Assistant is a faster way to start.

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.

Migrate Gmail to Microsoft 365, or any mailbox to another provider

Migrate Gmail to Microsoft 365, Outlook.com, Exchange or IMAP with folders, read state and labels: back up the old mailbox, then move it into the new one.

To migrate Gmail to Microsoft 365, back up the Gmail mailbox and then restore that backup into the Microsoft 365 account. Mail Attachment Downloader does both on your own system: the folders are made in the new mailbox, and read and unread, stars and Gmail’s labels (as Outlook categories) can come along. It works the other way too, and between Google Workspace, Microsoft 365, Outlook.com, Exchange and any IMAP mailbox.

What you need to move email from Gmail to Outlook or Microsoft 365

  • The edition: moving mail is part of PRO Backup and every edition above it. The free edition shows the Backup tab as a preview only.
  • Both accounts set up in the program: the old one, whose backup you move, and the new one, which takes the emails.
  • A new mailbox that takes mail back: IMAP (Gmail and Google Workspace too), Microsoft 365, Outlook.com or Exchange. A POP3 account can’t take mail in.
  • Windows 10 or later: on a PC, a server or a cloud VM. The emails go from the old mail server to your system and on to the new one, with no Gearmage cloud in between.

It moves email and its attachments. Calendars, contacts, rules and signatures aren’t included.

Step by step: transfer a mailbox to another provider

1. Add the old and the new account

Click Add account and type the email address. The provider is picked from it. Click Test Connection: Gmail, Google Workspace, Outlook.com and Microsoft 365 sign in through your browser, so no password is stored. Then click Save. Do this for both mailboxes.

The Mail account and server configuration window of Mail Attachment Downloader for ap@contoso.example: provider tiles Gmail and Workspace, Outlook.com, Microsoft 365, Yahoo, AOL, Exchange and Other, Microsoft 365 picked from the address, sign-in with a Microsoft account in the browser, Microsoft Graph, This is a shared mailbox ticked
Adding the new Microsoft 365 mailbox: the provider is picked from the address, and Test Connection signs in through your browser.

2. Keep the whole old mailbox in the backup

Open the Backup tab and use Change account to pick the old account. On the Configuration page, choose Its own and Hold everything for Forever, so no email ages out of the backup before it is moved.

The Backup tab's Configuration page in Mail Attachment Downloader for finance@contoso.com, a Microsoft 365 account: Its own, Hold everything for Forever, at most No limit, and a copy of the backup on Office NAS (\\nas\backups)
Configuration: Its own, Forever keeps each email of the old account until you have moved it.

A backup reads the account’s folders from its start date. To move all of it, click Folders and Backfill (Downloads): on the Downloads tab, Choose other folders… ticks the folders, and Backfill emails… brings in the older mail. What the backup covers then says “Full backup: every folder, all mail, backup copies held for ever.”

A backup run is the account’s Connect and Download. So it doesn’t also save attachments to a folder, choose Nothing: back up only under What to save on the Account rule tab.

3. Back up the old mailbox

Go to Run a backup and click Back up now. The first backup copies each email once, encrypted, as the mail server sent it. A big mailbox can take hours: stop it at any time, and the next run goes on where it stopped.

The Run a backup page of Mail Attachment Downloader: 18,431 emails received since 3/3/2019 in the backup (4.2 GB), last backup completed 1 h ago, runs every day at 7:00, the Back up now button and Folders and Backfill (Downloads)
Run a backup: how many emails the backup holds, and Back up now.

Still using the old account while you switch? Run Back up now again just before the move, so the latest emails come along.

4. Move the backup into the new account

Open the Restore page.

  1. Under Which emails, choose The whole backup, or Some folders.
  2. Under Into, choose Another account: and pick the new mailbox. Only accounts that can take emails back are listed.
  3. Check the Folders list: each folder of the backup goes into the folder on its right, made when missing. Inbox, Sent, Drafts, Trash, Junk and Archive are matched by what each mail server says they are. Change any of them, or choose Leave out.
  4. To keep the old mail apart, use Put everything under one folder: with a name such as Old Gmail. Choose Keep the folder structure under it, or put all the emails straight into that one folder.
  5. Under Keep, tick what comes along: read and unread and flags (stars), and Gmail’s labels or Outlook categories.
  6. Click Restore… and confirm.
The Restore page of Mail Attachment Downloader for the backup of finance@contoso.com: Some folders with INBOX/Invoices ticked, Into this account or Another account: ap@contoso.com, the Restore button, and the result: 2,412 emails restored, 489 still there, the folder Inbox/Invoices made again, 3 too large or damaged to restore
The Restore page: pick the folders, then Another account under Into to move them to a different mailbox.
Mail Attachment Downloader's Restore page for the Google Workspace backup of finance@contoso.com going into another account, finance@contoso.onmicrosoft.com on Microsoft 365: INBOX into Inbox, Sent Mail into Sent Items, Invoices made new, Spam left out, keeping read state, flags and Gmail's labels as Outlook categories
Moving a Gmail mailbox to Microsoft 365: each folder goes into the folder on its right, and labels become categories.

Nothing is deleted from the old account: a move is a copy. Emails already in the new mailbox are left alone, so none goes in twice. While the move runs, the new account doesn’t download.

5. Go on with a large move

Gmail takes about 500 MB of uploads a day, so a big move into Gmail or Google Workspace stops there and goes on the next day. If you stop a move, or the mail server refuses more emails, click Go on with the restore later. It starts after the last email put back in each folder.

When it ends, the page says how many emails went in, which folders were made, and which emails couldn’t go in and why, such as an email larger than the new mailbox takes.

Gmail labels vs Outlook folders: what comes along

  • Folders: made in the new mailbox when missing, with the names in the list.
  • Labels: in Gmail one email can have several labels, and each label shows up as a folder. The email goes into the new mailbox once, into the first of its folders in the list. Tick Gmail’s labels, as Outlook categories and its labels come along as categories. From Microsoft 365 into Gmail, Categories, as Gmail labels does the reverse.
  • Archived Gmail: emails only in All Mail, with no other label, come along too.
  • Stars: Gmail’s Starred and Important are not folders of their own: a star becomes a flag.
  • Read and unread: asked of the old account as the move starts, so keep it open until the move ends. If it can’t be asked, emails come in as read.
  • Dates: each email keeps the date it was received. Microsoft 365 takes each one as a message made from it, with the same sender, recipients, date, text and attachments; the backup keeps the original.

Other moves: Microsoft 365 to Gmail, IMAP to Microsoft 365

The steps are the same for any pair: Microsoft 365 to Google Workspace, Yahoo or a web host’s IMAP mailbox into Microsoft 365, or an on-premises Exchange server into Microsoft 365. Exchange connects through EWS, Microsoft 365 and Outlook.com through Microsoft Graph. See Move mail to another kind of account and Microsoft 365 and Exchange.

Old mail in files? Import brings a PST, MBOX or folder of .eml files into an account’s backup, and from there it moves like the rest. To keep a copy outside any mailbox, Export saves the backup as PST, MBOX, EML, MSG, PDF or ZIP: see Export emails to PST, MBOX, EML or PDF.

Questions people ask

Does migrating delete my emails from Gmail?

No. The move is a copy: nothing is deleted from the old account, and the backup keeps its copy too.

Are contacts and calendars moved?

No. Email and attachments only. Calendars, contacts, rules and signatures aren’t included.

How long does it take to move a mailbox to Microsoft 365?

The first backup of a big mailbox can take hours. Into Gmail, a move goes at about 500 MB a day. Both can be stopped and go on later.

Can I move just one folder?

Yes. Choose Some folders under Which emails and tick the folders, or choose emails Received between two dates.

Can I move Microsoft 365 email to Gmail?

Yes. Back up the Microsoft 365 account and move it into the Gmail account; categories can come along as Gmail labels.

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

Planning a move for a whole team? Contact us.

OCR email attachments: make scanned PDFs searchable automatically

OCR email attachments automatically: turn scanned PDFs and pictures into searchable PDFs or text, split scanned batches and read values from scans.

To OCR email attachments automatically, let Mail Attachment Downloader save them and run its Make PDFs searchable (OCR) step on each one. Scanned PDFs and pictures come out as searchable PDFs, plain text or a words file, on your own system, as the emails arrive. Its Split PDF step cuts a scanner’s batch into one PDF per document.

Scanned invoices, delivery notes and signed contracts often arrive as pictures of paper: you can’t search them or copy from them. The examples use Contoso’s mailbox finance@contoso.com and scanned invoices from Acme.

What you need

  • The edition: PRO Rules Server. OCR and Split PDF are steps in a PRO rule, and both need PRO Rules Server. The same edition runs the rules as a Windows service.
  • 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: A rule that saves the scanned attachments

On the PRO Rules tab, click New rule…. Under Which emails, click Add a condition and pick the emails with scans: the sender’s domain acme.example, the account your scanner sends to, or a mailbox folder. An attachment name condition of \.pdf$ keeps the rule to PDFs. Under Save, save the attachments to a folder such as D:\Finance\Scans.

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

Step 2: Add the “Make PDFs searchable (OCR)” step

Under Then, click Add a step…, choose Files and double-click Make PDFs searchable (OCR). It adds a text layer to scanned PDFs and pictures.

The Add a step window with Files chosen: Copy file, Convert documents, Make PDFs searchable (OCR), Merge PDFs, Convert all files to a single PDF, Split PDF and Unzip
Add a step › Files: the OCR step and Split PDF sit with the other PDF steps.

Then set it up:

  • File name: where the result goes, such as {SAVE_PATH}\{FILENAME}_ocr, next to the saved scan. Don’t add an extension: .pdf, .txt or .json is added as the step saves. The attachment you saved stays as it is.
  • Engine: which OCR engine reads the pages (see the next section).
  • Language: empty means English. Type language codes joined with +, such as eng+deu for English and German.
  • “Only read pages that have no text”: a PDF that mixes typed pages and scanned pages keeps its typed pages as they are, and only the scans are read.
  • “Straighten pages before reading”: a crooked page is turned level, and a page scanned sideways or upside down is turned upright before it is read.
  • Save as: what the step makes (see below).

Click Test on a file… to read a scan of your own with these settings, then Open the test results folder to see the result. Word, Excel and other files are turned into page pictures first, so the step reads them too.

The Make PDFs searchable (OCR) step in the Rule Editor: file name {SAVE_PATH}\{FILENAME}_ocr, engine Tesseract 5 on this computer, language empty for English, Only read pages that have no text and Straighten pages before reading ticked, Save as A searchable PDF, and the Test on a file button
OCR email attachments from Acme with Tesseract 5, on this computer, into a searchable PDF.

Which OCR engine should you use?

The Engine list says where each engine runs: on this computer, or in the service it sends the pages to.

  • Tesseract 5: free and on your own system. Usually the most accurate choice that sends nothing anywhere. English, German, French, Spanish, Italian, Dutch and Polish are included; other languages need their language data file (such as por.traineddata) in the folder that Open the language data folder opens.
  • Tesseract 3.05: the engine earlier versions used; steps saved before keep it.
  • Windows OCR: free and on your own system. It reads the languages installed in Windows.
  • Azure AI Document Intelligence: Microsoft’s Read model, in your own Azure resource. Add it once under Settings › Sources › OCR Providers with the resource’s Address and Key; Test reads a built-in sample page, so nothing of yours is sent. Then pick “Azure Read” as the engine and your connection as the Provider. The pages go to Microsoft as pictures, under your own Azure account and prices.
  • AI vision: an AI model that reads pictures, such as OpenAI, Claude, Gemini or your own AI server, reads each page. It gives the text without its exact place on the page; a searchable PDF still holds the text, spread down the page, so it can be found and copied.

Keys are kept encrypted on your own system, never in a rule. A test with a cloud engine asks before it sends a page.

Searchable PDF, text or words file?

Save as offers three results:

  • A searchable PDF: looks just like the scan, with the text under the picture. Windows search, SharePoint and document management systems can find it, and you can select and copy the text.
  • Plain text (.txt): the text of each page, for a search index, a script or a database.
  • The words with their positions (.json): each word with its place on the page, for a later step or your own program.

How do you split a scanned PDF into separate documents?

A scanner often sends a whole stack of paper as one PDF. Add Split PDF (Add a step… › Files) to cut it up.

  • Split by pages: tick One file per page, or Only some pages to copy a range, such as page 1 to 2, to a new PDF.
  • Split into the documents it holds: a new document starts where the pages say so. Each page is read for its page marker, such as “1 of 2”, and a document ID, such as the invoice number. Under A new document starts, choose On a page whose marker reads 1 (1 of 2) or When the document ID changes.

For the documents mode, show the program where the marker and the ID are with Open in the extraction wizard…: highlight the value on a page. Read scanned pages with picks the OCR engine for pages that have no text; it lists the engines on your own system, so for a cloud engine put an OCR step before Split PDF.

Under Check each document, the step can check that each document has the pages its marker says, and that its pages share one ID. When a check fails, choose Hold the PDF for review: nothing is saved, so a missing page is caught before anything is filed. Try it on a PDF… shows where each document starts, without saving anything.

In the documents mode, the steps you put under Split PDF run once for each document, so each invoice can be named, read and uploaded on its own.

The Split PDF step in the Rule Editor: Split by pages with One file per page ticked, Only some pages with From page and To page, the option Split into the documents it holds, and the file name {SAVE_PATH}\{FILENAME}_{ID}_split.pdf
Split PDF: one file per page, a range of pages, or one PDF per document in a scanned batch.
Mail Attachment Downloader's Split PDF step on the rule Scanned invoices: Split into the documents it holds, scanned pages read with Tesseract 5, page marker and document ID fields, a new document when the ID changes, both checks on, and a PDF that fails a check held for review
Split PDF cuts a scanned batch into one PDF per invoice, read by OCR, and checks each one.
Try it on a PDF: a 6-page scanned batch acme-batch-1104.pdf cut into 3 documents, INV-2026-0423, INV-2026-0424 and INV-2026-0425, each 2 pages, every check passing
Try it on a PDF shows where a batch will be cut before the rule runs.

Read invoice values from scanned PDFs

Steps you put inside the OCR step work on the file it made. So a Find fields with AI step inside it can read the invoice number, due date and total from the searchable PDF, and the steps under that one can save them to a database, send them to a web hook, upload the file or send a notification.

A rule named Scanned invoices in the Rule Editor: Make PDFs searchable (OCR) with Find fields with AI inside it reading {INVOICE_NUMBER}, {DUE_DATE} and {TOTAL_INCLUDING_TAX} with the built-in AI model on this computer, and Save to a database, Web hook, Upload to cloud and Send notification under it
Read values from scanned invoices: OCR first, then the built-in AI model reads the fields, and nothing leaves this computer.

The Parser reads scans too. Add a scan as a sample with Add a file… and it is read by OCR; then highlight the values or describe them in plain words, add checks and pick where the values go. The rule the Parser saves puts an OCR step ahead of its reading steps. Building and checking a parser from scans works in PRO Parser; running it on scanned files needs PRO Rules Server. See extract data from emails and attachments.

The Parser's Source step with a scanned invoice INV-2026-0423.pdf as the sample, read by OCR, 18 lines
A scanned PDF as the Parser’s sample: it is read by OCR first.
The Parser's Fields step on a scanned Acme Office Supplies invoice: the invoice number INV-2026-0423, the date and the total 855.12 highlighted on the scan and listed as fields
Highlight the values on the scan, and the Parser finds them in every invoice like it.

Scans from a scanner folder, not email

Does your scanner save to a share instead of sending an email? With PRO Rules Client and up, a folder watch sends each new file in a folder or network share through your PRO Rules, as an email’s attachment does. Point it at \\nas\scans, and the same OCR and Split PDF steps run on the scans.

The Watch: Folder window for a folder or network share: folder \\nas\scans, Run as soon as something changes, 60 seconds between checks, Include the folders inside it ticked
A folder watch on the scanner’s share sends each new scan through your rules.

Run it around the clock

Install the Windows service with Schedule › Service schedule › Install service, and scans are read as they arrive, even when nobody is signed in. Each account’s History remembers what it has handled, so nothing is read twice.

Questions people ask

Can I OCR email attachments without sending them to the cloud?

Yes. Tesseract and Windows OCR run on your own system. Only Azure AI Document Intelligence and AI vision send pages out, to the account you set up.

Does OCR change the original attachment?

No. The step saves a new file with the name you give it. The attachment the rule saved stays as it arrived.

Can it OCR JPG, PNG and TIFF attachments?

Yes. The step reads pictures as well as PDFs, and can save each one as a searchable PDF.

Which edition do I need?

PRO Rules Server, for both Make PDFs searchable (OCR) and Split PDF. See pricing.

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.