{ "name": "Reschedule Overdue and Delete Completed Asana Tasks", "tags": [ { "id": "oMfA3lEfbqs7MU2P", "name": "Template", "createdAt": "2025-01-06T20:33:18.396Z", "updatedAt": "2025-01-06T20:33:18.396Z" } ], "nodes": [ { "id": "reschedule-and-clean-asana-tasks-0", "name": "Everyday at 7am", "type": "n8n-nodes-base.scheduleTrigger", "position": [ 80, -520 ], "parameters": { "rule": { "interval": [ { "triggerAtHour": 7, "triggerAtMinute": 0 } ] } }, "typeVersion": 1.2 }, { "id": "reschedule-and-clean-asana-tasks-1", "name": "Get user tasks", "type": "n8n-nodes-base.asana", "position": [ 320, -520 ], "parameters": { "filters": { "assignee": "YOUR_ASSIGNEE_ID", "workspace": "YOUR_WORKSPACE_ID", "completed_since": "={{ DateTime.now().format('yyyy-MM-dd') }}" }, "operation": "getAll", "returnAll": true }, "typeVersion": 1 }, { "id": "reschedule-and-clean-asana-tasks-2", "name": "Get task infos", "type": "n8n-nodes-base.asana", "position": [ 540, -520 ], "parameters": { "id": "={{ $json.gid }}", "operation": "get" }, "typeVersion": 1 }, { "id": "reschedule-and-clean-asana-tasks-3", "name": "Task is open?", "type": "n8n-nodes-base.if", "position": [ 780, -520 ], "parameters": { "options": {}, "conditions": { "options": { "version": 2, "leftValue": "", "caseSensitive": true, "typeValidation": "strict" }, "combinator": "and", "conditions": [ { "id": "145d9367-7662-4ed9-8195-bf9b35c78d6b", "operator": { "type": "boolean", "operation": "false", "singleValue": true }, "leftValue": "={{ $json.completed }}", "rightValue": "false" } ] } }, "typeVersion": 2.2 }, { "id": "reschedule-and-clean-asana-tasks-4", "name": "Due date in the past?", "type": "n8n-nodes-base.if", "position": [ 1020, -640 ], "parameters": { "options": {}, "conditions": { "options": { "version": 2, "leftValue": "", "caseSensitive": true, "typeValidation": "loose" }, "combinator": "and", "conditions": [ { "id": "dbecabb3-8075-4cc0-94af-b678c8af8f66", "operator": { "type": "number", "operation": "lt" }, "leftValue": "={{ ($json.due_on ?? \"9999-12-31\").replaceAll(\"-\",\"\") }}", "rightValue": "={{ DateTime.now().format('yyyyMMdd') }}" } ] }, "looseTypeValidation": true }, "typeVersion": 2.2 }, { "id": "reschedule-and-clean-asana-tasks-5", "name": "Set due date to Today", "type": "n8n-nodes-base.asana", "position": [ 1280, -680 ], "parameters": { "id": "={{ $json.gid }}", "operation": "update", "otherProperties": { "due_on": "={{ DateTime.now().format('yyyy-MM-dd') }}" } }, "typeVersion": 1 }, { "id": "reschedule-and-clean-asana-tasks-6", "name": "Clean up task", "type": "n8n-nodes-base.asana", "position": [ 1020, -440 ], "parameters": { "id": "={{ $json.gid }}", "operation": "delete" }, "typeVersion": 1 } ], "active": false, "pinData": {}, "settings": { "timezone": "Europe/Paris", "callerPolicy": "workflowsFromSameOwner", "executionOrder": "v1" }, "connections": { "Task is open?": { "main": [ [ { "node": "Due date in the past?", "type": "main", "index": 0 } ], [ { "node": "Clean up task", "type": "main", "index": 0 } ] ] }, "Get task infos": { "main": [ [ { "node": "Task is open?", "type": "main", "index": 0 } ] ] }, "Get user tasks": { "main": [ [ { "node": "Get task infos", "type": "main", "index": 0 } ] ] }, "Everyday at 7am": { "main": [ [ { "node": "Get user tasks", "type": "main", "index": 0 } ] ] }, "Due date in the past?": { "main": [ [ { "node": "Set due date to Today", "type": "main", "index": 0 } ] ] } } }