(ClickUp) Update Subtasks of Subtasks based on specific conditions

Hello,

Is there any way where I could update Level 2 or 3 of the subtasks?

I mean subtasks of the subtasks?

Thanks

In ClickUp, the current version of the API does not directly support updating subtasks of subtasks. However, you can achieve this by using the ClickUp API in combination with recursion or a loop to navigate through the subtask hierarchy. Here’s a general approach:
*Retrieve the task: Use the ClickUp API to fetch the task that contains the subtasks you want to update. You can use the GET /task/{task_id} endpoint to retrieve the task details.

*Check conditions: For each subtask, check if it meets the specific conditions you have defined.
*Update subtask: If a subtask meets the conditions, use the ClickUp API’s PUT /task/{task_id} endpoint to update the subtask’s attributes. You can modify properties such as name, description, due date, status, or custom field values.
*Recursion/Loop: If a subtask has subtasks of its own (Level 2 or 3), repeat steps 2 to 4 recursively or within a loop until you have traversed the entire subtask hierarchy.

By using recursion or a loop, you can effectively navigate through the levels of subtasks and update them based on specific conditions.
More Support…
Best Regards
Pro_Tanvee

2 Likes

Is there any possible way using tools for example?

Hi @Pro_Tanvee,

I am trying to apply it to any tasks with multiple subtasks levels, not only a specific task.