Automation Series: Auto-create Dependent Task on Status Change

Automation Series: Auto-create Dependent Task on Status Change

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.

In this post, we’ll walk through an easy setup using a Custom Function scripted in Deluge.

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:
  1. ZohoProjects.portals.READ
  2. ZohoProjects.portals.ALL
  3. ZohoProjects.projects.READ
  4. ZohoProjects.tasks.CREATE
  5. ZohoProjects.tasks.UPDATE
  6. ZohoProjects.tasks.READ
  7. WorkDrive.workspace.ALL
  8. WorkDrive.files.ALL
  9. ZohoProjects.documents.READ
  10. 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.
Notes
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.
  1. // TODO : Replace Dependency Type here with "FS, SS, SF, FF"
  2. // 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.
  3. // get team id
  4. endPoint = "https://projects.zoho.in/restapi/portal/";
  5. endPointV3 = "https://projects.zoho.in/api/v3/portal/";
  6. getTaskStatusTimeline = invokeurl
  7. [
  8. url :endPointV3 + portalId + "/projects/" + projectId + "/tasks/" + taskId + "/status-timeline"
  9. type :GET
  10. connection:"connectionprojects"
  11. ];
  12. size = getTaskStatusTimeline.size() - 1;
  13. oldStatusName = getTaskStatusTimeline.get(size).get("previous_status").get("name");
  14. if(oldStatusName.containsIgnoreCase("Scheduled"))
  15. {
  16. teamName = "Compliance Team";
  17. userGroupsResponse = invokeurl
  18. [
  19. url :endPoint + portalId + "/projects/" + projectId + "/usergroups/"
  20. type :GET
  21. connection:"connectionprojects"
  22. ];
  23. teams = userGroupsResponse.get("userGroups");
  24. for each team in teams
  25. {
  26. if(team.get("groupObj").get("group_name").containsIgnoreCase(teamName))
  27. {
  28. teamId = team.get("groupObj").get("group_id");
  29. }
  30. }
  31. teamIds = List();
  32. teamIds.add(teamId);
  33. dependencyType = "FS";
  34. //Create Tasks parameters
  35. values_map = Map();
  36. values_map.put("name","Compliance Audit Verification");
  37. 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.");
  38. values_map.put("associated_teams",teamIds);
  39. //Invoke Create Task
  40. createTaskResponse = zoho.projects.create(portalId,projectId,"tasks",values_map,"connectionprojects");
  41. // Get TaskId From Task response
  42. if(createTaskResponse != null && createTaskResponse.get("tasks") != null)
  43. {
  44. taskInfo = createTaskResponse.get("tasks").get(0);
  45. newTaskId = taskInfo.get("id_string");
  46. // copy attachments to new task
  47. getAttachmentsResponse = invokeurl
  48. [
  49. url :endPointV3 + portalId + "/projects/" + projectId + "/attachments?entity_type=task&entity_id=" + taskId
  50. type :GET
  51. connection:"connectionprojects"
  52. ];
  53. if(getAttachmentsResponse.get("attachment").size() > 0)
  54. {
  55. taskAttachments = getAttachmentsResponse.get("attachment");
  56. for each attachment in taskAttachments
  57. {
  58. associateParam = Map();
  59. associateParam.put("entity_type","task");
  60. associateParam.put("entity_id",newTaskId);
  61. associateToTaskComment = invokeurl
  62. [
  63. url :endPointV3 + portalId + "/projects/" + projectId + "/attachments/" + attachment.get("attachment_id")
  64. type :POST
  65. parameters:associateParam
  66. connection:"connectionprojects"
  67. ];
  68. }
  69. }
  70. //Add Dependancy Between Tasks Parameter
  71. dependencyParam = Map();
  72. dependencyParam.put("taskid",newTaskId);
  73. dependencyParam.put("predids",taskId);
  74. dependencyParam.put("projId",projectId);
  75. dependencyParam.put("toupdate","dependencyset");
  76. dependencyParam.put("childprojId",projectId);
  77. dependencyParam.put("dependencytype",dependencyType);
  78. // invoke task dependency Api
  79. dependency = invokeurl
  80. [
  81. url :endPoint + portalId + "/projects/" + projectId + "/taskdependency/"
  82. type :POST
  83. parameters:dependencyParam
  84. connection:"connectionprojects"
  85. ];
  86. info dependency;
  87. info "-------------------------------------";
  88. }
  89. }
  90. return "success";
