How to Extract Data from Emails with AI

Table of Contents
- Why regex and template parsers break
- How prompt-based extraction works
- A concrete walkthrough: receipts and invoices into Notion
- 1. Connect Notion and pick the database
- 2. Turn on AI Email Intelligence and write the prompt
- 3. Send invoices in
- 4. Read the result
- What the AI can actually read
- The honest limits
- Alternatives worth knowing
- Frequently asked questions
- How does AI extract data from emails?
- Why do regex and template email parsers break?
- Can AI read data from PDF and image attachments?
- What's the best AI email parser?
- Is AI email extraction accurate?
- Can I extract data from old emails in bulk?
- Get started
You extract data from emails with AI by defining the fields you want, describing them in plain language, and letting a model read each email and fill them in. No regex, no templates that anchor on where a value sits. The AI reads the message — and any attachments — the way a person would, and returns structured data you can drop into a spreadsheet or database.
That's the short version. The longer version is worth reading if you've ever built a template-based parser and watched it break, because the reason AI extraction is worth switching to is exactly the reason the old approach keeps failing.
Why regex and template parsers break
The traditional way to pull a value out of an email is to anchor on its structure. You tell the parser "the total is the number that comes after the word Total" or you write a regex that matches Order #(\d+). That anchor holds exactly as long as the sender keeps their template frozen, and senders never warn you before a redesign.
Senders redesign their emails. Stripe, Shopify, your bank, that SaaS invoice — they all update their email templates periodically. The moment the amount moves from one line to another, or "Total" becomes "Amount charged", your anchor misses. The parser doesn't error loudly. It just returns nothing, or worse, grabs the wrong number and writes it to your spreadsheet as if it were correct.
The same data arrives in many formats. If you track receipts, they come from dozens of vendors, none of whom agreed on a layout. A rule-based parser needs a separate template per format. Ten vendors, ten templates, each one a small maintenance liability.
Real data hides in attachments. A huge share of invoices and receipts aren't in the email body at all — they're a PDF or a scanned image attached to a one-line "Please find attached" message. Regex on the body finds nothing because there's nothing there to find.
None of this is a knock on rule-based parsing. When your emails are genuinely uniform and high-volume, a template is fast and cheap, and I say so in the parse emails into Google Sheets comparison. But the second your input gets varied, the maintenance cost of templates starts to outrun their value.
Save emails in seconds
Forward any email to your Quicktion address and it lands in Notion, Google Sheets, Airtable, Linear, or Trello automatically.
How prompt-based extraction works
AI extraction flips the model. Instead of describing where a value sits, you describe what it means, and the model finds it.
The workflow has three parts:
- Define the fields. Decide what you want out of each email — vendor, amount, due date, order number, a one-line summary. In practice these become the columns of a spreadsheet or the properties of a database.
- Write a prompt. In plain language, tell the AI what each field is: "Vendor is the company that sent the invoice. Amount is the total charged, as a number. Due date is when payment is due." No syntax, no code.
- Let it read. Every email that comes in gets read by the model, which returns your fields filled in. Because it reads meaning, a redesigned template or a new vendor doesn't break anything.
The mental shift is from "match this pattern" to "understand this document." That's why the same setup handles a Stripe receipt and a handwritten-looking invoice from a small vendor without separate rules for each.
A concrete walkthrough: receipts and invoices into Notion
Let me make this real with the example I get asked about most — turning a stream of receipts and invoices into a clean, filterable table. I'll use Notion here, but the exact same setup works if your destination is Google Sheets, Airtable, Linear, or Trello.
Say you want every incoming invoice to become a Notion database page with these properties:
- Vendor (text)
- Amount (number)
- Due date (date)
- Invoice number (text)
- Summary (text — one line on what it was for)
Here's how I'd set it up in Quicktion:
1. Connect Notion and pick the database
Create a Quicktion account, connect your Notion workspace, and select the database that will hold your invoices. Quicktion reads its properties so the AI knows what fields exist.
2. Turn on AI Email Intelligence and write the prompt
AI Email Intelligence is a Pro feature. Switch it on and write a prompt describing each property in plain language:
Extract the vendor name, the total amount charged as a number, the payment due date, and the invoice number. Write a one-line summary of what the invoice is for.
That's the whole configuration. No field-position markup, no regex.
3. Send invoices in
Two ways to feed it. Forward an invoice email to your unique Quicktion address (invoices-x7k2m@in.quicktion.io), or open the email in Gmail and click save with the Gmail add-on. You can also set a Gmail filter to auto-forward everything from your accounting inbox, so it runs hands-free.
4. Read the result
A new Notion page appears with Vendor, Amount, Due date, Invoice number, and Summary filled in. The standard fields — subject, sender, date, full body, attachments — are captured automatically alongside your extracted properties. If the invoice was a PDF attachment, the AI read the PDF and pulled the numbers from it.
From there Notion does what Notion does: filter by due date to see what's owed this week, sum the Amount column by vendor, sort by date for tax season. The extraction is what makes the table useful instead of a pile of unstructured emails. For the broader Notion workflow, the automate email to database without Zapier guide covers how forwarding maps into a database end to end.
What the AI can actually read
Worth being precise about the inputs, because this is where AI extraction pulls ahead of regex:
- The email body — HTML or plain text, formatted or not
- PDF attachments — invoices, receipts, statements, contracts
- Image attachments — a photographed receipt, a screenshot of an order
The model treats the whole email as one document. So when a vendor sends "Invoice attached" with the actual numbers locked inside a PDF, the AI reads the PDF and returns the amount and due date. A body-only regex parser would come back empty. That single capability covers a large fraction of real accounts-payable and expense workflows.
The honest limits
I'd rather you hit these expectations up front than be surprised.
It's a Pro feature. AI Email Intelligence is on the $12/month Pro plan ($120/year), not the free tier. The free plan still captures the standard fields (subject, sender, date, body, attachments) into one destination, 25 emails a month — it just doesn't do the prompt-based extraction.
Volume is 1,000 emails a month on Pro. Plenty for personal finances, a small business's invoices, or a lead inbox. If you're extracting from tens of thousands of emails a month, you want a dedicated high-volume parsing SaaS.
It runs on arrival or on save, not on history. Quicktion extracts when an email is forwarded in or when you click save in the add-on. It does not reach back and bulk-process the thousands of emails already sitting in a Gmail label. For a one-time backfill of old email, pair a bulk export tool like cloudHQ with AI extraction, or use a parsing SaaS built for batch runs.
Models aren't perfectly deterministic. For clean fields — amounts, dates, order numbers, names — accuracy is high and beats regex on varied input. But a model is not a fixed rule, so for extremely high-stakes numbers some people spot-check the first batch. In everyday use it's reliable enough that I run my own receipts through it without a second look.
Alternatives worth knowing
AI extraction from email isn't a one-tool market, and the honest answer to "what should I use" depends on the job.
Mailparser and Parseur (AI mode). Both standalone parsing platforms have added AI-assisted extraction on top of their rule engines. If you're processing structured documents at high volume and live inside a dedicated parsing tool, they're strong. The tradeoff is that they sit outside your email and your database, and they're priced for volume.
ChatGPT or Claude, copy-paste. For a genuine one-off — you need three fields out of a single email, once — pasting it into a chat assistant and asking for the values is completely fine, and free. It just isn't automated, doesn't run on incoming mail, and doesn't write to your database. Great for one email, useless for a recurring stream.
Quicktion. Where I'd point you for ongoing extraction of incoming email into Notion, Sheets, Airtable, Linear, or Trello, with attachment reading and a one-click Gmail add-on. That's the niche I built it for. It's not the tool for a 50,000-email backfill.
Frequently asked questions
How does AI extract data from emails?
You define the fields you want (vendor, amount, due date) and describe them in plain language. The AI reads each email — the body plus any attached PDFs or images — and returns those fields as structured data. There are no regex patterns or position-based templates; the model finds each value by meaning, so it keeps working when the email's layout changes.
Why do regex and template email parsers break?
Rule-based parsers anchor on an email's structure — a value sits at a fixed position or next to fixed text. When a sender redesigns their email, moves a field, or you start receiving the same type of email from a different vendor, the anchor no longer matches. The parser either extracts nothing or grabs the wrong value silently. AI extraction reads meaning instead of position, so it tolerates those changes.
Can AI read data from PDF and image attachments?
Yes. A capable AI parser reads the email body and the attachments together. If a receipt arrives as a PDF or a photo, the AI extracts the amount and date from the attachment, not just the email text. This matters because a lot of real-world data — invoices, scanned receipts — lives in the attachment, not the message body.
What's the best AI email parser?
For ongoing extraction of incoming email into Notion, Google Sheets, Airtable, Linear, or Trello, Quicktion uses a plain-language prompt and reads attachments. Mailparser and Parseur offer AI-assisted extraction at higher volume in a standalone tool. For a one-off, pasting an email into ChatGPT or Claude works fine — it just isn't automated. See the parse emails into Google Sheets comparison for the full lineup.
Is AI email extraction accurate?
For well-defined fields (amounts, dates, order numbers, names), modern models are highly accurate, and they beat regex on messy or varied emails. They aren't perfectly deterministic the way a fixed rule is, so for extremely high-stakes numeric data some people spot-check. In practice, prompt-based extraction is reliable enough that I run my own receipts through it.
Can I extract data from old emails in bulk?
It depends on the tool. Quicktion extracts data as email arrives (forwarding) or when you click save (Gmail add-on) — it doesn't bulk-process a Gmail label's history. For a one-time backfill of thousands of old emails, a bulk export tool like cloudHQ paired with AI extraction, or a parsing SaaS, is the better route.
Get started
If you're tired of rebuilding templates every time a sender changes their email, Quicktion lets you describe the fields you want in plain language and reads attachments along with the body. Free for 25 emails a month; AI Email Intelligence is on the $12/month Pro plan.
For the wider set of options — including where rule-based tools still win — read the parse emails into Google Sheets comparison, or the Gmail to Google Sheets integration guide for the spreadsheet-specific setup.
Ready to put your emails where they belong?
Quicktion lets you forward emails or use the Gmail add-on to save messages to Notion, Google Sheets, Airtable, Linear, or Trello. No code required.
Leandro Zubrezki
Founder of Quicktion
Building tools to bridge the gap between email and the tools you already use. Leandro created Quicktion to help teams save time by automating email workflows across Notion, Google Sheets, Airtable, Linear, and Trello.
Related Posts

How to Parse Emails into Google Sheets: 4 Methods Compared
Parse emails into Google Sheets automatically. Compare rule-based add-ons, parsing SaaS, Zapier's parser, and prompt-based AI extraction to find the right fit.

How to Export Emails from Gmail (to Sheets, Excel, CSV, or a Database)
Export emails from Gmail four ways: Google Takeout for a full mailbox backup, Marketplace add-ons for a label to Sheets, Quicktion for ongoing structured export, or the Gmail API.

How to Save Outlook Emails to Linear
Save Outlook emails to Linear with email forwarding. Works on desktop, web, and mobile — auto-forward bug reports and feature requests into Linear issues.