Skip to main content
Nodes used: Parse, Classify, Extract A shared inbox receives invoices and receipts, and they need different fields. One workflow handles both: Parse reads the file, Classify labels it as an invoice or a receipt, and the edge branch sends it to the Extract node built for that kind. The document only pays for the Extract it reaches.

The workflow

The edge that leaves Classify carries branch, the category id. The API rejects an edge out of Classify without one.

Run it and read the result

The run for a one-page invoice, trimmed. classifications[].category is the category name, and only the Extract on the taken branch produces fields:

Tips

  • Write category descriptions as a reader would tell the two apart, not as a label. “Proof of a completed payment” beats “receipt”.
  • Two categories can share one Extract node when they need the same fields: point both branches at it.
  • Flash parse is enough for born-digital PDFs and keeps this workflow at 7 + 10 + 35 credits per page. Move Parse to Standard when scans arrive.
  • A document that matches no category is still classified: Classify always picks the closest one. Add an “Other” category with an explicit description when you need a place for the rest, and leave its branch without an Extract.

Next