Hello,
I can’t understand why I can’t compare these dates.
The problem seems to come from the “now_CET” value but I can’t figure out why.
Anyone see why ?
Thanks in advance for your help.
This is the error message:
Stack
NodeOperationError: The value "undefined" is not a valid DateTime.
at convertDateTime (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/If/If.node.js:376:23)
at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/If/If.node.js:394:34)
at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:658:51)
at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:585:68
at processTicksAndRejections (node:internal/process/task_queues:96:5)
The worflow:
`{
"meta": {
"instanceId": "72786ae79aa2a39c713dd21fa0afbb75d22cf8ceb717141469d817c1b9d4a238"
},
"nodes": [
{
"parameters": {
"conditions": {
"dateTime": [
{
"value1": "={{ $json[\"last_notif_CET\"] }}",
"value2": "={{ $node[\"Now CET\"].json[\"now_CET\"] }}"
}
]
}
},
"id": "6e9d0b24-d0cc-4141-99fa-4443e2bf5f3b",
"name": "IF > 45 min last notif AND > 1h from the window start",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
1280,
-40
]
}
],
"connections": {}
}`
Some screenshots: