Automation Series: Auto-update Phase Status

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 project management process.

Use-case

Consider a scenario where a sales representative manages all his customers conversations as tasks in Zoho Projects. To stay organised, he divides the year into four quarters and sets up one milestone for each.
He wants the milestone status to be updated automatically once all the tasks in a milestone are updated.

So, if every task in Q1 is marked In Progress, the milestone status should automatically be updated to In Progress. When all tasks are Completed, the milestone should also be completed.

Configuration Flow

To automate this process, the sales representative should
  1. Create custom status for tasks and milestones.
  2. Establish a connection.
  3. Create a custom function using Deluge.
  4. Define a Workflow Rule to set a trigger.

Create Custom Status:

Create a custom status by double-clicking the Status column name in the milestone and task list view.

Establish a connection:

A Connection is a secure and reusable authentication layer that lets your custom functions and integrations communicate with external services or other Zoho apps.
Users can select the relevant scopes to create a connection. Scopes for this particular use case are,

Zohoprojects.portals.all,
Zohoprojects.projects.all,
Zohoprojects.tasks.all,
Zohoprojects.milestones.all

Click here to learn how to establish a connection.

Create a custom function:

You don't need development expertise to execute this custom function. Zoho Projects manages the underlying execution. Simply add the function code, map the required inputs, and the system will run it automatically whenever the workflow is triggered.

Sample connection name - milestonestatus
Sample status name - In Review

Arguments required:

Arguments are variables or parameters that pass an input value to execute a custom function.


  1. //scopes: Zohoprojects.portals.all, Zohoprojects.projects.all, Zohoprojects.tasks.all, Zohoprojects.milestones.all
  2. endPointV3 = "https://projects.zoho.in/api/v3/portal/";
  3. endPoint = "https://projects.zoho.in/restapi/portal/";
  4. milestoneStatusIds = List();
  5. milestoneStatusNames = List();
  6. milestoneParameter = Map();
  7. statusName = "In Review";
  8. indexValue = 0;
  9. rangeValue = 100;
  10. taskStatusId = "";
  11. state = true;
  12. // Get task layout details
  13. taskLayoutDetailsResponse = invokeurl
  14. [
  15. url :endPoint + portalId + "/projects/" + projectId + "/tasklayouts"
  16. type :GET
  17. connection:"milestonestatus"
  18. ];
  19. statusDetails = taskLayoutDetailsResponse.get("status_details");
  20. for each status in statusDetails
  21. {
  22. if(status.get("name").notContains(statusName))
  23. {
  24. taskStatusId = taskStatusId + status.get("id") + ",";
  25. }
  26. }
  27. taskStatusId = taskStatusId.removeLastOccurence(",");
  28. taskResponse = zoho.projects.getRecordById(portalId,projectId,"Tasks",taskId,"milestonestatus");
  29. milestoneId = taskResponse.get("tasks").get(0).get("milestone_id");
  30. id_list = taskStatusId.toList(",");
  31. chunk_size = 4;
  32. count = 0;
  33. chunk = List();
  34. all_chunks = List();
  35. for each id in id_list
  36. {
  37. count = count + 1;
  38. chunk.add(id);
  39. if(count == chunk_size)
  40. {
  41. all_chunks.add(chunk);
  42. chunk = List();
  43. count = 0;
  44. }
  45. }
  46. if(chunk.size() > 0)
  47. {
  48. all_chunks.add(chunk);
  49. }
  50. for each sub_chunk in all_chunks
  51. {
  52. param = sub_chunk;
  53. // Get All Tasks
  54. taskParameter = Map();
  55. taskParameter.put("custom_status",param.toString());
  56. taskParameter.put("index",indexValue);
  57. taskParameter.put("range",rangeValue);
  58. taskParameter.put("milestone_id",milestoneId);
  59. tasks = zoho.projects.getRecords(portalId,projectId,"tasks",taskParameter,0,"milestonestatus");
  60. if(tasks.containKey("tasks"))
  61. {
  62. state = false;
  63. break;
  64. }
  65. }
  66. if(state)
  67. {
  68. // Get milestone layout details
  69. info "in";
  70. milestoneLayoutDetails = invokeurl
  71. [
  72. url :endPointV3 + portalId + "/projects/" + projectId + "/milestones/layouts"
  73. type :GET
  74. connection:"milestonestatus"
  75. ];
  76. milestoneCustomFieldDetails = milestoneLayoutDetails.get("section_details").get(0).get("customfield_details");
  77. for each milestoneCustomFieldDetail in milestoneCustomFieldDetails
  78. {
  79. if(milestoneCustomFieldDetail.get("api_name").equalsIgnoreCase("status"))
  80. {
  81. milestoneStatusIds = milestoneCustomFieldDetail.getJSON("picklist_details");
  82. milestoneStatusNames = milestoneCustomFieldDetail.getJSON("picklist_valuemap");
  83. }
  84. }
  85. // Milestone re-open status id
  86. indexOfReopen = milestoneStatusNames.indexOf(statusName);
  87. // Get milestone details
  88. milestoneResponse = zoho.projects.getRecordById(portalId,projectId,"milestones",milestoneId,"milestonestatus");
  89. if(milestoneResponse.containKey("milestones"))
  90. {
  91. milestoneStatusId = milestoneResponse.get("milestones").get(0).get("status_det").get("id");
  92. }
  93. else
  94. {
  95. return "Couldn't update status of none milestone";
  96. }
  97. if(milestoneStatusId != milestoneStatusIds.get(indexOfReopen))
  98. {
  99. milestoneParameter = Map();
  100. milestoneParameter.put("milestone_ids",{"" + milestoneId + ""});
  101. milestoneParameter.put("update_fields",{"CUSTOM_STATUSID":"" + milestoneStatusIds.get(indexOfReopen) + ""});
  102. updateMilestoneDetails = invokeurl
  103. [
  104. url :endPointV3 + portalId + "/projects/" + projectId + "/milestones/" + milestoneId + "/updatefieldvalue"
  105. type :POST
  106. parameters:toString(milestoneParameter)
  107. connection:"milestonestatus"
  108. ];
  109. info updateMilestoneDetails;
  110. }
  111. }
  112. return "success";

