This workflow corresponds to n8n.io template #4350 — we link there as the canonical source.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"nodes": [
{
"id": "9459daa3-dfff-46f5-8feb-43f45e51c603",
"name": "Load dependencies for task",
"type": "n8n-nodes-base.httpRequest",
"position": [
2540,
260
],
"parameters": {
"url": "=https://api.awork.com/api/v1/tasks/{{ $('Webhook call by Awork').item.json.body.entity.id }}/taskdependencies",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"retryOnFail": true,
"typeVersion": 4.2,
"alwaysOutputData": true,
"waitBetweenTries": 2000
},
{
"id": "00f9880f-f593-481f-91e5-a2b8a45f789f",
"name": "Aggregate task dependencies",
"type": "n8n-nodes-base.aggregate",
"position": [
2740,
260
],
"parameters": {
"options": {
"mergeLists": true
},
"fieldsToAggregate": {
"fieldToAggregate": [
{
"renameField": true,
"outputFieldName": "taskDependencies",
"fieldToAggregate": "predecessorId"
}
]
}
},
"typeVersion": 1
},
{
"id": "c17bb18c-fb38-4592-92fd-5d8055c1359b",
"name": "Workflow config",
"type": "n8n-nodes-base.set",
"position": [
240,
700
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "20b87314-585f-4b03-a87d-cc1b9ff1f9c2",
"name": "finishedStateLabels",
"type": "array",
"value": "=[\"Fertig\",\"Total fertig\"]"
},
{
"id": "16f603e2-3703-4f47-a1b9-92503eb1ea43",
"name": "useDependencies",
"type": "boolean",
"value": false
},
{
"id": "ffd4703d-be65-4c35-b28c-6cafb1050d13",
"name": "useTreeStructure",
"type": "boolean",
"value": true
},
{
"id": "6adacba5-463e-4d5e-9571-54f1a026cb4d",
"name": "addComments",
"type": "boolean",
"value": true
},
{
"id": "a06d3f03-8c2d-4788-b986-4bfc2b2a37c5",
"name": "commentTextDependencies",
"type": "string",
"value": "Some dependencies not yet finished! Status rolled back!"
},
{
"id": "68e0a3f8-5b43-4b1c-b7c8-174abd4c3754",
"name": "commentTextTreeStructure",
"type": "string",
"value": "Some child tasks not yet finished! Status rolled back!"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "e1e12bf5-458e-4e32-a170-7f4f6079f3b5",
"name": "Fetch task changes",
"type": "n8n-nodes-base.set",
"position": [
660,
700
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "d1e893cd-bdeb-4c9b-8fe0-82dc11c047a7",
"name": "=changes",
"type": "array",
"value": "={{ $('Webhook call by Awork').item.json.body.changes }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "e2970d75-6909-423c-a8f2-df64a012a843",
"name": "Split out task changes",
"type": "n8n-nodes-base.splitOut",
"position": [
880,
700
],
"parameters": {
"options": {},
"fieldToSplitOut": "changes"
},
"typeVersion": 1
},
{
"id": "408ed681-38a2-401a-9982-f26e67a5e6f2",
"name": "Filter task status change",
"type": "n8n-nodes-base.filter",
"position": [
1100,
700
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "82923633-648e-4ef0-82dc-cbe35de925b3",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.property }}",
"rightValue": "TaskStatusId"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "017123eb-5ced-411a-b3e4-66f9a4b9dd3f",
"name": "Check if task done",
"type": "n8n-nodes-base.if",
"position": [
1540,
700
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "e4e5890b-588e-41f1-95c1-02e313fda09a",
"operator": {
"type": "array",
"operation": "contains",
"rightType": "any"
},
"leftValue": "={{ $('Workflow config').item.json.finishedStateLabels }}",
"rightValue": "={{ $('Webhook call by Awork').item.json.body.entity.taskStatus.name }}"
},
{
"id": "97e159ef-21df-4d1c-bef0-fc7a64ffa0fe",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Webhook call by Awork').item.json.body.entity.taskStatus.type }}",
"rightValue": "done"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "fe3c0bb3-975e-4bbb-9800-554d297bdbda",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1060,
40
],
"parameters": {
"width": 880,
"height": 1440,
"content": "## Awork workaround for done tasks with subtasks or dependencies\n\n\nCurrently, [Awork](https://www.awork.com/) does **not** offer direct support for the following functions:\n\n* If a task has subtasks, then it should not be able to be marked as completed while subtasks are still open\n* If a task is dependent on other tasks, then it should not be able to be marked as completed as long as these linked tasks are still open\n\n### This n8n workflow offers the following functions:\n\n* Checking whether all subtasks of a task have been completed before it can be completed \n* Check whether tasks marked as prerequisites have been completed before the task can be marked as completed\n* If the condition for completing a task is not fulfilled, the workflow rolls back the status to the previous status\n* A comment is added to the task as to why this roll back occurred\n* This workflow **does not use** the Awork community nodes package, as this package does not support all API calls and is therefore not used by me. If you would like to use that package, you can find more information at [https://support.awork.com/en/articles/9826591-n8n-integration](https://support.awork.com/en/articles/9826591-n8n-integration) and replace the http nodes with matching community nodes if applicable\n\n\n### The following configuration settings are possible or required in the \u201cWorkflow config\u201d node (following the webhook call):\n\n* **finishedStateLabels** (required): Label text of the task status entities that have the \u201cDone\u201d state. Must be stored as an array. Allows you to control whether the workflow is skipped for certain status changes, even if the task has been marked as completed.\n\n* **useDependencies** (optional): Boolean setting as to whether dependencies should be taken into account or not. If true, a task can only be marked as completed if the linked tasks have been marked as completed.\n\n* **useTreeStructure** (optional): Boolean setting whether parent and child tasks are taken into account. If true, then parent tasks can only be marked as completed if all child tasks have been marked as completed.\n\n* **addComments** (optional): Boolean setting as to whether a comment is added to a task if a status change has been undone by the workflow\n\n* **commentTextDependencies** (optional, required if addComments is true): Comment text that is added to a task when the status change is undone for uncompleted tasks on which the current task is dependent. Serves as a hint for the user.\n\n* **commentTextTreeStructure** (optional, required if addComments is true): Comment text that is added to a task when the status change is undone for uncompleted subtasks. Serves as a hint for the user.\n\n## How to use\n\n**Awork configuration**\n\n* Copy this workflow to your n8n installation\n* Add authentication credentials\n\n* Add a new webhook call to Awork (see [https://support.awork.com/en/articles/5415462-webhooks](https://support.awork.com/en/articles/5415462-webhooks)) and configure as required (name, authentication etc.)\n* Configure the webhook to be called on task status changes\n* Enable \"Only events from first level properties\" to reduce the number of webhook calls\n* Test and save webhook\n\n* Generate a new API client (or use existing) (see [https://support.awork.com/en/articles/5415664-client-applications-and-api-keys](https://support.awork.com/en/articles/5415664-client-applications-and-api-keys))\n\n* Add new credentials for Awork to your n8n installation (see [https://docs.n8n.io/credentials/add-edit-credentials/](https://docs.n8n.io/credentials/add-edit-credentials/))\n++ Choose \"Header auth\" from the list and name as you like, e.g. \"Awork API Access\"\n++ Set \"name\" to \"Authorization\" and \"value\" to \"Bearer YOUR_TOKEN_HERE\" with XXX being replaced by the API key created in Awork\n\n\n## Enjoy\n\n"
},
"typeVersion": 1
},
{
"id": "c148d0fd-e82c-4e8f-bf16-ac4d6339389d",
"name": "Webhook call by Awork",
"type": "n8n-nodes-base.webhook",
"position": [
-60,
700
],
"parameters": {
"path": "57b88b94-6228-4e49-897d-64bf8c7d32db",
"options": {},
"httpMethod": "POST"
},
"typeVersion": 2
},
{
"id": "d3ccba41-12ff-4715-96dd-593d7064bcde",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
140,
600
],
"parameters": {
"color": 4,
"width": 360,
"height": 280,
"content": "### Workflow config\n* Configure basic settings"
},
"typeVersion": 1
},
{
"id": "95f0bc10-d970-4e7d-97cf-aa48186ac29f",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
620,
600
],
"parameters": {
"color": 4,
"width": 660,
"height": 280,
"content": "### Extract status changes from webhook call payload\n"
},
"typeVersion": 1
},
{
"id": "2317dd27-9d9d-4f38-a4fc-2eb32a2468b7",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1420,
600
],
"parameters": {
"color": 3,
"width": 380,
"height": 280,
"content": "### Check if task status is currently \"done\"\n* If yes, proceed\n* If no, exit workflow"
},
"typeVersion": 1
},
{
"id": "3c3c3fa0-e13f-4716-8b00-10ef90e3b9db",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1940,
600
],
"parameters": {
"color": 3,
"width": 380,
"height": 280,
"content": "### Check if dependencies are enabled\n* If yes, process dependencies\n* If no, check if tree structure is enabled"
},
"typeVersion": 1
},
{
"id": "43794f28-5da6-4e00-a43d-7d094dab163b",
"name": "Check if dependencies enabled",
"type": "n8n-nodes-base.if",
"position": [
2080,
700
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "53d5f2be-2830-4977-a69f-a0d135ea76c4",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $('Workflow config').item.json.useDependencies }}",
"rightValue": "true"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "ebfd5656-ddd0-41e9-9c8e-d56b36aa7776",
"name": "Load all linked tasks",
"type": "n8n-nodes-base.httpRequest",
"position": [
3200,
260
],
"parameters": {
"url": "=https://api.awork.com/api/v1/me/projecttasks",
"options": {},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"queryParameters": {
"parameters": [
{
"name": "filterby",
"value": "={{ $json.taskDependencies.join(' or ') }}"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"retryOnFail": true,
"typeVersion": 4.2,
"alwaysOutputData": true,
"waitBetweenTries": 2000
},
{
"id": "d7b3c05a-a46a-46ef-9b50-a8f20cc2749c",
"name": "Build filter params",
"type": "n8n-nodes-base.code",
"position": [
2960,
260
],
"parameters": {
"jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nfor (const item of $input.all()) {\n for( var key in item.json.taskDependencies ) {\n item.json.taskDependencies[key] = \"id eq guid'\" + item.json.taskDependencies[key] +\"'\";\n}\n}\n\nreturn $input.all();"
},
"typeVersion": 2
},
{
"id": "ea9758df-b695-4852-90c8-24a22a05c20f",
"name": "Filter only open tasks",
"type": "n8n-nodes-base.filter",
"position": [
3420,
260
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "8f2bbc21-ad7c-47e2-95b1-f92cb482ea8e",
"operator": {
"type": "string",
"operation": "notEquals"
},
"leftValue": "={{ $json.taskStatus.type }}",
"rightValue": "done"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "2c73026c-1b75-4c2e-b6ce-f15c670b59f0",
"name": "Aggregate open task IDs",
"type": "n8n-nodes-base.aggregate",
"position": [
3640,
260
],
"parameters": {
"options": {},
"fieldsToAggregate": {
"fieldToAggregate": [
{
"fieldToAggregate": "id"
}
]
}
},
"typeVersion": 1
},
{
"id": "3327aedc-007e-4fea-9245-15b262989a82",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
2500,
160
],
"parameters": {
"color": 4,
"width": 1320,
"height": 340,
"content": "### Load task dependencies and filter open tasks\n"
},
"typeVersion": 1
},
{
"id": "a1dfbfe4-b741-4aba-902e-8e489515b699",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
3920,
160
],
"parameters": {
"color": 3,
"width": 420,
"height": 340,
"content": "### Check if tasks marked as dependencies are open\n* If yes, roll back status.\n* If not, proceed to tree structure check"
},
"typeVersion": 1
},
{
"id": "2bdf7aca-4436-4b7d-bc28-e7bc548310a6",
"name": "Check if open tasks exist",
"type": "n8n-nodes-base.if",
"position": [
4080,
260
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "c30d2bf0-f6ca-46a6-be1e-2f24425fffed",
"operator": {
"type": "array",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $json.id }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "d0e09e6e-7c93-4e8d-895c-71ab4e48fbe1",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
4440,
160
],
"parameters": {
"color": 4,
"width": 360,
"height": 340,
"content": "### Roll back task status"
},
"typeVersion": 1
},
{
"id": "11ae20ec-fa13-48b0-bb08-8b994f81dc8c",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
4900,
160
],
"parameters": {
"color": 3,
"width": 400,
"height": 340,
"content": "### Check if comment should be added to task\n* Exit workflow if no comment should be added"
},
"typeVersion": 1
},
{
"id": "262e5825-a4c2-42a4-8dd5-f2f84883a294",
"name": "Check if comments are enabled",
"type": "n8n-nodes-base.if",
"position": [
5060,
260
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "6505de62-2d0a-4a3a-8f33-f0add4364b7e",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $('Workflow config').item.json.addComments }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "7936a327-a171-4589-8640-2d40460ed4e8",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
5400,
160
],
"parameters": {
"color": 4,
"width": 460,
"height": 340,
"content": "### Add comment to task regarding roll back of task state\n* Add comment and exit workflow"
},
"typeVersion": 1
},
{
"id": "76d2697e-d3b7-4325-847b-4321ae970351",
"name": "Add comment to tasks",
"type": "n8n-nodes-base.httpRequest",
"position": [
5580,
260
],
"parameters": {
"url": "=https://api.awork.com/api/v1/tasks/{{ $('Webhook call by Awork').item.json.body.entity.id }}/comments",
"method": "POST",
"options": {},
"jsonBody": "={\n \"message\": {{ JSON.stringify($('Workflow config').item.json.commentTextDependencies) }}\n} ",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpCustomAuth": {
"name": "<your credential>"
},
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"retryOnFail": true,
"typeVersion": 4.2,
"waitBetweenTries": 2000
},
{
"id": "c38bb177-055e-4e07-9197-4315edd34f55",
"name": "Check if tree structure enabled",
"type": "n8n-nodes-base.if",
"position": [
4540,
780
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "53d5f2be-2830-4977-a69f-a0d135ea76c4",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $('Workflow config').item.json.useTreeStructure }}",
"rightValue": "true"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "5ad89ff4-985d-46f9-b872-1de948c0aec0",
"name": "Sticky Note11",
"type": "n8n-nodes-base.stickyNote",
"position": [
4440,
680
],
"parameters": {
"color": 3,
"width": 360,
"height": 340,
"content": "### Check if tree structure check is enabled\n* Exit workflow if not enabled"
},
"typeVersion": 1
},
{
"id": "44487a9d-abfa-4808-ba02-d57a0f435a41",
"name": "Sticky Note12",
"type": "n8n-nodes-base.stickyNote",
"position": [
4900,
680
],
"parameters": {
"color": 3,
"width": 400,
"height": 340,
"content": "### Check if task has subtasks\n* Exit workflow if no subtasks found"
},
"typeVersion": 1
},
{
"id": "62c3589d-0968-43aa-a2d0-efb916032c35",
"name": "Check subtasks",
"type": "n8n-nodes-base.if",
"position": [
5020,
760
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "965e2460-236b-4628-b6e9-e4082b656b0f",
"operator": {
"type": "number",
"operation": "gt"
},
"leftValue": "={{ $('Webhook call by Awork').item.json.body.entity.numberOfSubtasks }}",
"rightValue": 0
}
]
}
},
"typeVersion": 2.2
},
{
"id": "4238a520-ea43-45e9-b035-40829d2d0b19",
"name": "Roll back task status from done to previous state",
"type": "n8n-nodes-base.httpRequest",
"position": [
4560,
260
],
"parameters": {
"url": "https://api.awork.com/api/v1/tasks/changestatuses",
"method": "POST",
"options": {},
"jsonBody": "=[\n {\n \"taskId\": \"{{ $('Webhook call by Awork').item.json.body.entity.id }}\",\n \"statusId\": \"{{ $('Filter task status change').item.json.old }}\" \n}\n] ",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"retryOnFail": true,
"typeVersion": 4.2,
"waitBetweenTries": 2000
},
{
"id": "c8930fa6-4234-4441-bc53-f13357a068f2",
"name": "Load all open sub tasks",
"type": "n8n-nodes-base.httpRequest",
"position": [
5500,
760
],
"parameters": {
"url": "=https://api.awork.com/api/v1/me/projecttasks",
"options": {},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"queryParameters": {
"parameters": [
{
"name": "filterby",
"value": "=parentid eq guid'{{ $('Webhook call by Awork').item.json.body.entity.id }}' and taskstatus/type ne 'done'"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"typeVersion": 4.2,
"alwaysOutputData": true
},
{
"id": "5a3afb99-4c18-417f-97ca-8d540f62c6be",
"name": "Aggregate task IDs",
"type": "n8n-nodes-base.aggregate",
"position": [
5720,
760
],
"parameters": {
"options": {},
"fieldsToAggregate": {
"fieldToAggregate": [
{
"fieldToAggregate": "id"
}
]
}
},
"typeVersion": 1
},
{
"id": "c02ea6b2-f424-4e75-b9ce-43a5f90370f9",
"name": "Sticky Note10",
"type": "n8n-nodes-base.stickyNote",
"position": [
5400,
680
],
"parameters": {
"color": 4,
"width": 500,
"height": 340,
"content": "### Load subtasks not marked as done"
},
"typeVersion": 1
},
{
"id": "0fa23254-3e0f-4c11-9d3d-e4c19c084baa",
"name": "Sticky Note14",
"type": "n8n-nodes-base.stickyNote",
"position": [
6000,
680
],
"parameters": {
"color": 3,
"width": 400,
"height": 340,
"content": "### Check if open subtasks exist\n* Exit workflow if no open subtasks found"
},
"typeVersion": 1
},
{
"id": "4e763c4a-93c0-494e-9a6f-8752a4dc9693",
"name": "Check open subtasks",
"type": "n8n-nodes-base.if",
"position": [
6120,
760
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "f1c49c95-5272-4414-99f6-55e146a33ae2",
"operator": {
"type": "array",
"operation": "lengthGt",
"rightType": "number"
},
"leftValue": "={{ $json.id }}",
"rightValue": 0
}
]
}
},
"typeVersion": 2.2
},
{
"id": "e07402d8-d4f9-4e4f-b54b-cd55a8e67c3e",
"name": "Sticky Note15",
"type": "n8n-nodes-base.stickyNote",
"position": [
6520,
680
],
"parameters": {
"color": 4,
"width": 360,
"height": 340,
"content": "### Roll back task status"
},
"typeVersion": 1
},
{
"id": "ef73bbef-b9e6-48fc-942e-3779ba5b5134",
"name": "Sticky Note16",
"type": "n8n-nodes-base.stickyNote",
"position": [
6980,
680
],
"parameters": {
"color": 3,
"width": 400,
"height": 340,
"content": "### Check if comment should be added to task\n* Exit workflow if no comment should be added"
},
"typeVersion": 1
},
{
"id": "97fe4f6b-72a4-46ac-b77a-95db9febd5b4",
"name": "Check if comments are enabled1",
"type": "n8n-nodes-base.if",
"position": [
7140,
780
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "6505de62-2d0a-4a3a-8f33-f0add4364b7e",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $('Workflow config').item.json.addComments }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "0b6ac50f-e277-42b7-9a2d-1cacd3c3850f",
"name": "Sticky Note17",
"type": "n8n-nodes-base.stickyNote",
"position": [
7480,
680
],
"parameters": {
"color": 4,
"width": 460,
"height": 340,
"content": "### Add comment to task regarding roll back of task state\n* Add comment and exit workflow"
},
"typeVersion": 1
},
{
"id": "89827df6-6514-4481-bd62-c91990d8ef4c",
"name": "Add comment to tasks1",
"type": "n8n-nodes-base.httpRequest",
"position": [
7660,
780
],
"parameters": {
"url": "=https://api.awork.com/api/v1/tasks/{{ $('Webhook call by Awork').item.json.body.entity.id }}/comments",
"method": "POST",
"options": {},
"jsonBody": "={\n \"message\": {{ JSON.stringify($('Workflow config').item.json.commentTextTreeStructure) }}\n} ",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpCustomAuth": {
"name": "<your credential>"
},
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"retryOnFail": true,
"typeVersion": 4.2,
"waitBetweenTries": 2000
},
{
"id": "0cd3cbfc-eae7-432a-a3c1-cb8f63e9bf82",
"name": "Roll back task status from done to previous state1",
"type": "n8n-nodes-base.httpRequest",
"position": [
6640,
780
],
"parameters": {
"url": "https://api.awork.com/api/v1/tasks/changestatuses",
"method": "POST",
"options": {},
"jsonBody": "=[\n {\n \"taskId\": \"{{ $('Webhook call by Awork').item.json.body.entity.id }}\",\n \"statusId\": \"{{ $('Filter task status change').item.json.old }}\" \n}\n] ",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"retryOnFail": true,
"typeVersion": 4.2,
"waitBetweenTries": 2000
},
{
"id": "6e5bb250-a325-43a3-ae31-09057144a7a8",
"name": "Sticky Note22",
"type": "n8n-nodes-base.stickyNote",
"position": [
40,
40
],
"parameters": {
"color": 4,
"width": 280,
"content": "## Green sticky notes: Logical group of nodes"
},
"typeVersion": 1
},
{
"id": "dd922d3f-415c-4407-acaa-b7aa0bb92ce7",
"name": "Sticky Note23",
"type": "n8n-nodes-base.stickyNote",
"position": [
400,
40
],
"parameters": {
"color": 3,
"width": 280,
"content": "## Red sticky notes: Routing and possible workflow exit"
},
"typeVersion": 1
}
],
"connections": {
"Check subtasks": {
"main": [
[
{
"node": "Load all open sub tasks",
"type": "main",
"index": 0
}
],
[]
]
},
"Workflow config": {
"main": [
[
{
"node": "Fetch task changes",
"type": "main",
"index": 0
}
]
]
},
"Aggregate task IDs": {
"main": [
[
{
"node": "Check open subtasks",
"type": "main",
"index": 0
}
]
]
},
"Check if task done": {
"main": [
[
{
"node": "Check if dependencies enabled",
"type": "main",
"index": 0
}
]
]
},
"Fetch task changes": {
"main": [
[
{
"node": "Split out task changes",
"type": "main",
"index": 0
}
]
]
},
"Build filter params": {
"main": [
[
{
"node": "Load all linked tasks",
"type": "main",
"index": 0
}
]
]
},
"Check open subtasks": {
"main": [
[
{
"node": "Roll back task status from done to previous state1",
"type": "main",
"index": 0
}
],
[]
]
},
"Load all linked tasks": {
"main": [
[
{
"node": "Filter only open tasks",
"type": "main",
"index": 0
}
]
]
},
"Webhook call by Awork": {
"main": [
[
{
"node": "Workflow config",
"type": "main",
"index": 0
}
]
]
},
"Filter only open tasks": {
"main": [
[
{
"node": "Aggregate open task IDs",
"type": "main",
"index": 0
}
]
]
},
"Split out task changes": {
"main": [
[
{
"node": "Filter task status change",
"type": "main",
"index": 0
}
]
]
},
"Aggregate open task IDs": {
"main": [
[
{
"node": "Check if open tasks exist",
"type": "main",
"index": 0
}
]
]
},
"Load all open sub tasks": {
"main": [
[
{
"node": "Aggregate task IDs",
"type": "main",
"index": 0
}
]
]
},
"Check if open tasks exist": {
"main": [
[
{
"node": "Roll back task status from done to previous state",
"type": "main",
"index": 0
}
],
[
{
"node": "Check if tree structure enabled",
"type": "main",
"index": 0
}
]
]
},
"Filter task status change": {
"main": [
[
{
"node": "Check if task done",
"type": "main",
"index": 0
}
]
]
},
"Load dependencies for task": {
"main": [
[
{
"node": "Aggregate task dependencies",
"type": "main",
"index": 0
}
]
]
},
"Aggregate task dependencies": {
"main": [
[
{
"node": "Build filter params",
"type": "main",
"index": 0
}
]
]
},
"Check if comments are enabled": {
"main": [
[
{
"node": "Add comment to tasks",
"type": "main",
"index": 0
}
],
[]
]
},
"Check if dependencies enabled": {
"main": [
[
{
"node": "Load dependencies for task",
"type": "main",
"index": 0
}
],
[
{
"node": "Check if tree structure enabled",
"type": "main",
"index": 0
}
]
]
},
"Check if comments are enabled1": {
"main": [
[
{
"node": "Add comment to tasks1",
"type": "main",
"index": 0
}
],
[]
]
},
"Check if tree structure enabled": {
"main": [
[
{
"node": "Check subtasks",
"type": "main",
"index": 0
}
],
[]
]
},
"Roll back task status from done to previous state": {
"main": [
[
{
"node": "Check if comments are enabled",
"type": "main",
"index": 0
}
]
]
},
"Roll back task status from done to previous state1": {
"main": [
[
{
"node": "Check if comments are enabled1",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
httpCustomAuthhttpHeaderAuth
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Awork currently does not support a check for open subtasks or open dependencies when setting a task status to done. This workflow offers you a simple workaround to add this functionality to Awork and notifies users when triggered. Multiple configuration options available.
Source: https://n8n.io/workflows/4350/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This n8n template provides enterprise-level version control for your workflows using GitHub integration. Stop losing hours to broken workflows and manual exports – get proper commit history, visual di
This flow creates dummy files for every item added in your *Arrs (Radarr/Sonarr) with the tag .
This workflow acts as a central API gateway for all technical indicator agents in the Binance Spot Market Quant AI system. It listens for incoming webhook requests and dynamically routes them to the c
Sign PDF documents with legally-compliant digital signatures using X.509 certificates. Supports multiple PAdES signature levels (B, T, LT, LTA) with optional visible stamps.
📡 This workflow serves as the central Alpha Vantage API fetcher for Tesla trading indicators, delivering cleaned 20-point JSON outputs for three timeframes: , , and . It is required by the following a