AI Processing Rules and Sender Rules

Two ways to teach SparkReceipt how to handle incoming scanned email — free-form AI Processing Rules that shape what gets recognised, and Sender Rules that auto-approve or auto-reject specific senders at the approval stage.

ST
Written by SparkReceipt TeamUpdated Jul 28, 2026

When SparkReceipt scans your mailbox via automatic email scanning, every incoming email runs through an AI classifier that decides whether it's a receipt, an invoice, or something else. You can control what happens to that mail with two different tools that act at two different stages and live on each email source's settings page:

  • AI Processing Rules — free-form instructions in plain English that the AI consults while classifying. They act at the recognition stage: use them to change what gets recognised as a receipt or invoice, override misclassifications, or pick which workspace a recognised document belongs in.
  • Sender Rules — structured per-sender rules that auto-approve, auto-reject, or always ask for emails from a specific address. They act at the approval stage, once an email has already been recognised: use them to skip the approval queue for trusted senders or block known noise. They don't change what gets recognised.

The two features sit at different points in the pipeline and follow different logic, so it's worth understanding when each applies — especially the one case where Sender Rules are completely bypassed.

At a glance

AI Processing RulesSender Rules
Configured asFree-form plain-English textStructured rule with sender + optional subject/body filters
Acts onThe AI's classification decisionWhat happens after classification
OutcomesReceipt / invoice / non-receipt, plus optional target workspaceAuto-approve, auto-reject, or no action
Applied whenEvery email is classifiedOnly when "Require approval before processing" is on
Limit2,000 characters total per sourceOne rule per sender + content-filter combination

AI Processing Rules

AI Processing Rules are free-form instructions you write in your own words. They get embedded into the prompt the classifier sees, so they can influence both whether an email is treated as a receipt and where it gets routed.

Where to configure them

  1. Open Settings → Scan receipts from email.
  2. Click Settings on the email source you want to tune.
  3. Scroll to the AI Processing Rules card and write your instructions in the text area.
  4. Click Save.

You have up to 2,000 characters of guidance per source. There's no required format — write the instructions the way you'd explain them to a coworker.

What the rules can do

  • Override classification for specific senders, domains, or subject patterns. For example, "Treat anything from billing@aws.amazon.com as an invoice" or "Ignore emails from @news.example.com."
  • Force-skip non-receipt traffic. Words like ignore, skip, or exclude, and phrases like not a receipt / not an invoice, tell the classifier to mark a matching email as a non-receipt regardless of its content.
  • Route to a specific workspace. If you have access to multiple accounts/workspaces, a rule like "Route Amazon receipts to Personal" steers matching emails to that workspace instead of your default account. The workspace name must match one you already have access to.

What the rules cannot do

  • Blanket overrides are rejected. Instructions like "classify everything as a receipt" or "every email is an invoice" are treated as malicious and ignored by the AI.
  • They can't change the output format or break the classifier's structured response.
  • They don't apply retroactively to emails that have already been classified. They take effect for new emails from the moment you save.

Examples

  • "Auto-approve invoices from supplier@example.com."
  • "Reject newsletters and promotional emails."
  • "Route Amazon receipts to the Personal account; route Stripe invoices to My Business."
  • "Always approve order confirmations from Shopify even if the subject doesn't include 'receipt'."
  • "Treat AWS billing emails as invoices, not receipts."

The settings screen shows tailored example rules depending on whether your user has access to one workspace or multiple — in single-workspace mode, routing instructions are replaced with approval-flavored examples.

Sender Rules

Sender Rules are structured rules tied to a specific sender email address. Every rule has one of three actions, and an email coming from that sender — once the classifier has decided it's a receipt or invoice — gets that action applied automatically.

The three actions

  • Auto-allow — the email skips the approval queue and goes straight into your account for processing.
  • Auto-reject — the email is auto-skipped. It stays visible under the Auto-blocked filter of the pending-approval list, so you can recover it later if it was blocked by mistake.
  • No action — the email is sent to the approval queue for manual review, exactly as if no rule existed. Useful when you want to clear a previously created auto-allow or auto-reject for a sender without deleting it outright.

Sender + optional filters

Every sender rule needs a Sender address. You can optionally add either or both of:

  • Subject contains — the rule only matches when the email's subject contains this text.
  • Body contains — the rule only matches when the email's body contains this text.

Matching is case-insensitive and Unicode-normalized. If you supply a multi-word filter like "Order Confirmation", the words must appear in the email in the same order but don't have to be adjacent — so a subject like "Order #12345 Confirmation" still matches.

If both subject and body filters are set, both must match (AND logic). A rule with no filters matches every email from that sender.

