Automatic email scanning

Connect Gmail, Outlook, or any IMAP mailbox so SparkReceipt imports receipts and invoices from your inbox automatically.

ST
Written by SparkReceipt TeamUpdated Jul 28, 2026

SparkReceipt can connect directly to your email account and import receipts and invoices as they arrive — no forwarding, filters, or rules to maintain. Once a mailbox is linked, SparkReceipt polls it on a schedule, classifies each message with AI, and turns the receipts into documents in the account of your choice.

This is different from the manual forwarding address, which only processes emails you explicitly forward. For that workflow, see How to forward e-receipts from your email. If you also want to import receipts that are already sitting in your mailbox from past months, see Email history extraction.

What it is

Automatic email scanning connects a mailbox you own (Gmail, Outlook/Microsoft 365, or any IMAP-compatible server) to your SparkReceipt workspace and keeps it in sync in the background. Every time SparkReceipt checks the mailbox, it:

  1. Fetches messages that arrived since the last sync.
  2. Runs an AI classifier on each one to decide whether it is a receipt or invoice.
  3. Extracts receipt data (merchant, total, tax, currency, date, line items) from matching emails and attachments.
  4. Creates a document in your SparkReceipt account — optionally pausing for your approval first.

Supported providers and authentication

SparkReceipt supports three connection methods:

  • Gmail / Google Workspace — connected with Google sign-in (OAuth 2.0). Uses the Gmail API's incremental history sync.
  • Microsoft — connected with Microsoft sign-in (OAuth 2.0). Covers Outlook.com, Hotmail, Live, and Microsoft 365 mailboxes via Microsoft Graph.
  • Other email (IMAP) — username and password against any IMAP server. Well-known providers are auto-detected by email domain: Gmail, Outlook/Hotmail, iCloud, Yahoo, AOL, and Zoho. For these providers SSL and port 993 are filled in automatically; you can override host, port, username, and SSL for any other server.

For IMAP connections to Gmail, iCloud, Yahoo, and most Microsoft accounts, you will need an app-specific password rather than your regular password — the in-app form links to the right place for each provider. OAuth (Gmail or Microsoft sign-in) is the recommended path when available.

All access tokens, refresh tokens, and IMAP passwords are encrypted at rest in the database.

Setting it up in the web app

  1. Open Settings and select Scan receipts from email from the side menu.
  2. Scroll to the Automatic email scanning card and click Connect email.
  3. Pick a provider:
    • Gmail — you're redirected to the Google consent screen. Grant read-only Gmail access and you'll return to SparkReceipt with the mailbox connected.
    • Microsoft — same flow via Microsoft's consent screen.
    • Other email (IMAP) — fill in email address, server, port, username, password, and SSL, then press Connect. The form tests the connection before saving.
  4. Once connected, the mailbox appears in the Automatic email scanning table with columns for Email, Provider, Status, Last synced, and Pending. Click Settings on any row to fine-tune that source.

If your plan doesn't include automatic email scanning, the section shows an Upgrade prompt instead of the Connect button. Manual forwarding stays available to all plans.

Setting it up in the Flutter app

  1. Open the main menu and tap Scan from email.
  2. In the Automatic inbox scanning card, tap Connect email account.
  3. Choose Gmail, Microsoft, or Other email (IMAP) and complete the flow — OAuth providers open an in-app sign-in; IMAP opens a connection form with the same fields as the web.
  4. The connected source then shows up in the Automatic inbox scanning list with its sync status. Tapping a source opens its settings.

What gets imported

SparkReceipt looks at both the email body and any attachments. For each message, the AI classifies it as a receipt or non-receipt. For receipts it extracts the standard receipt data — merchant, total, tax, currency, date, and line items when present — just as it would for a receipt you photograph or forward.

Inside each source's settings you can also:

  • Toggle Require approval before processing to review scanned emails before they become documents.
  • Pick a default account so documents from this source land in a specific linked account.
  • Write free-form AI Processing Rules that change what gets recognised as a receipt (e.g. "Treat domain renewal invoices as receipts", "Route Amazon receipts to Personal").
  • Manage Sender Rules to auto-approve, auto-reject, or always ask for specific senders at the approval stage — rules apply retroactively to pending emails too.

For a deeper walkthrough of both features — including the important nuance that Sender Rules only run when approval is required — see AI Processing Rules and Sender Rules.

Sync schedule and limits

Each connected mailbox is polled on a rolling schedule — new emails typically appear within a few hours of arriving in your inbox. Sync runs in the background and doesn't require the app to be open. The first sync after connecting picks up from the moment of connection, so nothing older is imported automatically; to backfill past receipts, use Email history extraction.

The number of mailboxes you can connect depends on your plan. The feature itself is included with Elite subscriptions; AppSumo lifetime-deal holders can unlock it with a one-time upgrade in the same settings screen.

Privacy and security

Automatic email scanning is covered by a short in-app privacy notice (visible under How we handle your email data on the settings card):

  • SparkReceipt only reads email content and metadata — it does not modify, send, or delete any email in your mailbox.
  • Emails classified as non-receipts are discarded immediately after classification. Only the email ID and an anonymized digest are kept, and only for duplicate detection.
  • Emails classified as receipts are stored temporarily to extract the receipt data, and raw email content is deleted as soon as processing is complete — no later than 30 days after ingestion.
  • Email data is never sold, shared, used for advertising, or used to train machine-learning models.
  • OAuth tokens and IMAP passwords are encrypted at rest.

You can disconnect at any time from the source's settings page; see below.

Pausing, disconnecting, and re-authenticating

Disconnect a mailbox. Open the source's settings, scroll to the Disconnect section, and click Disconnect email source. This stops scanning and removes the connection. Documents that have already been created from scanned emails are kept — nothing is deleted from your SparkReceipt account.

Automatic pause. If your subscription changes and no longer includes automatic email scanning, SparkReceipt puts the source into Paused (upgrade required) status. No new emails are fetched while paused. Upgrading again resumes scanning, with a short lookback window so you don't miss anything that arrived during the pause.

Re-authentication. OAuth tokens sometimes expire or get revoked — for example, if you change your Google or Microsoft password, or uninstall the SparkReceipt app from your Google Account. When that happens the source moves to Re-auth required. Open its settings and click Re-authenticate to restart the OAuth flow.

Re-scan / force sync. SparkReceipt polls automatically, so a manual re-scan is usually not needed. To pull in messages from before the connection date, trigger an Email history extraction on the source's settings page.

Troubleshooting

  • Status says "Error" or "Re-auth required". Open the source's settings and use Re-authenticate. For IMAP, double-check that your password is still valid — providers like Gmail, iCloud, and Yahoo require an app-specific password rather than your account password, and regenerating 2FA settings can invalidate old ones.
  • Status says "Paused (upgrade required)". Your current plan no longer includes automatic email scanning. Upgrade from the source settings page or from Settings → Subscription.
  • New emails aren't appearing. Syncs run on a schedule, not instantly. If hours have passed and nothing has appeared, check the Last synced time on the source row, look for emails in the pending approval queue (if approval is required), and check any Sender Rules that might be blocking specific senders.
  • A receipt was imported to the wrong account. Open the source's settings and set a different Default account, or add an AI Processing Rule for that sender. You can also reassign individual documents from their detail view.
  • Duplicate receipts after connecting a second mailbox. SparkReceipt deduplicates across your sources based on email content, so the same receipt received via two accounts is only processed once.