File router
Branch on file size / pages / type
The File router node looks at a file's size, page count, or type and decides what happens before any expensive step runs. It is the bouncer at the door: it can skip, forward, or flag a document based on its shape alone, so you never pay to process something you did not want to.
How it works
Reading and analyzing documents costs money per page. File router lets you set limits up front, for example: skip anything over 200 pages, or send oversized files down a separate path for review.
Because it judges the file itself and not its contents, it runs instantly and free, which makes it a smart guard in front of Extract and Analyze.
Common use cases
Real situations where this node earns its place in a flow.
Skip oversized files before billing
Route by page count so a 200-page statement gets flagged instead of quietly running up an extraction bill.
Surcharge heavy jobs
Detect big or many-page uploads and branch to a path that adds a fee accordingly.
Gate out the wrong types
Discard anything that is not a PDF before the flow spends money on it.
File router in a workflow
A simple example of where this node sits in a flow.
What you set up
- Set the conditions to branch on: file size, page count, number of files, or type.
- Wire each path to what should happen (continue, skip, or a review branch).
- Files that pass go on to the real work; the rest never reach the paid steps.
Common questions
Why route before extracting?
Reading pages costs money per page. Checking size and page count is free, so filtering here keeps a giant or wrong file from running up a bill on the steps after it.
Settings you configure on this node, stored under data.config in the workflow JSON. Leave a field unset to use its default.
rulesreqFile-metadata branch rules { rules: [{ id, label, mode, quantifier, field (size/pages/mime/ext/name or totals), op, value }] }; evaluated before extract, first match wins. Sizes accept units like '20MB'.
Type: JSON string
How this node appears inside a workflow's nodes[] array (the shape you see in the Developer export / import). A full workflow is { nodes: [...], edges: [...] }.
{
"id": "file-router",
"type": "card",
"position": {
"x": 160,
"y": 120
},
"data": {
"type": "file-router",
"kind": "processor",
"title": "File router",
"subtitle": "Branch on file size / pages / type",
"config": {
"rules": "[]"
}
}
}