Condition nodes
In addition to action nodes, workflows support condition nodes for branching logic:
{
"identifier": "check-environment",
"title": "Check Environment",
"config": {
"type": "CONDITION",
"options": [
{
"identifier": "production",
"title": "Production",
"expression": ".outputs.trigger.environment == \"production\""
},
{
"identifier": "staging",
"title": "Staging",
"expression": ".outputs.trigger.environment == \"staging\""
}
]
}
}
Connections from condition nodes must specify which option they're connected to:
{
"connections": [
{
"sourceIdentifier": "check-environment",
"targetIdentifier": "production-deploy",
"sourceOptionIdentifier": "production"
},
{
"sourceIdentifier": "check-environment",
"targetIdentifier": "staging-deploy",
"sourceOptionIdentifier": "staging"
},
{
"sourceIdentifier": "check-environment",
"targetIdentifier": "default-deploy",
"fallback": true
}
]
}