Power of Automation :: Dynamically generate Tasklists based on values selected in Task Custom Fields

Power of Automation :: Dynamically generate Tasklists based on values selected in Task Custom Fields

Hello Everyone,


A custom function is a software code that can be used to automate a process and this allows you to automate a notification, call a webhook, or perform logic immediately after a workflow rule is triggered. This feature helps to automate complex tasks and calculations. 


Lets take the below use case from a customer - 


A custom field named ‘Category’ has been created within the Tasks module. This field contains values that correspond directly to the names of the task templates available in the portal.

In every project, there is a predefined task called ‘Development’. Depending on the value selected in the ‘Category’ field of this Development task, a tasklist should be automatically generated. This tasklist will be created by applying the task template that matches the value specified in the custom ‘Category’ field.

This automation ensures that the appropriate task template is used to create the tasklist without requiring manual selection, streamlining project setup and maintaining consistency across all projects.

This can be accomplished using the features Custom Functions & Workflow Rules. Create a connection using the scopes “ZohoProjects.tasklists.ALL, ZohoProjects.tasks.ALL" and update the connection name ‘projects’ in the below code. Find the attached screenshot of the Arguments & Workflow.

Below is the code
if(tasklist_picklist == null)
{
	return "No value selected";
}
else
{
	info tasklist_picklist;
	tasklists = tasklist_picklist.toList();
}
endpoint = "https://projectsapi.zoho.com/";
getAllTasklists = invokeurl
[
url :endpoint + "api/v3/portal/" + portalId + "/projects/" + projectId +
 "/tasklists"
type :GET
connection:"projects"
];
// info "getAllTasklists : "+getAllTasklists;
for each  tasklist in getAllTasklists.get("tasklists")
{
	tasklistName = tasklist.get("name");
	if(tasklists.contains(tasklistName))
	{
		tasklists.remove(tasklists.indexOf(tasklistName));
		info tasklistName + " removed";
	}
}
info " tasklists : " + tasklists;
taskTemplateResponse = invokeurl
[
	url :endpoint + "api/v3/portal/" + portalId + "/templates/tasklists"
	type :GET
	connection:"projects"
];
if(taskTemplateResponse.containKey("task_list_templates"))
{
	templates = taskTemplateResponse.get("task_list_templates");
	templateMap = Map();
	for each  template in templates
	{
info "Template Name : " + template.get("name") + "-------- >  Id : 
"+ template.get("id");
	if(tasklists.contains(template.get("name")))
	{
		templateMap.put(template.get("name"),template.get("id"));
	}
	}
}
info templateMap;
for each  template in templateMap
{
// info template;
taskTemplateId = template;
associateTaskTemplateParameter = Map();
associateTaskTemplateParameter.put("task_template_id",taskTemplateId);
associateTaskTemplateParameter.put("shift_days",toString
(zoho.currenttime,"YYYY-MM-dd'T'HH:mm:ss") + "Z");
associateTaskTemplateResponse = invokeurl
[
url :endpoint + "restapi/portal/" + portalId + "/projects/" + projectId +
 "/tasklists/"
type :POST
parameters:associateTaskTemplateParameter
connection:"projects"
];
	info associateTaskTemplateResponse;
}
return "success";


Creating custom functions in Zoho Projects is straightforward and well-documented. Zoho provides a range of built-in functions that you can use as a starting point, and you can also easily define your own functions using Zoho's scripting language, Deluge. Give it a try and see how it can save your time and boost your productivity!

 

