Power of Automation:: Automate the process of creating checklist upon task creation.

Power of Automation:: Automate the process of creating checklist upon task creation.

Hello Everyone,

A Custom Function is a user-written set of code to achieve a specific requirement. Set the required conditions needed as to when to trigger using the Workflow rules (be it Tasks / Project) and associate the custom function to it.

Requirement:-

One of our customers wanted to add a specific checklist from the checklist template upon Task creation. This was successfully implemented using Task custom function in Zoho Projects. Please refer this link to know more about checklist extension. 
 
Custom function code:-
 

// extension > settings > url id = app_id
// scopes: ZohoProjects.entity_properties.ALL and ZohoProjects.extension_properties.ALL
endPoint = "https://projects.zoho.com/restapi/portal/";

checklistName = "checklist name";
// replace with your checklist name
appId = "YYYYY";
// replace with your app id
getAllChecklist = invokeurl
[
url :endPoint + portalId + "/extensions/properties/retrieve?app_id=" + appId + "&property_key=templatesTitle"
type :GET
connection:"XXXXX"
];
values = getAllChecklist.get("properties").get(0).get("value").toCollection();
for each value in values
{
if(value.get("value").containsIgnoreCase(checklistName))
{
templateId = value.get("template_id");
}
}
getParticularChecklist = invokeurl
[
url :endPoint + portalId + "/extensions/properties/retrieve?app_id=" + appId + "&property_key=" + templateId
type :GET
connection:"XXXXX"
];
values = getParticularChecklist.get("properties").get(0).get("value").toCollection();
childObject = Map();
childObject.put("ListID",templateId);
childObject.put("value",checklistName);
childObject.put("view","fullView");
childObject.put("templateId",templateId);
childArray = List();
childArray.add(childObject);
object = Map();
object.put("Checklist_Titles_Store",childArray);
object.put("count",1);
parentArray = List();
parentArray.add(object);
param = Map();
param.put("app_id",appId);
param.put("entity_id",taskId);
param.put("entity_type","1");
param.put("project_id",projectId);
param.put("property",parentArray);
storeInEntity = invokeurl
[
url :endPoint + portalId + "/entity/properties/store"
type :POST
parameters:param
connection:"XXXXX"
];
param.clear();
childArray.clear();
for each value in values
{
childObject = Map();
childObject.put("completed","false");
childObject.put("who","");
childObject.put("time","");
childObject.put("id",value.get("id"));
childObject.put("title",templateId);
childObject.put("value",value.get("value"));
childArray.add(childObject);
}
object.clear();
object.put("Checklist_Items_Store",childArray);
parentArray.clear();
parentArray.add(object);
param.put("app_id",appId);
param.put("entity_id",taskId);
param.put("entity_type","1");
param.put("project_id",projectId);
param.put("property",parentArray);
storeInEntity = invokeurl
[
url :endPoint + portalId + "/entity/properties/store"
type :POST
parameters:param
connection:"XXXXX"
];
return "success";

 
 
Ensure that XXXXX  in the above code is replaced with the Zoho OAuth connection link name, including the scope ZohoProjects.entity_properties.ALL and ZohoProjects.extension_properties.ALL. Refer to this link for guidance on creating the connection.
 
Additionally, replace YYYYY with the checklist app ID and checklist name in line 4. A sample screenshot is attached for reference on fetching the app ID.
 
Please find the screenshots of the parameters to be mapped and sample Task workflow rules.

We hope you found this post useful. If you have any questions, feel free to share them in the comments below.


    • 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