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

    • Cannot see Application from Lookup field

      Hi all, I am trying to access data for an application on our account via a lookup field; however, the application doesn't appear in the dropdown at all. Can anyone shed any light on this, please? I have asked Zoho support; however, they're just as confused,
    • Zoho CRM Meetings Module Issues

      We have a use-case that is very common in today's world, but won't work in Zoho CRM. We have an SDR (Sales Development Rep) who makes many calls per day to Leads and Contacts, and schedules meetings for our primary Sales Reps. He does this by logging
    • Zoho Books integration sync from Zoho CRM does not work

      Hi Zoho Community & Zoho Support We just tried to get a sync some products into Zoho Books from CRM using the native sync and we're getting an error: "It looks like some mandatory fields you're trying to map are empty. Please provide valid field names
    • Disable Auto Send Email Notification in Invoice Creation

      Here is what I am facing Make payment via Razor Pay (All Good) Capture payload data on my webapp Send this data, along with other data to Zoho books to create the invoice However in this step - An email goes to the client + The Invoice remains as draft
    • P & L Sub-categorized accounts

      How can I show sub-categorized Income and Expense accounts on the P & L report?
    • Report showing Bill Details with Project and Sales Invoice Number

      Hi There, I am hoping that someone can help, I am looking for report that can show the bill and expense details along with project its as assigned to and the invoice number that the sales has been raised in. The goal is I can filter a customer/project
    • Advanced Payment for Inventory Items with serial numbers

      Hello, We sell equipment that we track the unique serial numbers on using Sales Orders. We can charge the customers an advanced payment, then the balance on delivery. We cannot figure out a way to do this in Books/Inventory: - Cannot part invoice a SO
    • Is it possible to restrict ZCRM user to see only custom views created by administrator

      I have segmented data in my CRM and I want to allow different users to be able to see only parts of it based on some criteria. I've tried to create and share a custom view, but then there is always an option for user to see all open lead for example.
    • Issues Logging into ZOHO

      Hello, one of my coworkers is having issues logging into ZOHO, she has requested a code when entering and the email is correct but she has not received the code. can you help us with this?
    • Google Fonts Integration in Pagesense Popup Editor

      Hello Zoho Pagesense Team, We hope you're doing well. We’d like to submit a feature request to enhance Zoho Pagesense’s popup editor with Google Fonts support. Current Limitation: Currently, Pagesense offers a limited set of default fonts. Google Fonts
    • Add Popup Rejection Metrics to Reports

      Hello Zoho PageSense Team, We would like to request improved reporting for popup interactions. Current Limitation: PageSense currently provides conversion data, but there is no clear visibility into: Popup rejections Popup closes (✕ button clicks) Dismissals
    • Ability to Reset / Reinitialize Popup Cookies

      Hello Zoho PageSense Team, We would like to request the ability to manually reset popup cookies. Current Limitation: At the moment, it is not possible to initiate a new popup cookie from the our side. Visitors who rejected or closed a popup will not see
    • Control Popup Cookie Expiration Duration

      Hello Zoho PageSense Team, We would like to request an enhancement related to popup cookie management. Current Limitation: Currently, PageSense popup cookies remain active for 365 days, and this duration cannot be modified by us. If a visitor closes or
    • Clone / Export Popup Design Across PageSense Projects

      Hello Zoho PageSense Team, We hope you’re doing well. We would like to request an enhancement that allows popup designs to be reused across different PageSense projects. Problem Statement: Currently, Zoho PageSense allows popups to be duplicated only
    • Are there settings for hyperlinks?

      Clicking a hyperlinked cell in Sheet creates this little pop-up with the actual hyperlink inside. Is it possible to have a 1-click link where if you click the cell it opens the link directly with no pop-up?
    • Automatically include all ticket attachments in the ticket resolution email

      Hello Zoho Community, We are implementing Zoho Desk in a real customer-facing production environment and have run into a limitation that is becoming a blocking requirement for our clients. The problem When a ticket is closed or resolved, Zoho Desk sends
    • Keep Zoho People Feature Requests in the Zoho People Forum

      Hello Zoho People Product Team, Greetings. We would like to submit a feature request regarding the handling of feature requests themselves, specifically for Zoho People. Issue: Feature Requests Being Moved to Zoho One Zoho People feature requests are
    • Can I write a check in Zoho Books with no associated bill?

      This currently does not seem possible, and I have a client that desperately needs this function if I am able to convert them with Quickbooks. Thank you in advance for your reply. 
    • Finding text within a ticket: Expand All or Search this Ticket

      The auto-collapse feature within a ticket is nice for screen scrolling, however it makes it difficult to find text within the ticket if the email is collapsed. In fact you cannot find text if it is collapsed. I would like to propose a feature that allows
    • Books & Desk. Client mapping

      Hi, I’ve been using Zoho Books for several years and am now looking to improve my customer service. I'm experimenting with Zoho Desk and want to sync and map my client data from Zoho Books. However, it seems that mapping requires both contacts to have
    • String handling

      If I cut a currency string from a quote and try and paste it into the Deal "Amount", it will fail unless I manually delete any commas. Dollar signs are no problem, but comma's seem to fail. Please correct this Input Validation error.
    • Allow Stripe Credit Card and Stripe ACH payment methods to be enabled separately on an invoice.

      I need to be able to pick at the invoice level whether Stripe Credit Card and/or Stripe ACH payment methods are available. Currently, I'm not able to select from the two Stripe payment methods individually on an invoice. However, there are some larger
    • SKUs for Invoices, POs, etc.

      It doesn't appear that one can enable SKU display on invoices, POs, etc. This is problematic, and I don't see a good reason why this shouldn't be an option. Some of our vendors and customers use this in their system. Every other identifier code is available
    • Feature Request - Allow Customers To Pick Meeting Duration

      Hi Bookings Team, It would be great if there was an option to allow customers to pick a duration based on a max and minimum amount of time defined by me and in increments defined by me. For example, I have some slots which are available for customers
    • YouTube Live streaming? how to? Zoom has this feature, built-in. Can't find it on zoho meetings.

      YouTube Live streaming? how to? Zoom has this feature, built-in. Can't find it on zoho meetings.
    • Feature Request - A Way To Search Item Groups

      Hi Inventory Team, I can't find any way to filter or search by fields of Item Groups. It would be great to see that functionality added. I have a use case where a single product might come from 5 or more suppliers and each supplier's item is an Item in
    • Feature Reqeust - Include MPN In Selectable FIelds

      I have noticed that the MPN is not available to show in the list view of Items. Please consider adding it as EAN, UPC and ISBN are all available, so it doesn't make much sense to exclude this similar option. Thanks for considering my feedback.
    • Feature Request - Option To Hide Default System Fields on Items

      Hi Zoho Inventory Team, As far as I know it is not possible to hid some of the defult system fields on Items, such as UPC, MPN, EAN, ISBN. A good use case is that in many cases ISBN is not relevant and it would be an improved user experience if we could
    • Campaigns does not work!

      I am running into so many problems trying to use Zoho Campaigns, that I am seriously considering dropping the app from my (shrinking) list of Zoho applications I actually use. Apart from having to fight the software trying to create a design and email,
    • Feature Request - Make Available "Alias Name" Field In Item List View

      Hi Zoho Inventory Team, I have noticed that the "Alias Name" field does not appear on the list of selectable columns in the Customise Columns feature in the Items module. This would be very useful to see for businesses who are using the Alias Name field
    • product name field issue-n8n

      Hey guys, I have a question. I want to create a new product using the workflow. The problem is with the product name field; I don't know how to fill it in. The workflow starts with retrieving information from the leads table, retrieving links to scrape
    • How to filter Packages in zoho inventory api

      Hi Team, I want to perform some tasks in a schedular on the packages which are in "Shipped" state. I tried to use filter_by in my api call but in return I get response as {"code":-1,"message":"Given filter is not configured"} My Api request is as follows
    • CRM

      Is anyone else experiencing this issue? Our company is not moving out of using Gmail's web app. It just has more features and is a better email program than Zoho Mail. Gmail has an extension (Zoho CRM for Gmail) that we're using but we've found some serious
    • Syncing with Google calendar, Tasks and Events

      Is it possible to sync Zoho CRM calendar, task and events with Google Calendar's tasks and events. With the increasing adoption by many major tool suppliers to sync seamlessly with Google's offerings (for instance I use the excellent Any.do task planning
    • How can i view "Child" Accounts?

      It can be very useful in our field of business to know the parent-child account relationship. However, there seems to be a shortcoming in the parent account view: no child account list. How can we view the child accounts per each account?
    • Ability to assign Invoice Ownership through Deluge in FSM

      Hi, As part of our process, when a service appointment is completed, we automated the creation of the invoice based on a specific business logic using Deluge. When we do that, the "Owner" of the invoice in Zoho FSM is defaulted to the SuperAdmin. This
    • Easily perform calculations using dates with the new DATEDIF function

      Hey Zoho Writer users! We've enhanced Zoho Writer's formula capabilities with the new DATEDIF function. This allows you to calculate the difference between dates in days, months, and years. Function syntax: =DATEDIF(start_date, end_date, unit) Inputs:
    • Adding Comments Using Workflows - How to Change User Attributed

      We have worklflows in Desk where a comment is added to a ticket based on certain criteria. It seems that the comment added is always attributed to the user who last edited the workflow. This does not make sense for us because: - It's misleading to other
    • Add Attachment Support to Zoho Flow Mailhook / Email Trigger Module

      Dear Zoho Support Team, We hope you are well. We would like to kindly request a feature enhancement for the Mailhook module in Zoho Flow. Currently, the email trigger in Zoho Flow provides access to the message body, subject, from address, and to address,
    • Conect chat of salesiq with zoho cliq

      Is there any way to answer from zoho cliq the chat of salesiq initiated by customers?
    • Next Page