Define a Workflow Rule:

After creating the custom function, define a task-based workflow rule. Set the trigger as "when task is updated" and associate the custom function under Add Action.



Once the workflow rule is triggered, the custom function will update the phase status automatically.

We hope you found this post to be helpful. If you have any questions, please leave a comment below or email us at support@zohoprojects.com.


      • Sticky Posts

      • 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
      • Automate Timesheet Approvals with Multi-level Approval Rules

        Introducing Approval Rules for Timesheets in Zoho Projects. With this automation, teams can manage how timesheets are reviewed and approved by setting up rules with criteria and assigning approvers to handle submissions. Timesheet, when associated to
      • Accessibility Spotlight Series - 1

        Every user interacts with products differently, what feels intuitive to one may be challenging for another. Addressing this, accessibility is built into Zoho Project's design philosophy. This helps users navigate and perform actions with ease irrespective
      • Customize User Invites with Invitation Templates

        Invitation Templates help streamline the invitation process by allowing users to create customized email formats instead of sending a one-size-fits-all email. Different invitation templates can be created for portal users and client users to align with
      • Zoho Projects - Q3 Updates | 2025

        Hello Users, The final quarter of the year 2025 has begun, and we at Zoho Projects are all set with a plan. New targets to achieve and new milestones to reach, influenced by the lasting imprint of the past quarter. 2025's Q3 saw some new features and

        • Recent Topics

        • Tracking Snippet not working in Zoho Marketing Automation!

          First off, the fact that you have to wait about 12-24 hours for every response is terrible. How are we supposed to conduct business? Second, we have been trying for several days to get the Tracking Code Snippet in marketing automation to work, to no avail.
        • search and Smart Bar both missing in Mail

          One of the users on my account does not have the search bar at the top right or the Smart Bar at the bottom left of the desktop Mail app. Any ideas how to get those back?
        • Possible Fraud Site.

          Hello. I received a text with the sender's name as zoho, claiming that my account was at risk and that I should sign in at https://verify.zohomails.ru/signin to verify my account. I signed in on the web address above, and a few days later someone hacked
        • What's New in Zoho Analytics - November 2025

          We're thrilled to announce a significant update focused on expanding your data connectivity, enhancing visualization capabilities, and delivering a more powerful, intuitive, and performant analytics experience. Here’s a look at what’s new. Explore What's
        • ZOHO reporting DKIM entries are not configured, when they have been configured and verified by 3rd parties

          Why is ZOHO reporting to my organisation users the following: "The DKIM entries in your domain's DNS records are not configured. Please contact your administrator for configuring DKIM to ensure optimal RSVP invite delivery." When I have configured the
        • Manage Bookings directly from Zoho Mail

          Greetings from the Zoho Bookings team! We’re introducing the new Zoho Bookings extension for Zoho Mail, designed to help you view appointments, copy time slots and share booking links without leaving your inbox. This integration brings scheduling right
        • My notes from the past 2 months have disappeared

          Hola, necesito ayuda urgente. Hoy, al iniciar sesión en mi Zoho Notebook como todos los días, me llevé una gran sorpresa al descubrir que todas mis notas de los últimos dos meses habían desaparecido. Estas notas son muy importantes para mí, ya que uso
        • How can I load a network into the cliq desktop app?

          I have both the standard cliq log in for my org and I am part of a cliq network. In the browser I can choose which I log in to. However, in teh desktop app if I log in it will alwasy load my org's cliq. Can I switch this to the network I have create
        • Ability to modify what displays in calendar invite?

          I am a long time calendly user and want to make the switch to bookings.  I understand that there is not currently a meets/hangouts integration, is one on the roadmap? Is there anyway I can modify the calendar invite to include the meet link?  I can add it to the emails no problem, but I would also like it to display on their calendar.  Is there some work around I can do to get it on the calendar?  Also am I able to modify the calendar event title?
        • Issue with Booking Confirmation Page Not Displaying, Leading to Customer Anxiety and Unnecessary Support Calls

          I am writing to express my growing concern regarding the confirmation process in Zoho Bookings, particularly the inconsistent display of the confirmation page after a successful payment. As a mobile service provider, I rely on Zoho Bookings platform for
        • Is it possible to turn off all capabilities for a customer to schedule, reschedule or cancel an appointment?

          Is it possible to turn off all capabilities for a customer to schedule, reschedule or cancel an appointment? I would like to set it up so only staff can schedule appointments. Is this possible?
        • Is there a way to generate a virtual meeting for a group service in Zoho Bookings?

          Are virtual meetings not supported for group services/meetings? I have integrated Zoom with one-on-one services, but I need a way to create an online group meeting. Thanks
        • Introducing VeriFactu Support in Zoho Books

          Hello users, Spain has introduced the VeriFactu system under Real Decreto 1007/2023 to ensure integrity, traceability, and anti-fraud compliance in e-invoicing. Starting January 1, 2026, all B2B invoices must be reported to Agencia Estatal de Administración
        • Where we can change the icon in social preview

          Hi, we changed our logo, and the image that appear in preview (ex : when we post a appointment link somewhere) is still our old logo. I did change our logo in the org setting. https://bookings.zoho.com/app/#/home/dashboard/settings/basic-info?clview=false
        • Zoho Bookings changes Lead Source

          Hi. i would like to know if there's a way for Zoho Bookings to not change the lead source when booking a lead for an appointment as the lead source will be used in a report. Scenario: Lead source: Website after booking an appointment Lead source: Zoho Bookings Thanks. Dan
        • Need to set workflow or journey wait time (time delay) in minutes, not hours

          Minimum wait time for both Campaigns workflows and Marketing Automation journeys is one hour. I need one or the other to be set to several minutes (fraction of the hour). I tried to solve this by entering a fraction but the wait time data type is an integer
        • Suggestion: Associating Assets with Company in Zoho FSM

          Hello Team, I would like to share an idea based on practical experience. Currently, all assets in the Zoho FSM Asset module are linked to a specific contact person. I would like to know if it is possible to associate assets with a company instead. This
        • Zoho Inventory / Finance Suite - Extend Visibility of File Names on Attachment Fields

          Hi Inventory / Finance Suite team, I noticed recently that when you add an attachment field to a module in Inventory, only the first 8 characters of the file name are visible on the details view. 8 characters is not a useful amount and there is plenty
        • AI Interview Insights: Turn Recorded Interviews into Quick Transcripts & Summaries

          Evaluating interviews shouldn’t require replaying long recordings or taking manual notes. With AI Interview Insights, you can now review complete transcripts and AI-generated summaries of your One-way (Recorded) interviews right inside Zoho Recruit. This
        • Many Notes Becoming Unusable

          Hello. The Notebook app is becoming unusable. I'm getting odd-looking results from my searches. Some of the notes, after clicking on them, show an update button that does absolutely nothing. Not sure what has happened, but it would be nice to get this
        • Kaizen #218: Actions APIs - Field Updates

          Hello all!! Welcome back to a fresh Kaizen week. In the previous weeks, we covered Workflow Rules APIs, Actions APIs - Email Notification APIs, and Tasks Update APIs. This week, we will continue with another Actions API - the Field Update API in Zoho
        • How Contract Types and Templates Form the Backbone of Zoho Contracts

          Every contract in Zoho Contracts starts with two essential elements: Contract Type and Template. These are not just administrative steps. They define how every contract in your organization is created, governed, and managed over time. Let us look at the
        • E-Invoicing in Belgium with Zoho Books

          Starting January 1, 2026, Belgium is introducing mandatory electronic invoices (e-invoicing) for all B2B transactions between VAT-registered businesses. This means that invoices and credits notes must be exchanged in a prescribed digital format. How E-Invoicing
        • Zoho Books Finance Modules Not Accessible in Zoho CRM Mobile App

          We have integrated Zoho CRM with Zoho Books using the Zoho Finance Suite integration. In the CRM web version, we can see the Finance modules (Estimates/Quotes, Invoices, Sales Orders, Items, Payments) and are able to create invoices and quotes directly
        • Greek character in Deluxe script

          Hi, We have been using a script since 2022 which replaces characters in Greek contact names using replaceAll. Since this morning, all the Greek characters used in the script have turned to question marks. I tried retyping the characters, copy-pasting
        • CRM Related list table in Zoho analytics

          In Zoho Analytics, where can I view the tables created from zoho crm related lists? For example, in my Zoho CRM setup, I have added the Product module as a related list in the Lead module, and also the Lead module as a related list in the Product module.
        • Zoho Flow Credits

          Hi , I would like to ask the reason why every time I added plus credit but few days later I will return back to default? (as below I add credit to 3000 but today It change back to 1000) Most important is, when the credit fully used, not any reminder to
        • Zoho learn Custom portal - networkurl & CustomPortalId

          I want to get my individual account’s networkurl and customportalId to use in this API: https://learn.zoho.com/learn/api/v1/portal/<networkurl>/customportal/<customportalId>/manual How can I retrieve the networkurl and customportalId using the API? I
        • Connecting zoho creator to zoho writer to send prefilled documents

          i will paste the worflow below // Get user's submitted data from the form userSalary = input.Current_Salary; userCIBIL = input.CIBIL_Score; userEmail = input.Email; userName = input.Name; // You need to get the Document ID from the URL of your Zoho Writer
        • Zoho Creator to Zoho Writer for prefilled documents...

          In response to the question about connecting Zoho Creator to Zoho Writer for prefilled documents, I wanted to share a working implementation that demonstrates how to use the record_id parameter with the Zoho Writer Merge API. This allows Writer to automatically
        • WebDAV / FTP / SFTP protocols for syncing

          I believe the Zoho for Desktop app is built using a proprietary protocol. For the growing number of people using services such as odrive to sync multiple accounts from various providers (Google, Dropbox, Box, OneDrive, etc.) it would be really helpful
        • Managing functions

          Can someone let me know if there are any plans to improve the features for managing functions in CRM? I have lots of functions and finding them is hard. The search only works on the function name and the filter only works on function type. I have created
        • Introducing our latest privacy enhancement - Hiding email IDs in Zoho Cliq Networks

          Hello everyone, Zoho Cliq Networks offers a powerful collaboration platform that allows businesses to create dedicated digital workspaces for external vendors, partners, or individuals you want to communicate with professionally without adding them to
        • zoho performance

          OVERALL CONFIGURATION OF ZOHO PERFORMANCE Quarterly performance review Self rating and scoring Manager rating and scoring
        • Zoho Social API for generating draft posts from a third-party app ?

          Hello everyone, I hope you are all well. I have a question regarding Zoho Social. I am developing an application that generates social media posts, and I would like to be able to incorporate a feature that allows saving these posts as drafts in Zoho Social.
        • When will it be possible to edit Subform records via either views or tabular reports?

          Hey there, data maintenance often requires mass update of quite a lot of records. While this is a piece of cake via either List view or Zoho sheet view, the same cannot be carried out for subform records yet. When one of the two options will be made available?
        • Onboarding

          Hello Team, Im yuktha working as HR at Ossisto Technologies. We are currently utilizing zoho for onboarding candidate. right now facing issue with onboarding Attaching the screenshots for your reference
        • Archiving Contacts

          How do I archive a list of contacts, or individual contacts?
        • How do I change a form's name? Why isn't this more intuitive?

          Can someone please let me know how to change a form's name?
        • Control Over Zia Generative AI Reply Assistance Behavior

          Hello, I would like to request an enhancement to the Zia Generative AI feature, specifically concerning the Reply Assistance within Zoho Desk. Current Issue: When replying to a ticket, the Ticket Properties section is automatically replaced by the Zia
        • Next Page