Step by stepSeptember 9, 20267 min read

31 documents your AI treated as processed when they weren't

An email integration treated 31 documents as fine when they'd actually been stuck for months, with real invoices from three clients inside, and no error ever flagged it. The check that was missing, and how to apply it to your own business.

Pol

Fundador de AutoBoost

AutomationIntegrations
31 documents your AI treated as processed when they weren't

Your AI can be completely sure a document is done, and be wrong about it for months without anyone noticing. That's what happened to us a few days ago with an integration that receives documents by email for several pharmacies: we found 31 documents parked for months, with real invoices from three of them inside, and no error log had ever flagged it. Here's what happened and the check we added, because the pattern repeats in any business that receives something by email and expects a system to process it on its own.

The problem: "arrived" and "processed" look like the same check, and they're not

The integration works like this: a mailbox receives emails with attached documents (invoices, delivery notes, orders), saves them, and leaves them ready for the next step to extract, validate, and book. That first stretch worked perfectly: the email arrived, it was logged as received, the file was saved in its folder. Three green lights.

The problem sat right after those three lights. A bug left some documents parked exactly there, in no man's land: received and saved, but never picked up by the step that actually processes them. And because no log flagged anything odd (there was no error to throw, since technically nothing had broken), nobody found out until a check built specifically for that gap was added.

The result: 31 documents backed up, with real invoices from three pharmacies inside, found the same day that check was first turned on.

Why this is the hardest of the three failure modes to catch

In any multi-step process there are three distinct ways things can fail, and only one of them makes noise:

Type of failureWhat you seeHow easy it is to notice
The process throws an errorAn error message, a log, an alertEasy: something screams
The process never startsNothing happens, but nothing gets saved eitherMedium: noticeable by the absence of a result
The process stops halfwayEverything looks fine: the email is logged, the file existsHard: nothing screams, and there's "something" there that looks normal

The third case is the dangerous one, and it's exactly what happened to us. There was no error to catch because, from the system's point of view, nothing bad had happened: the email had been received (true) and the file had been saved (true). The only thing missing was a check confirming that file had actually made it all the way through, and that check simply didn't exist.

The decision rule: always separate "arrived" from "processed"

If you take one idea from this post, make it this one: "the document arrived" and "the document was processed" are two different checks, and monitoring only the first lets exactly this kind of silent backlog slip through.

It's tempting to trust a process by checking only its first step, because that's usually the easiest thing to measure (did the email arrive? yes or no) and the result feels representative of the rest. It isn't. Any integration that receives something from outside (an email, a webhook, a file dropped in a folder) needs a separate check, at the end of the chain, confirming that what came in came out the other side turned into what it was supposed to become: a booked invoice, a created order, a validated record.

How we fixed it

We added a specific check for that gap to the watchdog for that integration: for each saved document, it compares whether the expected result exists on the other side (the processed invoice, the created record) and, if not, flags it as genuinely pending, not "in progress."

One detail made the real difference: instead of sending an alert for every stuck document, the system groups everything it finds into a single message. With 31 documents at once, 31 separate alerts would have been indistinguishable from a deployment issue or a one-off outage; a single alert with the full list makes it obvious it's an accumulated backlog, and helps decide the priority at a glance.

Checklist: how to check this in your own business

If your business depends on something that "arrives and gets processed on its own" (invoices by email, orders from an online store, documents from a client, notices from a government office), here are the questions worth asking before assuming it's working:

  • Do you have a check at the end of the chain, not just at the start? Something being received says nothing about whether it actually got processed.
  • Do you know how many things are "received but not processed" right now, or would you only find out if someone went and checked by hand?
  • Does a partial failure trigger any error, or can the system stop halfway without anything logging it as abnormal?
  • If several cases pile up at once, do you get one alert per item or one grouped alert? A flood of identical alerts gets ignored just as fast as if there were none.
  • How long could a document like this sit stuck before someone would notice on their own, without the check? If the answer is "months," like in our case, that's the sign this check is needed now.

Why it matters more the more you automate with AI

When a task is done by a person, a forgotten document usually surfaces sooner or later: someone asks about that invoice, a client complains about an order that never arrived. When the task is done by an AI acting on its own, that human safety net disappears: the AI doesn't ask itself "did I miss something?", it just processes whatever comes to it flagged as genuinely pending. If the system feeding it that work has a gap like this one, the AI will never know those 31 documents existed, because as far as it's concerned, they never became pending.

It's the same principle we apply in the data platform with AI for a group of pharmacies, where the AI reasons over more than a million lines of data: before letting it decide anything, you have to guarantee the data it's deciding on is complete, not just that it "arrived." And it's the same work behind invoices that book themselves for a veterinary group, where the system verifies every invoice down to the cent before accepting it, and deletes it if something doesn't add up instead of leaving it half done.

The lesson any small business can take away

You don't need a big technical team to apply this: you need to ask, for any automated process your business depends on, whether you're actually checking the end of the chain or only the beginning. Most systems (yours or a vendor's) are built to confirm something came in, not to confirm it came out the other side properly processed. That gap is exactly where these silent backlogs hide.

If you have integrations receiving documents, orders, or notices by email and you're not entirely sure what would happen if one got stuck halfway, let's talk. At AutoBoost we build custom software and AI integrated into your actual systems, designed so a silent backlog stops being possible. Get in touch and we'll take a look together.

Share article
Your AI thinks a document is done, and it isn't | AutoBoost