An invoice number, an order ID, a total, a due date: the values you need are often inside an email or its attachment. Mail Attachment Downloader 4.0 can read them out and use them to name files, fill a spreadsheet, or hand them to another system.
In 3.x you did this with extractions in a rule, using the extraction wizard or a regular expression. In 4.0 there is a better way: the PRO Parser. You show it a value once, and it finds it in the next emails.
This guide covers the Parser first. The older field finders are still there in PRO Rules (the new name for Global filters), and they are covered at the end as the advanced path.
Fields: where values are kept
A value the program reads is kept in a field, written in braces, such as {INVOICE_NUMBER} or {ORDER_ID}. You can use a field wherever the program asks for a name or a value: a folder, a file name, a CSV column, a database row.
The email has its own fields too, such as {FROM}, {SUBJECT}, {DATE[yyyy-MM-dd]}, {FILENAME} and {EXT}. The “Fields…” button next to a name box lists them all.
Part 1: The Parser (recommended)
The Parser reads the email’s subject, sender and body, and its attachments: PDF, Word, Excel, HTML, CSV and text files, .eml and .msg files, and e-invoice XML.
Open the Parser tab and click “New parser”. Building a parser takes five steps: “Source”, “Fields”, “Checks”, “Output” and “Run on”.
Start from real samples
In “Source”, pick 3 to 25 similar emails from a mailbox, from “Emails in the backup”, or from “A file”. Similar emails are grouped, so Acme’s invoices sit together and Northwind’s order confirmations sit together. Build one parser for each kind of email.
Four ways to make a field
In “Fields”, each field is found one of these ways:
- Highlight. Select the value in a sample. The Parser works out how to find it, tries it on every sample and shows a hit rate, such as 3 / 3. Nothing is sent anywhere.
- Using AI. Describe the value in words, such as “the date payment is due”. The AI finds it and shows where it read it, with how sure it is. A value that isn’t in the text is flagged.
- Pattern. For values with a fixed shape, such as INV-2026-0423.
- From invoice data. E-invoices (Factur-X, ZUGFeRD, XRechnung, Peppol, UBL) carry their own data. The Parser reads it exactly, with no pattern and no AI.

You choose the AI. The built-in AI runs on your own system and sends nothing anywhere. You can also use your own AI server, OpenAI, Claude, Gemini or Azure OpenAI; the program asks before anything leaves your system. Tick “Hybrid mode” to use patterns first and ask the AI only for fields they leave empty.
Not sure which fields a sample offers? “Suggest fields and tables” proposes them, and you tick the ones you want.

Tables and line items
Invoices and orders are mostly tables. Click “Add a table” and the Parser reads it as rows and columns, in PDFs, HTML emails, spreadsheets and CSV files. It joins a table that runs over several pages and stops at the Total row.
It then checks that the lines add up to the subtotal or total, so a misread amount doesn’t slip through. If no header row fits, “Describe the rows in words” lets the AI read them.

Check the values before they are used
In “Checks”, give each field a check: “Not blank”, “Between” two values, “In a list” or “Not before” a date. You can also check fields together, such as “Subtotal plus tax equals the total”, and skip an invoice that was already parsed.
An email that fails a check, misses a required field, or that the AI was unsure of waits in “Needs you”. Nothing is written, sent or moved for it until someone approves it.
Send the values somewhere
In “Output”, choose where the values go:
- “CSV file”, “Excel workbook” or “Google Sheets”: one row per email, with the columns you choose. The lines of a table can go to their own sheet, one row per line.
- “Save files”: save the attachments, the email, or both, in a folder and under a name built from the fields, such as
{SUPPLIER}\{INVOICE_NUMBER}_{FILENAME}{EXT}. - “Move the email” to a folder of its mailbox when it is done.
- With PRO Rules Server: “SQL database”, “Webhook” and “Tell me” (a message to Slack, Teams and other channels).
Every output has a Test button. Processing the same email again replaces its row instead of adding a second one.
Turn it on, then keep an eye on it
In “Run on”, choose the accounts and see which recent emails the parser would pick. Save it, and it runs with each download.
The parser’s “Results” list every record it has read. Use “Export CSV” or “Export JSON”, or “Process again” from the kept copies without downloading anything. “Health” warns you when a field is found less often than usual, which often means a sender changed its layout.

Part 2: Fields inside a PRO rule (advanced)
A parser is saved as a PRO rule, so with PRO Rules you can open it in the Rule Editor and add your own steps after “Run Parser”.
You can also find a field directly in a rule. This suits a quick, one-off value. For many similar emails, the Parser is the better choice.
Open the PRO Rules tab and open or create a rule. Set “Which emails” first, such as From contains acme.example and Subject contains Invoice. Then, under “Fields to find”, click “Add a field” and choose how the field is found.
With AI (PRO Rules Client and up)
Say in plain words what to look for. You set the type, a check, and what happens if a value is not found. One AI call fills all the fields of an email.

By pointing at it: the extraction wizard (PRO Rules Server)
Paste or load a sample, highlight the value and click “Use the highlight”. Then fine-tune it on five tabs:
- “Where it starts”: the text before the value, such as
Payment total: USD. - “Where it ends”: at the end of the line, before certain words, or after a number of characters.
- “Change it”: remove spaces, change case, or turn it into a number.
- “Check it”: for example, it must not be empty.
- “When it fails”: use a default, or skip the rule for this email.

By pattern (PRO Rules Client and up)
This is for people who know regular expressions (.NET style). Say the subject is “Invoice INV-2026-0423 from Acme Office Supplies”:
- “Look in:” Subject
- “Pattern:”
^.*Invoice (INV-\d{4}-\d{4}).*$ - “Replace with:”
$1
^ and $ are the start and end of the subject, .* is any text, and the part in brackets is the invoice number. $1 keeps only that part. Type a subject in “Try it on:” to check the result, or click “Pattern help”.
Values inside an attachment
To read a value from a saved file rather than the email, add the “Find fields in the file” step under “Then”. Steps run in order, so only steps below it can use its fields.
Where you can use the fields
Once a field has a value, use it in the rule’s save folder and file name, and in its steps. Click “Fields…” to insert one.

- PRO Rules Client: “Move or copy the email”, “Copy file”, “Upload to cloud”, “Send to document management”, “Add a row to a spreadsheet”, and “Convert documents” to PDF.
- PRO Rules Server: “Send an email” (in the subject, recipients or body), “Save to a database”, “Store CSV / SQL”, “Run a script”, “Run a command line”, “Web hook”, and conversion to other formats.
Which edition do you need?
- PRO Parser: the whole of Part 1, with CSV, Excel and Google Sheets output and file names from any field. Includes PRO Backup.
- PRO Rules Client: adds the Rule Editor, fields by pattern or with AI, and steps after the parser.
- PRO Rules Server: adds the extraction wizard, databases, webhooks, scripts and the 24×7 Windows service.
The Free edition saves attachments and emails with a fixed choice of names; it doesn’t read values. Every PRO edition has a 30-day money-back guarantee. 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
- PRO Parser: read values out of invoices, orders and reports
- Extract data using a Parser
- Extract tables and line items
- E-invoices (Factur-X, ZUGFeRD, XRechnung, Peppol, UBL)
- Extraction wizard
- Invoice emails for invoice processing software
- Emails to CSV and Excel
Using version 3.x? See the 3.x version of this guide.
Questions or ideas about extracting data? Contact us.
One thought on “Extract data from emails and attachments: an in-depth guide”
Comments are closed.