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

    • Problem Adding Facebook Account

      Hi, I'm new here, I'm having trouble setting up my Facebook account as a social channel. I think the issue is down to how my Facebook is set up, which is pretty confusing. I have a personal Facebook account (let’s called it A) which is my main Facebook
    • Zoho Desk Teams App is not loading

      Hi Zoho Desk support. Need an assistance on the Zoho Desk Teams app. Once I click View Ticket, it isn't showing anything. Kindly refer to attached: ZohoDesk Teams App_View Ticket Error.jpg For our Dashboard, we are still experiencing the same issue. Kindly
    • About Meetings (Events module)

      I was working on an automation to cancel appointments in zoho flow , and in our case, we're using the Meetings module (which is called Events in API terms). But while working with it, I'm wondering what information I can display in the image where the
    • Zoho People - Retrieve the Leave Details - get("LeaveCount")

      Hi, Zoho People I need to collect all of an employee's leave requests for the calendar year and check how many half-days they have taken. If I run the script on the query he just modified, I can retrieve the information related to that query and use the
    • Mapping a new Ticket in Zoho Desk to an Account or Deal in Zoho CRM manually

      Is there any way for me to map an existing ticket in Zoho desk to an account or Deal within Zoho CRM? Sometimes people use different email to put in a ticket than the one that we have in the CRM, but it's still the same person. We would like to be able
    • Which WhatsApp API works seamlessly with Zoho CRM?

      I’m exploring WhatsApp API solutions that integrate seamlessly with Zoho CRM for customer communication, lead nurturing, and automation. I would love to hear insights from those who have successfully implemented WhatsApp within Zoho CRM. My Requirements:
    • Allow people to sign a zoho form by using esign or scanned signature

      Allow people to sign a zoho form by using esign or scanned signature
    • Button to Reapply Filters on Sheet(s)

      I wrote a macro that I attached to a button to reapply the filters on all my sheets and it says it works, but it doesn't actually do anything. What is wrong with it? Is there another way? Or even make it work for one sheet? Sub UniversalFilterRefresh()
    • Integrate Multiple ZohoBooks organization with zoho projects

      We have successfully connected our Zoho Books with Zoho Projects for synronizing timesheet data. Our Business specialty is, that the staff of the Main company (A) is working on several projects, but the Clients are sometimes contracted and paying to a
    • Zoho OAuth Connector Deprecation and Its Impact on Zoho Desk

      Hello everyone, Zoho believes in continuously refining its integrations to uphold the highest standards of security, reliability, and compliance. As part of this ongoing improvement, the Zoho OAuth default connector will be deprecated for all Zoho services
    • Flexible Partial-Use Coupons (Stored Value Credits)

      Subject: Feature Request: Ability for users to apply partial coupon balances per transaction Problem Statement Currently, our coupons are "one-and-done." If a user has a $50 coupon but only spends $30, they either lose the remaining $20 or are forced
    • Unable to Assign Multiple Categories to a Single Product in Zoho Commerce

      Hello Zoho Commerce Support Team, I am facing an issue while assigning categories to products in Zoho Commerce. I want to assign multiple categories to a single product, but in the Item edit page, the Category field allows selecting only one category
    • How do I add todays date to merge field

      I don't see any selection of todays date when creating a letter. Surely the date option of printing is standard? John
    • Add RTL and Hebrew Support for Candidate Portal (and Other Zoho Recruit Portals)

      Dear Zoho Recruit Team, I hope you're doing well. We would like to request the ability to set the Candidate Portal to be Right-to-Left (RTL) and in Hebrew, similar to the existing functionality for the Career Site. Currently, when we set the Career Site
    • Tracking Emails sent through Outlook

      All of our sales team have their Outlook 365 accounts setup with IMAP integration. We're trying to track their email activity that occurs outside the CRM. I can see the email exchanges between the sales people and the clients in the contact module. But
    • Whats that

      Price?
    • The same Contact associated to multiple Companies - Deals

      Hi, I would like to know if there is an option to associate the same contact with multiple companies (two or more) deals, using the same contact details for all. This is because we have contacts who are linked to different companies or branches of the
    • Portals-Adjust Column Sizes

      I am trying to adjust the column widths in Portals tabs. Columns that don't need to be wide are wide and longer ones are very short. I thought adding more to the digits box in Edit would widen them, but it doesn't. Anyone know how to adjust these?
    • Add link/button to open approved record from approval list and detail views?

      Hi, How do I allow users to click on an approval record and open that submission? For example, userA submits a quotation then userB approves/rejects. They both can see the quotation on "completed task" list & detail views, but there's no way for them
    • record submitted from creator and invoice is creating in books , but the workflow of books is not tiggering on create of record in books

      record submitted from creator and invoice is creating in books , but the workflow of books is not tiggering on create of record in books headermap = Map(); headermap.put("X-ZOHO-Execute-CustomFunction","true"); response_inv = invokeurl [ url :"https://www.zohoapis.com/books/v3/invoices/fromsalesorder?salesorder_id="
    • Prevent editing of a record after getting approved/rejectedr

      Hi, I'd like to block any user from editing a record after it was approved or rejected, how can I do that?
    • Formula Field/Campo de Fórmula

      Hello everyone, I have a purchase requisition form in which each department submits a request, and the request is automatically routed to the person responsible for that department. In this form, I have several fields with the following link names: Quantidade1,
    • Free Webinar: Zoho Sign for Zoho Projects: Automate tasks and approvals with e-signatures

      Hi there! Handling multiple projects at once? Zoho Projects is your solution for automated and streamlined project management, and with the Zoho Sign extension, you can sign, send, and manage digital paperwork directly from your project workspace. Join
    • Formatting Problem | Export to Zoho Sheet View

      When I export data to Zoho Sheet View, ID columns are automatically formatted as scientific notation. Reformatting them to text changes the actual ID values. For example, 6557000335603071 becomes 6557000335603070. I have attached screenshots showing this
    • Introducing Workqueue: your all-in-one view to manage daily work

      Hello all, We’re excited to introduce a major productivity boost to your CRM experience: Workqueue, a dynamic, all-in-one workspace that brings every important sales activity, approval, and follow-up right to your fingertips. What is Workqueue? Sales
    • Feature Request - The Ability to Link A Customer with a Vendor

      Hi Finance Suite Team, Many businesses buy and sell products from the same companies or individuals. For example, a car sales business may buy a car from a member of the public, and that member of the public may also buy a new car from us. This makes
    • Long table name (sync from Zoho Creator)

      Dears, How can I remove the suffix in parentheses? These tables are synced from Zoho Creator and are treated as system tables, so their names cannot be changed. This issue makes the aggregation formulas look awful.
    • [Free Webinar] Learning Table Series - Streamlining incident management process with Zoho Creator

      Hello everyone, We’re excited to invite you to another edition of the Learning Table Series webinar. As you may already know, we've moved to a purpose-based approach in the Learning Table Series this year. Each session now focuses on how a Zoho Creator
    • Unattended - Silent

      How can I hide the tray icon / pop up window during unattended remote access for silent unattended remote access?
    • Importing into Multiselect Picklist

      Hi, We just completed a trade show and one of the bits of information we collect is tool style. The application supplied by the show set this up as individual questions. For example, if the customer used Thick Turret and Trumpf style but not Thin Turret,
    • Text snippet

      There is a nice feature in Zoho Desk called Text Snippet. It allows you to insert a bit of text anywhere in a reply that you are typing. That would be nice to have that option in Zoho CRM as well when we compose an email. Moderation Update: We agree that
    • Marketing Tip #18: Make your online store mobile-friendly to improve traffic

      Most online shoppers browse on their phones first. If your store is hard to read, slow to load, or tricky to navigate on mobile, they’ll bounce fast. A mobile-friendly store doesn’t just look nice; it improves engagement, reduces drop-offs, and helps
    • [Need help] Form closed. Please contact your form administrator for further assistance.

      https://forms.zohopublic.com/cceinfoifly1/form/CCE2025CCEFocusGroupRegistrationForm2025Fall/formperma/s_8XcLETTbFxZ_TAS4r_W6W5UBl8o5oxEnIX35IBKg4 I checked we didn't exceed the usage limit and form availability is enabled, Please help us enable this form
    • Zoho People. Updating TabularData

      I am trying to update tabular data in the record. I always have the same response. I have checked many times. Section ID is correct. May be something wrong with request structure itself. Can someone help me. Body content type: form urlencoded query params
    • Automatically CC an address using Zoho CRM Email Templates

      Hi all - have searched but can't see a definitive answer. We have built multiple email templates in CRM. Every time we send this we want it to CC a particular address (the same address for every email sent) so that it populates the reply back into our
    • Unable to Send Different Email Templates for Different Documents in Zoho Sign

      Hello Zoho Community, I am facing a limitation with Zoho Sign regarding email notifications sent to customers when a document is sent for signing. Currently, whenever I send any template/document for signing, the email notification that goes to the customer
    • Reminder needs 0 minute choice

      I most use 0 minute reminders.  Every other calender service has this choice.  If I create an event in my Android calendar with 0 minute reminder it will change to 5 minute.  Please ad 0 as a reminder choice, this should be a 5 minute fix.  Thanks.
    • Customer ticket creation via Microsoft Teams

      Hi all, I'm looking to see if someone could point me in the right direction. I'd love to make it so my customers/ end users can make tickets, see responses and respond within microsoft teams. As Admin and an Agent i've installed the zoho assist app within
    • Is there a way to update all the start and end dates of tasks of a project after a calendar change?

      Hi! Here's my situation. I've built a complete project planning. All its tasks have start dates and due dates. After completing the planning, I've realized that the project calendar was not the right one. So I changed the project calendar. I now have
    • How to update task start date when project start date changes?

      Hi there, When the start date of a project changes, it's important to update the start dates of the tasks associated with that project to reflect the new timeline. Is there a way to shift the start date of all project tasks when the start date of a project
    • Next Page