In Zoho Projects, you can automatically create and assign a dependent task when a task’s status is updated. This helps teams stay aligned, ensures reviews happen on time, and reduces manual effort.
Use-case
In a scenario where an auditor schedules a task that requires a compliance review, once the task status is updated from
Scheduled, a
Dependent task is automatically created and assigned to the Compliance team. All related attachments are carried forward, ensuring the auditors and reviewers have full overview and can proceed without manual coordination.
To configure this flow,
1. Navigate to the upper-right corner of the page and click

→
Developer Space → Connections →
Create Connection using the following scopes:
- ZohoProjects.portals.READ
- ZohoProjects.portals.ALL
- ZohoProjects.projects.READ
- ZohoProjects.tasks.CREATE
- ZohoProjects.tasks.UPDATE
- ZohoProjects.tasks.READ
- WorkDrive.workspace.ALL
- WorkDrive.files.ALL
- ZohoProjects.documents.READ
- ZohoProjects.documents.CREATE
2. Navigate to
→ Developer Space →
Custom Functions. Under the
Task tab, create a new custom function and add the following
Deluge script.

Ensure that the portal URL aligns with your data centre. If not, the function may not execute as expected. Also, make sure the specified team is associated with the project; otherwise, the task assignment will fail.
- // TODO : Replace Dependency Type here with "FS, SS, SF, FF"
- // scopes: ZohoProjects.portals.READ, ZohoProjects.portals.CREATE, ZohoProjects.projects.READ, ZohoProjects.tasks.CREATE, ZohoProjects.tasks.UPDATE, ZohoProjects.tasks.READ, WorkDrive.workspace.ALL, WorkDrive.files.ALL, ZohoProjects.documents.READ, ZohoProjects.documents.CREATE.
- // get team id
- endPoint = "https://projects.zoho.in/restapi/portal/";
- endPointV3 = "https://projects.zoho.in/api/v3/portal/";
- getTaskStatusTimeline = invokeurl
- [
- url :endPointV3 + portalId + "/projects/" + projectId + "/tasks/" + taskId + "/status-timeline"
- type :GET
- connection:"connectionprojects"
- ];
- size = getTaskStatusTimeline.size() - 1;
- oldStatusName = getTaskStatusTimeline.get(size).get("previous_status").get("name");
- if(oldStatusName.containsIgnoreCase("Scheduled"))
- {
- teamName = "Compliance Team";
- userGroupsResponse = invokeurl
- [
- url :endPoint + portalId + "/projects/" + projectId + "/usergroups/"
- type :GET
- connection:"connectionprojects"
- ];
- teams = userGroupsResponse.get("userGroups");
- for each team in teams
- {
- if(team.get("groupObj").get("group_name").containsIgnoreCase(teamName))
- {
- teamId = team.get("groupObj").get("group_id");
- }
- }
- teamIds = List();
- teamIds.add(teamId);
- dependencyType = "FS";
- //Create Tasks parameters
- values_map = Map();
- values_map.put("name","Compliance Audit Verification");
- values_map.put("description"," Review task created for the Security and Compliance team to validate requirements, assess risks, and confirm adherence to defined standards. Attachments from the originating task are included for reference.");
- values_map.put("associated_teams",teamIds);
- //Invoke Create Task
- createTaskResponse = zoho.projects.create(portalId,projectId,"tasks",values_map,"connectionprojects");
- // Get TaskId From Task response
- if(createTaskResponse != null && createTaskResponse.get("tasks") != null)
- {
- taskInfo = createTaskResponse.get("tasks").get(0);
- newTaskId = taskInfo.get("id_string");
- // copy attachments to new task
- getAttachmentsResponse = invokeurl
- [
- url :endPointV3 + portalId + "/projects/" + projectId + "/attachments?entity_type=task&entity_id=" + taskId
- type :GET
- connection:"connectionprojects"
- ];
- if(getAttachmentsResponse.get("attachment").size() > 0)
- {
- taskAttachments = getAttachmentsResponse.get("attachment");
- for each attachment in taskAttachments
- {
- associateParam = Map();
- associateParam.put("entity_type","task");
- associateParam.put("entity_id",newTaskId);
- associateToTaskComment = invokeurl
- [
- url :endPointV3 + portalId + "/projects/" + projectId + "/attachments/" + attachment.get("attachment_id")
- type :POST
- parameters:associateParam
- connection:"connectionprojects"
- ];
- }
- }
- //Add Dependancy Between Tasks Parameter
- dependencyParam = Map();
- dependencyParam.put("taskid",newTaskId);
- dependencyParam.put("predids",taskId);
- dependencyParam.put("projId",projectId);
- dependencyParam.put("toupdate","dependencyset");
- dependencyParam.put("childprojId",projectId);
- dependencyParam.put("dependencytype",dependencyType);
- // invoke task dependency Api
- dependency = invokeurl
- [
- url :endPoint + portalId + "/projects/" + projectId + "/taskdependency/"
- type :POST
- parameters:dependencyParam
- connection:"connectionprojects"
- ];
- info dependency;
- info "-------------------------------------";
- }
- }
- return "success";

Customise the task name and description in lines 36 and 37 as needed, then save the function.
Replace "connectionprojects" with your Zoho Projects connection name in lines 10, 21, 51, and 84 of the deluge.
3. Add the below arguments during configuration.
After mapping the arguments, save the function and enter the Task ID when prompted. This custom function will execute automatically whenever an issue status changes from Scheduled, creating the dependent task as defined in the workflow rule.
4. After saving the custom function, Navigate to

→
Automation → Workflow Rules → Projects Tab →
New Workflow Rule with the below settings.
5. Configure the workflow to trigger Based on User Action when a task is Updated, and associate the custom function to execute automatically on the status change.
With this automation in place, tasks are triggered automatically, dependencies are assigned, and supporting attachments are transferred ensuring hand-offs without manual effort.