Info
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 TabNew 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.

If you have any questions, feel free to drop a comment below or reach out to us at support@zohoprojects.com.
    • Sticky Posts

    • Automation Series: Auto-create Dependent Task on Status Change

      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. In this post, we’ll walk through an easy setup using
    • Time Log Reminder

      Tracking the time spent on tasks and issues is one of the most important functions of a timesheet. However, users may forget to update the time logs because they have their own goals to achieve. But, time logs must be updated at regular intervals to keep
    • Introducing the Zoho Projects Learning Space

      Every product has its learning curve, and sometimes having a guided path makes the learning experience smoother. With that goal, we introduce a dedicated learning space for Zoho Projects, a platform where you can explore lessons, learn at your own pace,
    • Update on V2 API End-of-Life Timeline

      Dear Users, Earlier this year, we shared the launch of the V3 APIs and requested users to migrate from the older V2 APIs by December 2025. We have received valuable feedback from our users and partners regarding their migration timelines. We are happy
    • Automation Series: Auto-update Phase Status

      Hello Folks! You can auto-update your phase's status based on status of underlying tasks using custom functions. In this series, we will showcase how to create and run custom functions, using Deluge, with ease. Follow the steps below and automate your
    • Recent Topics

    • Timeline Tracking Support for records updates via module import and bulk write api

      Note: This update is currently available in Early Access and will soon be rolled out across all data centers (DCs) and for all editions of Zoho CRM. The update will be available to all users within your organization, regardless of their profiles or roles.
    • Shifts in Zoho People vs Zoho Shifts?

      Hello Zoho People Team, We hope you are doing well. We are evaluating the Shifts functionality within Zoho People and comparing it to the standalone Zoho Shifts product. We’ve encountered comments and discussions suggesting that the Shifts feature inside
    • Disable fields in During action in Blueprint?

      Hi there. I've tried field disable (setReadOnly(true)) using client script and the event is onMandatoryFormLoad on detail page, assuming it'll work on blueprint fields, but it bears no result. Is this the expected behaviour? That we can't do this yet?
    • Develop and publish a Zoho Recruit extension on the marketplace

      Hi, I'd like to develop a new extension for Zoho Recruit. I've started to use Zoho Developers creating a Zoho CRM extension. But when I try to create a new extension here https://sigma.zoho.com/workspace/testtesttestest/apps/new I d'ont see the option of Zoho Recruit (only CRM, Desk, Projects...). I do see extensions for Zoho Recruit in the marketplace. How would I go about to create one if the option is not available in sigma ? Cheers, Rémi.
    • Subforms and automation

      If a user updates a field how do we create an automation etc. We have a field for returned parts and i want to get an email when that field is ticked. How please as Zoho tells me no automation on subforms. The Reason- Why having waited for ever for FSM
    • Allow Managers to Create Shifts for Their Departments in Zoho People

      Hello Zoho People Product Team, Greetings and hope you are doing well. This feature request is related to Zoho People - please don't move it to zoho one! We would like to submit a feature request regarding shift management permissions in Zoho People.
    • Zoho Learn and Zoho CRM integration

      I would like to see an integration between Zoho Learn and Zoho CRM. 1. To be able to add articles in a related list in all modules 2. Zia to suggest related articles in a Deal or Case or Lead 3. Ability to read / search articles during a call / follow
    • Maintain steady traffic to your domain: How Domain Aliasing helps

      Consider this scenario: An organization has its primary domain as administrator.com. Now it wants to shorten its domain to admin.com because it's simpler and easier to remember. However, changing the domain completely can cause the following problems:
    • Why Sharing Rules do Not support relative date comparison???

      I am creating a Sharing Rule and simply want to share where "Last Day of Coverage" (Date field) is Greater than TODAY (Starting Tomorrow). However, sharing rules don't have the option to compare a date field to a relative date (like today), only to Static
    • Workflow rule only allows 10 workflow per module

      Apparently a Zoho professional edition only allows 10 workflow rules per module. This makes workflow allocation literally impossible while allocating potential to different members of the team. I have 15 licenses. Is there a way in which related alerts can be varied? In other words, is it possible to have different related alerts be triggered with different rule criteria. so if I say, if potential is 'x' then trigger related alert 'x' and if potential is 'y' then trigger related alert 'y' Thanks,
    • IF Statement in Zoho CRM Formula Field

      Hi, I am attempting to write a formula field that will give me one result if one statement AND another statement are true, then a different value if the first statement AND a different statement are true, else 0. Stated differently: if account = destination
    • CRM Percent custom fields: When will it show the % symbol and behave like %?

      1. Actually Percent custom fields fail to show the % symbol. 2. When in formulas Percent fields work like number: 100 x 5% = 5 ideal world 100 x 5% = 500 what happens actually 3. When importing Percent fields the % symbol has to be removed and the data
    • Editing the Ticket Properties column

      This is going to sound like a dumb question, but I cannot figure out how to configure/edit the sections (and their fields) in this column: For example, we have a custom "Resolution" field, which parked itself in the "Ticket Information" section of this
    • "Total Hours" on Employee Attendance Report

      I'm learning that in Zoho jargon, "total hours" does not include paid breaks. Or at least not the way that my setup is working. That seems a little weird to me, since most jurisdictions in the US don't differentiate between time spent on paid break and
    • Fixed assets in Zoho One?

      Hi, We use Zoho Books and have the fixed asset option in it. I started a trial for Zoho One and I do not see that as an option. Is the books that is part of zoho one equivalent to Zoho Books Elite subscription or is it a lesser version? Thanks, Matt
    • Integration with...

      Dear Zoho Commerce team, Please could you consider the integration within Zoho Commerce / Inventory and Qapla'? (https://www.qapla.it/en/) This app is better than Aftership in many ways: - Aftership integration require PRO plan and price start from more
    • Generate leads from instagram

      hello i have question. If connect instagram using zoho social, it is possible to get lead from instagram? example if someone send me direct message or comment on my post and then they generate to lead
    • Adding Markdown text using Zoho Desk API into the Knowledge Base

      Hi Zoho Community members, We currently maintain the documentation of out company in its website. This documentation is written in markdown text format and we would like to add it in Zoho Knowledge Base. Do you know if there is REST API functionality
    • Create case via email

      Good Afternoon, I have just registered and am taking a look around the system. Is it possible to create a case via email.  I.e. an employee/client/supplier emails a certain address and that auto generates the case which then prompts a member of staff
    • Need a Universal Search Option in Zohobooks

      Hello Zoho, Need a Universal Search Option in Zohobooks to search across all transactions in our books of accounts. Please do the needful Thanks
    • Locked Notebook

      Hi, I hadn't used my Notebook in some time and was refamiliarizing myself with it. I clicked a lock icon and now I can't unlock. When I hit the information or unlock icons I'm taken to a page with the notebook icon and a keyboard. When I type, nothing
    • Hide fields only for creation

      Hello, I'd like to hide some fields only during the creation of a contact in Zoho CRM. In fact I have some fields that are automatically calculated thanks to an automation, so when my users create a contact I don't want them to fill those fields. I know
    • Issues with Zoho Sheet in Mac

      I have downloaded the Zoho App from App Store but It is failing to Save As, Open & Download Operations. App Store
    • Weekly Sales Summary

      Is it possible to generate a weekly report in Zoho Books to show -$$ amount of estimates generated -# of estimates generated by Salesperson -$$ amount of Sales Orders created -$$ amount of Invoices generated
    • OpenAPI Specs are just plain wrong

      The provided yml files for generating the OpenAPI specs are absolutely riddled with errors and inconsistencies. From missing fields on the objects, to just incorrectly named resource objects. I'm having to go through and manually changing the spec to
    • Add Account column to Invoice screen

      Please show the account column on Invoice creation screen. It is an unnecessary step to have to click add additional info and then select the account for line item. Example : on the bill creation screen when entering description we can easily code it against an account. On the invoice screen it requires additional click. Adding the column on the Invoice screen will make it faster to enter transactions. We currently have 5-6 different accounts that we code line items against, You can imagine the extra
    • Custom Footer – Zoho Writer Document

      Hello everyone, I’m having an issue adding a custom footer in a Zoho Writer document. I would like to insert my company information (including a logo + address) in the footer. The problem is that when I add these elements, the main content of my pages
    • Report grouping

      I have added a grouping in a report but it is not working how i had expected. I wanted to group a summary on a field named Size but when i add the grouping the report is still showing me each record and making a summary at the bottom of the report. What
    • Social Media Simplified with Zoho Social: Preview your Instagram grid before posting

      For a platform like Instagram that relies on visual appeal, it's important that you plan your image and video content in a way that holds your audience's attention. Planning your grid ahead of time gives you the benefit of understanding how your posts
    • Error code 1000

      Can you please tell me why the following, occasionally causes this error via the api, not every time ?... zoho.books.updateRecord("salesorders",organizationID,salesorderID,{"template_id":"#################069","custom_fields":[{"label":"DelDate","value":"Tuesday,
    • VAT rates - exempt and out of scope

      Good Evening, UK based company here. I am a bit confused in respect of setting up VAT rates for exempt goods and services; at present I am simply leaving the VAT rate blank in the transactions in order to prevent any VAT appearing in the VAT return. When
    • How to loop through Multiple Upload and Display Actual File Name

      I have been reading the help on the File Upload Control and reviewed the Deluge help on files and I can not figure out how to loop through the uploaded files and do anything but get the automatically created file names. The code below will run but each
    • abou arattai

      I want to use the Arattai app for business purposes, so please convert my account to a business account.I have my own invoice app, and I want to link it with the Arattai app for direct messaging.
    • Configurable Zoho Cliq Notifications for Zoho People Alerts

      Hello Zoho People Product Team, Greetings and hope you are doing well. We would like to request an enhancement to Zoho People notifications, enabling a native delivery via Zoho Cliq with admin-level control, similar to the notification settings available
    • Looking back at Zoho Calendar in 2025

      Hello Zoho Calendar Community, As we step into a brand-new year, we’d like to take a moment to thank you for being an active and valued part of the Zoho Calendar community. Your trust, feedback, and continued engagement motivate us to keep evolving and
    • There was an error while connecting to GSTN

      I am trying to file GSTR1. Everything flows smoothly until I reach the final step of filing the return. After I enter the PAN and OTP for filing it raises the error "There was an error while connecting to GSTN"
    • Zoho Books Extension: What Happens If Custom Fields Already Exist?

      When developing Zoho Books extensions, what happens if the target Zoho Books organization already has a custom field with the same API name as one defined in the extension? I’m asking because we originally created an on-Books version of this functionality,
    • Internal Server Error (500) When Attempting to View Banking Transactions

      I am experiencing an Internal Server Error (500) when attempting to view transactions across all of my banking accounts. Despite multiple attempts to resolve this, I have received little more than runaround from support, and the issue remains unresolved.
    • How do I add a blank line to the Organisation Address Format?

      I'd like to have my VAT number, for example, shown prominently by having a clear gap between it and the address block above, but any blank lines in the address format get ignored in PDF outputs.
    • Automatic Invoice Number generation for createRecord

      Hello, while testing some custom Buttons in my Zoho Books application, I noticed that I get an error that previously did not occur. After some further digging I found that the automatic transaction numbering of invoices no longer work in my organization.
    • Next Page