Description
Route the workflow to one of many branches based on the value of an expression. Supports a fallback branch when no case matches.
logic_switch · logic · Logic & Flow · Available · v2.0.0
Route the workflow to one of many branches based on the value of an expression. Supports a fallback branch when no case matches.
Fields shown in the editor when configuring the node. Generated directly from the NodeDefconfigFields.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
expressionEspressione da confrontare | expression | yes | — input.country | Espressione che produce il valore da matchare contro i casi sotto. |
casesCasi | switch-cases | yes | — | Una riga per caso: valore → nome del ramo. Il primo match vince. Il ramo viene emesso come output. |
fallbackBranchRamo di fallback | string | no | defaultdefault | Nome del ramo emesso se nessun caso matcha. Lascia vuoto per emettere "default". Crea il corrispondente edge nel canvas con label uguale a questo valore. |
caseSensitiveMatch case-sensitive | boolean | no | true | Se off: "Foo" matcha "foo". Utile per match su stringhe utente con case incoerente. |
Fields available to downstream nodes via $node.<alias>.json.<field>:
*JSON snippet of the node as it appears in the workflow. Values are derived fromdefaultValue and from required parameters.
{
"id": "node-logic_switch-1",
"defId": "logic_switch",
"label": "Switch",
"config": {
"expression": "input.country",
"cases": "<cases>",
"fallbackBranch": "default",
"caseSensitive": true
}
}Available now on all FlowForge plans. Try it free without a credit card.
Start freeBrowse all nodes