Skip to main content
Most invoices should just go through. The ones over your approval limit should not. An If/Else node tests a field the Extract node produced and sends the document down a True or a False branch, so the expensive work, and the person, only get involved when the number says so.
invoice_number
total_amount
bill_to_name
due_date
invoice_number
total_amount
NodesCredits60 per pageYou get

The workflow

The condition names a field from the Extract node above it, an operator, and a value. The edge that leaves the If/Else node carries "branch": "true" or "branch": "false".
The fluent Python builder (client.workflow(...).parse().extract(...)) has no if_else() verb either. Build a WorkflowDefinition from the node classes, as above.

Response

A run does not tell you which branch it took. There is no branch field anywhere in the envelope. You read the outcome from what ran: an invoice over the limit comes back with two entries in extractions, one per Extract node; the same invoice under the limit comes back with one, because the node on the True branch never ran.

Tell someone about it

An extra Extract node is a placeholder for whatever the branch should do. The usual end of a True branch is a Slack alert: a message in the channel that owns the decision, with the extracted values in it.
The alert needs your Slack workspace connected to the organization first, by an admin, once. Until that is done the node saves fine and sends nothing. Severity sets the colour of the bar on the Slack card and nothing else: it does not decide whether the alert fires, which is what the If/Else above it is for.

When it goes wrong

Every document takes the True branch. The comparison reads the field as a number only when the field is a number. total_amount declared as a string compares as text, where "900" is greater than "4000". Declare amounts as float. Nothing takes either branch. The condition names a field that the Extract node above it does not produce. left is the field name, spelled exactly as in the schema. You cannot tell what happened. Add the alert, or give the False branch its own node too, so each path leaves a trace. Reading the branch from the count of extractions is fine in a script and painful in an audit. You want more than one test. One If/Else node holds one condition. Chain a second node on the branch of the first for “over the limit and from a new supplier”.

Next steps

If/Else

Every operator, and conditions on a validation result

Slack alert

The message template, its placeholders and the severity