Trying to route the execution using if node for clickup event taskdeleted
if have added the if node and tried expression and fixed but failed. thought the event is task.deleted result is false. I have attached the image of what I have done. Dono how to fix this.
Thanks, I got it sorted the other way
Adda code node to get an output true or false
return items.map(item => {
// Extract the event value from the current item
const eventValue = item.json.event;
// Create two new properties to mark the true and false branches
if (eventValue === "taskDeleted") {
// Set a flag to indicate the true branch (task is deleted)
item.json.task_deleted = true;
} else {
// Set a flag to indicate the false branch (task is not deleted)
item.json.task_deleted = false;
}
// Log the event to verify
console.log('Event value:', eventValue);
// Return the item with new properties
return item;