Skip to content
ParsedMail

Parse email attachments

ParsedMail parses email attachments together with the body: PDFs with a text layer, CSV, TXT, HTML, ICS, JSON and XML are read as text, and scanned PDFs and images are read as images on paid plans. Values and line-item tables from up to 8 files per email land in one JSON result.

Email received

From: Billing <[email protected]> Subject: Invoice INV-2026-1184 Attachment: INV-2026-1184.pdf (1 page) Please find our invoice attached. Payment terms 30 days. [PDF text] Corvid Packaging Invoice INV-2026-1184 Date 2026-10-09 Due 2026-11-08 Corrugated box 40x30x20 500 0.62 310.00 Void fill paper roll 12 14.50 174.00 Subtotal 484.00 Tax 8% 38.72 Total USD 522.72

Fields described as

supplier name, invoice number, invoice date, due date, line items (description, quantity, unit price, amount), subtotal, tax, total

JSON delivered to your webhook

{
  "supplier_name": "Corvid Packaging", 0.98
  "invoice_number": "INV-2026-1184", 0.99
  "invoice_date": "2026-10-09", 0.97
  "due_date": "2026-11-08", 0.96
  "line_items": [
    {
      "description": "Corrugated box 40x30x20",
      "quantity": 500,
      "unit_price": { "amount": 0.62, "currency": "USD" },
      "amount": { "amount": 310, "currency": "USD" }
    },
    {
      "description": "Void fill paper roll",
      "quantity": 12,
      "unit_price": { "amount": 14.5, "currency": "USD" },
      "amount": { "amount": 174, "currency": "USD" }
    }
  ], 0.94
  "subtotal": { "amount": 484, "currency": "USD" }, 0.97
  "tax": { "amount": 38.72, "currency": "USD" }, 0.95
  "total": { "amount": 522.72, "currency": "USD" } 0.99
}

Supported attachment formats

FormatHow it is readPlans
PDF with a text layerAs text, tables preservedAll, sandbox up to 1 page
CSV, TXT, HTML, JSON, XMLAs textAll
ICS calendar filesAs text, useful for bookings and meetingsAll
Scanned PDFsAs imagesPaid plans
Images (photos of documents)As imagesPaid plans

Small images such as logos and signature icons are skipped, so a company logo does not count against your pages or confuse the result. Up to 8 attachments per email are read. Each attachment appears in the email object with filename, content_type, size, pages and parsed, so you can see exactly what was used.

Body and attachments merge into one result

A purchase order email may say "please ship by Friday" in the body while the order lines sit in an attached PDF. ParsedMail reads both against one schema and fills one set of fields. You do not need a separate document workflow for the attachment and a second one for the email. The output format is the same typed JSON described on parse email to JSON.

Line items as typed tables

Declare a table field with typed columns, for example description as string, quantity as integer, unit price and amount as money. Each row of the invoice or order becomes a row object, in order, with values converted to those types. If a column value is missing in a row, that cell is null, and you see it in the confidence for the table field.

For accounts payable this usually feeds straight into QuickBooks, Xero or NetSuite through a webhook or an automation tool. The invoice processing use case walks through a full setup.

How pages are counted

Every plan has an email quota and a separate page quota for attachments. The rules are simple:

  • One PDF page counts as 1 page.
  • Text files and CSV count about 3,000 characters as 1 page.
  • Skipped small images and duplicates do not count.

Starter includes 300 pages a month, Growth 2,000 and Scale 10,000, next to 1,000, 5,000 and 25,000 emails. The one-time sandbox reads attachments of 1 page and no scans. Full numbers are on the pricing page.

Scans and photographed documents

Delivery notes signed on paper, receipts photographed on a phone and faxed orders saved as PDF have no text layer. On paid plans ParsedMail reads these as images. Quality matters: a sharp, straight scan scores higher confidence than a dark phone photo, and that difference shows up in the per-field scores. Send low scores to the review queue, where the reviewer sees the original next to the extracted values.

When a document-first tool fits better

If your work is mostly long documents, for example multi-page contracts uploaded in bulk rather than emailed, a document-first tool priced per page such as Parseur may suit you better. ParsedMail is built for email first, with attachments as part of the message. Our view is on the Parseur alternative page.

Why not run OCR and regex yourself

A common in-house pipeline downloads attachments, runs a PDF text extractor or OCR, and then applies regular expressions per supplier. It works for the first five suppliers. By the twentieth, the regex file is long, every new layout is a ticket for a developer, and nobody notices when a supplier moves the invoice number to the footer until a payment goes wrong.

ParsedMail replaces the regex step with a language model that reads the extracted text or the page image against your schema. You keep the parts that matter for engineering, a stable JSON contract, typed values and an email parsing API, and drop the per-supplier maintenance. Confidence scores tell you which documents were hard to read, which a regex never does.

Typical attachment workflows

WorkflowAttachmentTypical fields
Accounts payablePDF invoiceSupplier, invoice number, dates, line items, tax, total
Order intakePDF purchase order or CSV exportPO number, ship-to address, order lines, requested date
LogisticsShipping notice, delivery note scanTracking number, carrier, pallets, delivery date
BookingsICS invite or confirmation PDFReference, start and end, guests, price
RecruitingCV as PDFName, email, phone, position, years of experience

Each of these uses the same mechanics: one inbox, one schema, values from body and files in a single result.

Frequently asked questions

Can ParsedMail read scanned PDFs?

Yes, on paid plans. Scanned PDFs and images are read as images. The one-time sandbox reads only text attachments of 1 page.

How many attachments per email are read?

Up to 8 files per email. Small images such as logos and signature icons are skipped and do not count.

How do I know which attachments were used?

Every attachment in the email object has filename, content_type, size, pages and a parsed flag, so you can see which files were read and how many pages they counted.

Does a 10-page PDF count as one email?

It counts as one email and 10 pages. Emails and pages are separate quotas on every plan.

Can I get line items from a CSV order file?

Yes. CSV files are read as text and rows map into a table field with typed columns, about 3,000 characters per page.

Related

See your own email as JSON

Paste one into the demo, describe the fields and look at the result. No account needed.