Switch

logic_switch · logic · Logic & Flow · Available · v2.0.0

Description

Route the workflow to one of many branches based on the value of an expression. Supports a fallback branch when no case matches.

⚙️ Configuration parameters

Fields shown in the editor when configuring the node. Generated directly from the NodeDefconfigFields.

FieldTypeRequiredDefaultDescription
expression
Espressione da confrontare
expressionyes
input.country
Espressione che produce il valore da matchare contro i casi sotto.
cases
Casi
switch-casesyesUna riga per caso: valore → nome del ramo. Il primo match vince. Il ramo viene emesso come output.
fallbackBranch
Ramo di fallback
stringnodefault
default
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.
caseSensitive
Match case-sensitive
booleannotrueSe off: "Foo" matcha "foo". Utile per match su stringhe utente con case incoerente.

⬆️ Node output

Fields available to downstream nodes via $node.<alias>.json.<field>:

  • *

💡 Configuration example

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
  }
}

🔗 Related nodes in the same category

Ready to use Switch?

Available now on all FlowForge plans. Try it free without a credit card.

Start freeBrowse all nodes