Sync Wrike task hierarchy recursively

Recipe ToolsProject ManagementMarketing

What it does

When someone calls this automation via a function, it retrieves a Wrike task and processes all nested subtasks layer by layer. The automation logs each step and calls itself to handle deeper hierarchy levels.

Who it's for

Operations teams who need to sync complex Wrike task hierarchies without manual intervention.

How teams use this

Sync a multi-level project structure

Retrieve a Wrike task with three levels of subtasks in one call. The automation handles each layer automatically and logs every step to the job report so the team sees what was synced.

Integrate Wrike sync into a larger workflow

Call this automation from another workflow when a project is created. The same recursive logic runs inside the larger process without any changes to this setup.

Add custom field mapping to each level

Extend the custom action in Wrike to include field mapping so subtasks inherit parent values. Only the custom action step needs to change to set this logic.

How it works

  1. Receive the task to sync. A function call passes in a Wrike task ID to start the recursive sync process in real time.
  2. Fetch the task details. Get task by ID in Wrike retrieves the full task record including metadata needed for the sync.
  3. Process each subtask layer. For each subtask found, the automation runs a custom action in Wrike and logs the result to the job report.
  4. Call the automation for deeper levels. If subtasks exist, this automation calls itself asynchronously to process the next hierarchy level.
  5. Return the sync result. The automation returns the final result after all recursive calls complete and all subtask layers are processed.