Email history extraction

Import receipts and invoices that are already in your connected mailbox. Covers starting an extraction, what "Failed to count emails" means, and what to do after you cancel one.

ST
Written by SparkReceipt TeamUpdated Nov 10, 2026

Email history extraction (shown as History Import in the app) scans past emails in a connected mailbox for receipts and invoices. Automatic email scanning only processes mail that arrives after you connect. History extraction goes back through mail you already have and imports the receipts it finds.

Run it once after connecting a mailbox to catch up, and again later with a different date range if you missed something.

How it differs from automatic scanning

  • Automatic email scanning runs in the background and only sees emails that arrive after you connect the mailbox. It uses no credits.
  • History extraction is a one-off sweep of a date range you choose. SparkReceipt counts the emails first, shows you the cost, and then processes them in batches.

Both use the same AI classification, the same approval list and the same Sender Rules.

History extraction only works for mailboxes connected with Gmail, Microsoft or IMAP. It isn't available for the forwarding address, because there is no mailbox to read.

How to start an extraction

Web app

  1. Connect a mailbox first. See Automatic email scanning.
  2. Go to Settings → Scan receipts from email and click Settings on the mailbox row in the Automatic email scanning table.
  3. In the History Import section, click Manage history extraction.
  4. In the Start New Extraction card:
    • Choose a start date under Emails from.
    • Check the end date under Until. It starts at today.
    • Click Prepare task. SparkReceipt counts the matching emails and shows the cost.
    • Click Start extraction.

Mobile app

  1. Open the main menu and tap Scan from email.
  2. Tap the connected mailbox in the Automatic inbox scanning card.
  3. In the History Import section, tap Manage.
  4. Pick a date range, tap Prepare task, then Start extraction.

How far back it reaches

Emails from starts at 90 days ago, but you can change it to any earlier date, for example 1 January 2025. Until starts at today. SparkReceipt counts the emails in the exact range you pick and shows the cost before you start. You can also run it over a short range, such as last week.

Which folders are included

History extraction reads the same mail as automatic scanning, with one difference for Microsoft:

  • Gmail: all mail, including archived mail and every label. Sent, Drafts, Spam and Trash are left out.
  • Microsoft: every folder, including Archive and your own folders. Sent Items, Drafts, Junk Email and Deleted Items are left out.
  • IMAP: every folder and subfolder. Sent, Drafts, Trash and Junk are left out. For a Gmail account connected over IMAP, All Mail, Starred and Important are left out too, so archived mail without a label isn't read.

You can't choose individual folders or labels. See Which folders and labels are scanned?

"Failed to count emails. Please try again."

This message appears after Prepare task when SparkReceipt couldn't count the emails in your mailbox. It means the mailbox didn't answer the count request. The usual causes:

  • The mailbox connection has expired. Google and Microsoft sign-ins expire after a password change, or if you removed SparkReceipt's access in your Google or Microsoft account. Go back to the mailbox's settings. If it shows Re-authentication required, click Re-authenticate, then try again.
  • The mailbox isn't active. A mailbox that is paused, in an error state or disconnected can't be counted. Check its status on Settings → Scan receipts from email.
  • The IMAP login failed. If the IMAP password or app password has changed, update the connection. See IMAP login fails.
  • The provider had a temporary problem. Wait a few minutes and click Prepare task again. A shorter date range can also help.

If the mailbox shows as active, re-authenticating doesn't help and the error keeps coming back, contact support with the mailbox address and the date range you chose.

Progress, status and coverage

While a task runs, the page updates by itself. You'll see:

  • A status: Starting, In progress, Paused, Completed, Failed or Cancelled.
  • A progress bar.
  • How many emails were scanned, how many receipts were found, and how many were duplicates.

The Extraction Coverage timeline shows which date ranges you've already extracted, so gaps are easy to spot. The Extraction Tasks table lists every task with its date range, counts, credits used and the actions available for it:

Task statusActions
Starting, In progressCancel
PausedContinue, Cancel
FailedRestart
Completed, CancelledNone (a review link shows if emails are waiting)

Restart picks a failed task up from where it stopped. Tasks can show a Review N pending link if receipts are waiting for approval, and a Review N blocked link for emails your Sender Rules blocked.

You can restart a failed task only when no other extraction for the mailbox is starting, in progress or paused. Cancel that one first.

I cancelled an extraction. Can I continue it?

No. Cancel stops the task for good, and a cancelled task can't be continued or restarted. The receipts it already imported stay in your account.

To pick up where it stopped, start a new extraction:

  1. Look at the Extraction Coverage timeline to see which dates were covered.
  2. In Start New Extraction, choose a date range that covers what's left. Overlapping the old range is fine.
  3. Click Prepare task, then Start extraction.

Emails that were already imported are recognised and counted under Duplicates. They aren't imported again, and you're only charged for emails that are new.

There is no pause button. A task pauses on its own when it can't go on without more credits or reaches the credit amount you approved, and a paused task can be continued.

Only one extraction can run per mailbox at a time. To start a new one while another is running, cancel the running one first.

Duplicate handling

  • An email that automatic scanning already imported from the same mailbox isn't imported again.
  • The same receipt that arrived in two of your mailboxes, or that you also forwarded, becomes one document.

Duplicates are counted in the Duplicates column, but they don't create documents and don't need approval.

Cost and credits

History extraction is the only part of email scanning that uses credits, because it can go through thousands of old emails.

Each eligible account gets a one-off allowance of free history emails, by default 10,000 emails. After that, each email costs a fraction of a credit (by default 0.3 credits) from your monthly credits or credits you've bought.

Before you click Start extraction, the Start New Extraction card shows how the batch will be paid for:

  • Included quota: X of Y
  • This batch: N from included quota, or N from quota + M credits, or M credits
  • After extraction: ..., the balance that will be left

If the batch needs more credits than you have, the card shows Requires X credits (only Y available) and a Purchase credits button instead of Start extraction.

Why does history extraction cost credits?

Every old email has to be opened, read and run through the same AI that handles a forwarded receipt: deciding whether it holds a receipt, reading the line items, and assigning the Merchant and Category. Across thousands of emails that adds up, and the credit cost covers it.

The card shows the exact credit cost before you start. The email count comes from your mail provider and is an estimate, so the cost of a range can shift a little between two previews. To see what credits cost and how to buy more, read How does the monthly credit system work?.

If the task pauses

If your free allowance and credits both run out during a task, SparkReceipt pauses it instead of failing it. The status changes to Paused with the note:

Import paused — free emails and credits used up. Add credits to continue.

Add credits and click Continue to resume from where it stopped. You can also Cancel a paused task. The emails already imported are kept.

A task also pauses when it reaches the credit amount you approved. The note then reads "Import paused — it reached the credit amount you approved. Review and approve more to continue." Click Continue, then Approve and continue, to go on.

Feature availability

If history extraction isn't available for your account, the History Import section shows Coming soon and the button to open the extraction page is hidden. If your plan doesn't include it, the extraction page says "Importing your inbox history isn't included in your current plan."