Watch this space for more such custom function codes. 

    • Sticky Posts

    • 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-assign Task Followers

      As task progresses, several users are required to stay aware of the updates to plan their upcoming work items efficiently. Manually adding users as followers for an active task might create additional overhead. With this automation, followers can be added
    • WhatsApp Business Integration for Zoho Projects

      Delivery channel plays a decisive role in how quickly certain project updates translate into immediate actions. A release is ready to go live. An issue is marked critical. An approval is pending. These moments are less about tracking and more about timely
    • Enhanced Collaboration and Global Web Tabs

      Hello Users, We are rolling out two key enhancements in Zoho Projects that will be part of our November release. Here’s what to expect: 1. Collaboration Section in the Left Navigation Panel What’s new? All communication and interactive tools will be grouped
    • Choosing the Right Automation in Zoho Projects

      In any project, different types of actions are needed at different points. Some projects require control on how tasks move, some require reacting to updates, and some require executing additional actions beyond the task. Automation in Zoho Projects is
    • Recent Topics

    • Canva Integration

      Hello! As many marketing departments are streamlining their teams, many have begun utilizing Canva for all design mockups and approvals prior to its integration into Marketing automation software. While Zoho Social has this integration already accomplished,
    • Feature Suggestion for Zoho Social: Auto-reply to Comments or Keywords

      Hi Zoho team, I'd like to suggest a very specific feature that would be extremely helpful for customer engagement: the ability to automatically send a reply to comments on posts — either all comments or those containing specific keywords. For example,
    • Bring more clarity to your blueprints with color-coded transitions

      As your hiring processes evolve, blueprints naturally become more detailed. When multiple transitions connect different stages, it can take extra effort to identify approvals, rejections, reviews, and other actions at a glance. With this enhancement,
    • Zoho CRM gets a new email compose and lot more

      Dear Customers,  [UPDATE October 21, 2021: We have started opening these features to some of the customers already. And, it will be available to all the customers before November 2nd Week, 2021. Sorry for the delay caused]  [UPDATE February 21, 2022:
    • Create modules using natural language prompts

      Hello all, We’ve introduced a new enhancement to Zia that allows you to create custom and team modules in Zoho CRM using plain language prompts. Why this enhancement? Creating a custom module traditionally involves multiple steps—choosing field types,
    • Automatic Matching from Bank Statements / Feeds

      Is it possible to have transactions from a feed or bank statement automatically match when certain criteria are met? My use case, which is pretty broadly applicable, is e-commerce transactions for merchant services accounts (clearing accounts). In these
    • How emojis shape customer conversations

      World Emoji Day is celebrated on July 17. Did you know that this date was inspired by the 📅 calendar emoji, which shows July 17 on most platforms? What started as a detail in the emoji's design has turned into a global celebration of these tiny emoticons.
    • Custom Button Creation from Layout Editor in Zoho CRM

      Hello All, Buttons in Zoho CRM act as triggers that perform a specific action when clicked. Zoho CRM includes a set of system buttons that help you carry out common actions with a single click. Beyond these, your organization can create custom buttons
    • Displayed sample tracking for multi branch setup.

      We have multiple branches and one of the biggest challenges for us to be able to track if a particular item is in display or not. I am shooting in the dark but I am wondering if there is a solution for the following : Each product used for display is
    • Using IMAP configuration for shared email inboxes

      Our customer service team utilizes shared email boxes to allow multiple people to view and handle incoming customer requests. For example, the customer sends an email to info@xxxx.com and multiple people can view it and handle the request. How can I configure
    • Introducing Bulk Attachment Download from List View

      We're excited to introduce an update to attachment management in Zoho Recruit that lets you download attachments associated with selected records directly from the List View page of any module. How do I download attachments in bulk? You can now select
    • Advanced Group Settings: Customize and manage your email groups in Zoho Mail

      Email groups in your organization often require more than basic configurations to function effectively. With Zoho Mail's Advanced Group Settings, administrators can configure and manage policies, notifications, and more with greater precision. This gives
    • "code":3001 ["Failed to update data."]

      I would like to seek your expertise - I might be wrong on my approach also.. I highly appreciate your advice. 1 problem remains is when a new row was added on the existing one [from another form that trigger upon Successful form submission ], it gets
    • CRM gets location smart with the all new Map View: visualize records, locate records within any radius, and more

      Hello all, We've introduced a new way to work with location data in Zoho CRM: the Map View. Instead of scrolling through endless lists, your records now appear as pins on a map. Built on top of the all-new address field and powered by Mappls (MapMyIndia),
    • Workdrive on Android - Gallery Photo Backups

      Hello, Is there any way of backing up the photos on my android phone directly to a specific folder on Workdrive? Assuming i have the workdrive app installed on the phone in question. Emma
    • Auto sync Photo storage

      Hello I am new to Zoho Workdrive and was wondering if the is a way of automatically syncing photos on my Android phone to my workdrive as want to move away from Google? Thanks
    • List of Mail Merge Templates via Deluge

      Hello, Is it possible to get a list of the mail merge templates I've created in CRM within a custom function? I want to retrieve them and put them in a dropdown list but all I get is a scopes error! Can anyone see where I'm going wrong? Is this even possible?
    • Feature Request Improve parent-child relationship visibility

      Hi team, The Parent-Child ticket feature is great, but I've struggled to see the relationship between tickets when using ticket list views. It would be a great quality of life enhancement for users if child tickets were nested under parent tickets in
    • Displaying only unread tickets in ticket view

      Hello, I was wondering if someone might be able to help me with this one. We use filters to display our ticket list, typically using a saved filter which displays the tickets which are overdue or due today. What I'd really like is another filter that
    • Is there provision to charge the attendees to join the webinar?

      We want to host some webinar of public interest and want to charge them to participate in this. Does this feature in-build in the application? Offcourse, we will be having Razor pay account activated for these purpose.
    • Desktop app doesn't support notecards created on Android

      Hi, Does anybody have same problem? Some of last notecards created on Android app (v. 6.6) doesn't show in desktop app (v. 3.5.5). I see these note cards but whith they appear with exclamation mark in yellow triangle (see screenshot) and when I try to
    • Don't send customer email when creating a ticket

      Hi Is there an easy way to stop the system sending an email to the customer when we manually create ticket.
    • Connecting a contact with the deal + Emails not showing up under Deals

      Hello. I have two problems. Im not sure if the problem is due to level of my subscription - Im on Proffessional plan. 1. I have a JotForm connected with ZohoCRM which automatically creates a contact and a new deal based on form submission. That is done
    • Accessing GDPR Data Source metadata for workflows and Zoho Analytics

      Hi everyone, We have GDPR compliance enabled in Zoho CRM, which has added the Data Source section within the Data Privacy tab for Leads and Contacts. This section shows useful information such as: Original creation source, for example Zoho Forms Form
    • Tiktok

      When will Tiktok be added to the Zoho Social Platform?
    • Zoho Mail iOS app update: Spam Controls & Sender Verification

      Hello everyone! We are excited to introduce spam control enhancements in the Zoho Mail iOS app update. Let's dive into what's new. Spam Alerts in Mail Preview : Mail preview now shows warning alerts for emails identified as potentially harmful, helping
    • Mise à jour de Zoho Books – France

      Chers clients, Merci pour votre patience et votre soutien continu. Avec les évolutions réglementaires à venir en France nous introduisons de nouvelles fonctionnalités dans Zoho Books pour les clients français. Ces mises à jour ont été conçues pour répondre
    • Admin Logging in as another User

      How can a Super Admin login as another user. For example, I have a sales rep that is having issues with their Accounts and I want to view their Zoho Account with out having to do a GTM and sharing screens. Latest Update (27th April 2026): With the early
    • Zoho Books API: Bulk update thousands of records using Node.js with OAuth refresh, retries and resume support

      Hello everyone, During Zoho Books implementations, one common challenge is updating a large number of existing records. The current options are usually: Update records manually from the UI using Mass Update (with limited batch size). Update records one
    • SalesIQ's Summer '26 Release: For The Moments That Matter

      Every customer journey is made up of moments. The moment someone discovers your business. The moment they need help. The moment you decide to reach out. The moment a simple chat turns into something more. And the moments that continue long after the conversation
    • CNIL - Suivi de Pixel

      Bonjour à tous, À la suite de la nouvelle recommandation de la CNIL sur les pixels de suivi dans les e-mails, savez-vous si Zoho Campaigns permet : de conditionner le suivi des ouvertures au consentement de chaque contact ; de proposer un lien permettant
    • Customer/Vendor Portal session duration - can it be extended?

      Hi all, We'd like to know how long the login session lasts for the Customer/Vendor Portal in Zoho Books, and whether there's any way to extend it (either through settings or via support/API). Right now this is causing a pretty poor experience for our
    • Accessible & Customizable User Governance in Zoho Projects!

      As teams expand and collaborate with multiple external collaborators across projects, keeping control of user access to project data becomes a challenge. Mismanaged access can cause accidental or unauthorized edits, data leaks and lack of accountability.
    • Bulk deleting Zoho CRM records using Deluge, COQL and CRM API

      Hello everyone, During CRM implementations, data cleanup is a common task, especially after testing, migrations, imports, or integration development. The Zoho CRM UI allows deleting records in batches of 100, which is not practical when dealing with thousands
    • CNIL - Suivi de Pixel

      Bonjour à tous, À la suite de la nouvelle recommandation de la CNIL sur les pixels de suivi dans les e-mails, savez-vous si Zoho Campaigns permet : de conditionner le suivi des ouvertures au consentement de chaque contact ; de proposer un lien permettant
    • How to View Part Inventory and Warehouse Location When Creating a Work Order in Zoho FSM

      Hi everyone, We’re currently setting up Zoho FSM and would like to improve how our team selects parts when creating a Work Order. Right now, when we add a part or item to a Work Order, we can select it from our Zoho Inventory list but we don’t see any
    • Zoho Sprints - Q2 Updates for 2026

      Improve your agile project management experience with the newly released capabilities in Zoho Sprints. This quarter we've shipped a few new features and enhancements that are built around smarter planning and execution tools, tighter integrations, and
    • Problem with currency field in Zoho CRM

      Hi Guys Zoho Books has a feature in currency fields that automatically converts decimal numbers with commas ( , ) to period format ( . ) when pasting them. For example: R$ 2,50 --> R$ 2.50 Is this behavior available in Zoho CRM? I couldn't find any configuration
    • Building extensions #5: Creating custom user interfaces using widgets

      In our last post, we looked at connections and how they help build a seamless integration with an example. In this post, we'll explore creating widgets in Zoho Sprints and their benefits with a real-time example. Widgets What and where? Widgets are custom
    • Images not saved in notes

      Created noteboards and create a note, copy pasted the image, close the note and open again, image is not coming this same problem occurs in note on notebook I have attached the replication steps as video url to analyse it, and also attached the videos
    • Next Page