يوضح فصل التحقق عن التوجيه وعدم اختفاء القيم غير المعروفة.
معاينة محتوى الملف مباشرة
{
"name": "M10 - IF Validation & Switch with Fallback",
"nodes": [
{
"parameters": {},
"name": "Manual Trigger",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
220,
300
]
},
{
"parameters": {
"conditions": {
"conditions": [
{
"leftValue": "={{ Boolean($json.record_id?.trim()) && Boolean($json.email?.trim()) }}",
"rightValue": true,
"operator": {
"type": "boolean",
"operation": "equals"
}
}
]
}
},
"name": "Validate Required Fields",
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
460,
300
]
},
{
"parameters": {
"rules": {
"values": [
{
"conditions": {
"conditions": [
{
"leftValue": "={{ $json.priority }}",
"rightValue": "High",
"operator": {
"type": "string",
"operation": "equals"
}
}
]
},
"renameOutput": true,
"outputKey": "High"
},
{
"conditions": {
"conditions": [
{
"leftValue": "={{ $json.priority }}",
"rightValue": "Medium",
"operator": {
"type": "string",
"operation": "equals"
}
}
]
},
"renameOutput": true,
"outputKey": "Medium"
},
{
"conditions": {
"conditions": [
{
"leftValue": "={{ $json.priority }}",
"rightValue": "Low",
"operator": {
"type": "string",
"operation": "equals"
}
}
]
},
"renameOutput": true,
"outputKey": "Low"
}
]
},
"options": {
"fallbackOutput": "extra"
}
},
"name": "Route Priority",
"type": "n8n-nodes-base.switch",
"typeVersion": 3.2,
"position": [
720,
260
]
}
],
"connections": {
"Manual Trigger": {
"main": [
[
{
"node": "Validate Required Fields",
"type": "main",
"index": 0
}
]
]
},
"Validate Required Fields": {
"main": [
[
{
"node": "Route Priority",
"type": "main",
"index": 0
}
],
[]
]
}
}
}