A workflow diagram showing a cheap filter model before expensive processing

The cheapest model in the workflow is doing the most important job

Stanislav Kapustin May 18, 2026 automation · ai · n8n · invoices · workflow · llm

A Business Computing student posted a free n8n template for invoice processing. Gmail trigger, OCR, auto-categorization, approval thresholds. Clean build for someone learning the space.

The most interesting part was step one.

Before any PDF is processed, before any extraction model runs, there’s a cheap Gemini Flash call that does one thing: decide whether this email is worth processing at all. Newsletter? Stop. Spam? Stop. Actual invoice or receipt? Continue.

He called it the Bouncer.

That name is right. And it’s not just about saving API credits, though it does that. It’s about a design principle I’ve seen matter in every invoice workflow I’ve built: don’t process everything. Decide what to process first.

Without a filter at the front, the expensive model gets newsletters, auto-replies, shipping confirmations, and the occasional email that looks like an invoice but isn’t. It handles them fine, mostly. But it costs more, runs slower, and occasionally misclassifies something in a way that’s harder to catch because it passed the first check confidently.

A cheap, fast model at the gate — set up with a tight prompt to make one binary decision — catches most of that before it becomes anyone’s problem.

I use the same logic when building extraction workflows. The first pass is fast and cheap: does this document look like what we expect? Only what passes goes to the more expensive extraction step. The uncertain results get flagged for human review.

The architecture isn’t complicated. It’s just deliberately layered.

The Bouncer doesn’t need to be smart. It needs to be consistent. And the expensive model behind it can actually do its job instead of spending half its time deciding what it’s even looking at.

Read next

Three nearby posts worth opening next.

Need a similar system in your business?

If you have a manual workflow between tools, I can help map the logic, design the system, and automate it in a way your team can actually use.

svg