Hey n8n Community,
Over the last few weeks I’ve been sharing a series of workflows I built for my friend Mike’s small company – a duplicate invoice checker, a classification workflow that auto-sorted incoming documents, a Slack-based approval system so Sarah (Mike’s finance colleague) could approve invoices with one button, and most recently a stress test workflow to benchmark how well document extraction holds up when documents get messy.
The stress test post got a lot of questions – but one kept coming up again and again:
“This is cool, but how do you handle it when the extraction actually fails in production? If one invoice comes through with a null value, your whole downstream workflow could push bad data to your accounting system or break entirely.”
Fair point. So I built this.
The insight that made it simple
Here’s the thing about easybits Extractor that I didn’t fully appreciate until I sat down to solve this: when it can’t confidently extract a field, it returns null. It doesn’t hallucinate a value. It doesn’t guess. It just tells you “I don’t know.”
That’s actually the perfect foundation for error handling, because null is a clean signal you can branch on. No fuzzy confidence thresholds, no “is this value reasonable?” logic – just a simple check: did we get a value or not?
The workflow
It’s super minimal – four functional nodes and zero Code nodes. The pattern is what matters, not the complexity:
- Gmail Trigger – Polls for new invoice emails with attachments every minute
- easybits: Extract Invoice Number – Tries to extract the invoice number from the attachment
- IF (Validation Check) – Checks whether
invoice_numberis empty (catches real nulls, undefined, and empty strings in one condition) - Split based on result:
Failed → Slack alert to Sarah with sender email, subject line, and timestamp so she can pull the invoice and handle it manually
Succeeded → Merge the extracted data back with the original file and archive to Google Drive
The Drive folder only ever contains invoices that were successfully extracted. Nothing silently slips through, and Sarah has a clean audit trail.
Why I’m sharing this one specifically
This is the kind of workflow that doesn’t feel exciting on its own – it’s not doing something new, it’s making sure something else doesn’t fail. But honestly, every extraction workflow I’ve ever built should have had this pattern built into it from day one.
The pattern is reusable too. Drop it in right after the easybits Extractor node in any workflow:
- The invoice approval pipeline → catch failures before they hit Slack
- The document classification workflow → flag docs that couldn’t be classified
- The receipt tracker → prevent null rows from polluting your expense sheet
Always the same shape: Extractor → IF (is empty) → error branch alongside your main path.
Where to grab it
Workflow JSON:
You’ll need the easybits community node installed. Two ways depending on your setup:
- n8n Cloud: The node is verified, so it’s already available out of the box. Just search for “easybits Extractor” in the node panel. No installation needed.
- Self-hosted n8n: Go to Settings → Community Nodes → Install and enter
'@easybits/n8n-nodes-extractor'.
Besides that, you’ll need Gmail, Google Drive, and Slack connected.
For anyone running extraction in production: how are you handling failures today? Are you catching nulls at the node level like this, doing post-extraction validation downstream, or relying on confidence scores? Curious what patterns people have landed on – especially anyone processing high-volume documents where a single silent failure could cascade.
Best,
Felix