How multiple rules combine

You can have several rules for the same sender — for example, an auto-allow for invoices and an auto-reject for marketing newsletters from the same domain. When more than one rule matches an email, SparkReceipt picks a single winner:

  1. More specific rules win. A rule with content filters beats a sender-only rule.
  2. Among rules of equal specificity, block beats allow beats no-action.

This ordering is deliberate: a content-filtered "auto-reject" can override a broad sender-wide "auto-allow" so that, say, you auto-approve @amazon.com but still block their marketing emails based on a subject pattern.

You can't save two rules for the same sender with identical content filters but different actions — that would be ambiguous, and the validator rejects it with a "rule with different type already exists" error.

Managing Sender Rules

You can create Sender Rules in two places:

From the email source's settings page. The Sender Rules card shows a summary (N auto-approve · N auto-reject · N always ask) and a Manage sender rules link. From there you can search, add, edit, or remove rules in bulk.

Inline when approving or rejecting pending emails. After you approve or reject a batch in the pending-approval list, SparkReceipt prompts: "Would you like to always approve emails from sender@example.com? Future emails will skip the approval queue." (or "always block" for rejections). Accepting creates a bare sender-only rule. If you also fill in the optional subject filter, the rule will only auto-allow/auto-reject emails whose subject contains that text.

When you save a new auto-allow or auto-reject rule, SparkReceipt also applies it retroactively to any pending-approval emails from that same sender (respecting the rule's content filters). Auto-allow rules approve those pending emails into the processing queue; auto-reject rules move them into the auto-blocked state. "No action" rules don't touch existing emails.

When auto-rejected emails come back

An auto-rejected email is not deleted — it's parked in the auto-blocked state and remains visible under the Auto-blocked filter of the pending-approval list. From there you can:

  • Recover it — moves it back to pending approval so you can manually approve it after all.
  • Permanently reject it — anonymizes the content (subject, body, attachments are cleared) and locks the entry as permanently rejected. This cannot be undone.

If you don't act on auto-blocked entries, their email content is anonymized after the normal 30-day retention window like every other scanned email.

When Sender Rules apply — and when they don't

This is the most important distinction to internalize:

Sender Rules only apply when "Require approval before processing" is enabled on the email source.

Each email source has a toggle in the Approval Settings card labeled Require approval before processing.

  • When the toggle is on, every newly classified receipt or invoice goes through the sender-rule check. A matching auto-allow rule sends it straight to processing, a matching auto-reject rule auto-blocks it, and anything else lands in the manual approval queue.
  • When the toggle is off ("always approve"), classified receipts and invoices skip the approval queue entirely. The sender-rule lookup is short-circuited and never runs. There's no point in checking rules when nothing ever gets queued for approval in the first place — so auto-allow rules are redundant and auto-reject rules are effectively disabled.

In practice this means:

  • If you want every email to be processed automatically and you're confident the AI's classifications are good, turn approval off and don't bother with Sender Rules.
  • If you want fine-grained control — auto-approving trusted senders, auto-blocking known noise, and reviewing the rest by hand — keep approval on and use Sender Rules to whittle down the manual queue.

When you turn the approval toggle off while emails are still waiting for approval, SparkReceipt asks what to do with them: Approve all, Reject all, or Keep for later. After that the queue stays empty and Sender Rules go dormant until you turn approval back on.

How the two features interact

A scanned email always flows through this sequence:

  1. Classification. The AI looks at the sender, subject, body, and attachments to decide whether it's a receipt, invoice, or non-receipt. Your AI Processing Rules are part of the prompt at this step and can swing the decision and the target workspace.
  2. Approval gating. If the email is classified as a receipt or invoice and Require approval is on, Sender Rules are consulted to decide whether to auto-allow, auto-reject, or fall through to manual approval. If Require approval is off, the email skips straight to processing — Sender Rules don't run.
  3. Processing. The email is converted into a document in the chosen workspace.

So AI Processing Rules influence what the email is classified as and where it should go; Sender Rules influence whether it bypasses the approval queue. They're complementary, not duplicates — and the cleanest pattern is usually:

  • Use AI Processing Rules when the decision depends on content (subject patterns, sender domains, the meaning of the email) or when you want emails routed to a specific workspace.
  • Use Sender Rules when the decision depends only on who sent it (or, with filters, the literal subject/body text) and you want a deterministic, auditable rule rather than relying on the AI.

Both features apply to scanned emails arriving via Gmail, Microsoft, and IMAP sources. They do not apply to manually forwarded emails using your forwarding address — those go through a separate flow described in How to forward e-receipts from your email.