{ "name": "Assign Task Creator when no user was initially assigned", "nodes": [ { "parameters": {}, "name": "Start", "type": "n8n-nodes-base.start", "typeVersion": 1, "position": [ 200, 560 ] }, { "parameters": { "triggerTimes": { "item": [ { "mode": "everyMinute" } ] } }, "name": "Cron", "type": "n8n-nodes-base.cron", "typeVersion": 1, "position": [ 220, 300 ] }, { "parameters": { "authentication": "headerAuth", "url": "https://try.vikunja.io/api/v1/lists/1/tasks", "options": {} }, "name": "Get Tasks", "type": "n8n-nodes-base.httpRequest", "typeVersion": 1, "position": [ 700, 300 ], "credentials": { "httpHeaderAuth": { "id": "3", "name": "Auth from Auth node" } } }, { "parameters": { "requestMethod": "POST", "url": "https://try.vikunja.io/api/v1/login", "options": {}, "bodyParametersUi": { "parameter": [ { "name": "username", "value": "demo" }, { "name": "password", "value": "demo" } ] } }, "name": "Authorize", "type": "n8n-nodes-base.httpRequest", "typeVersion": 1, "position": [ 440, 300 ] }, { "parameters": { "conditions": { "string": [ { "value1": "={{$node[\"Get Tasks\"].json[\"0\"][\"assignees\"]}}", "value2": "[Object: null]" } ] } }, "name": "IF", "type": "n8n-nodes-base.if", "typeVersion": 1, "position": [ 920, 300 ] }, { "parameters": { "authentication": "headerAuth", "requestMethod": "PUT", "url": "=https://try.vikunja.io/api/v1/tasks/{{$node[\"Get Tasks\"].json[\"0\"][\"id\"]}}/assignees", "jsonParameters": true, "options": { "bodyContentType": "json" }, "bodyParametersJson": "={\"user_id\": {{$node[\"Get Tasks\"].json[\"0\"][\"created_by\"][\"id\"]}}}" }, "name": "HTTP Request", "type": "n8n-nodes-base.httpRequest", "typeVersion": 1, "position": [ 1180, 280 ], "alwaysOutputData": false, "notesInFlow": false, "credentials": { "httpHeaderAuth": { "id": "3", "name": "Auth from Auth node" } } } ], "connections": { "Cron": { "main": [ [ { "node": "Authorize", "type": "main", "index": 0 } ] ] }, "Authorize": { "main": [ [ { "node": "Get Tasks", "type": "main", "index": 0 } ] ] }, "Get Tasks": { "main": [ [ { "node": "IF", "type": "main", "index": 0 } ] ] }, "IF": { "main": [ [ { "node": "HTTP Request", "type": "main", "index": 0 } ] ] } }, "active": false, "settings": {}, "id": 3 }