Power of Automation:: Streamline Associated Teams based on the Task Owner update.

Power of Automation:: Streamline Associated Teams based on the Task Owner update.

Hello Everyone,
 
A Custom function is a user-written set of code to achieve a specific requirement. Set the required conditions needed as 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 update the Associated Team automatically based on the Task owner added.

For example, If User Alex is associated with both the Networking and Central IT Teams, making Alex as Task Owner will automatically update the Task with his Associated Teams. Similarly, when another user is added, their associated Teams will also be updated to the Tasks provided those Teams are part of the Project. 

This can be implemented using
Task custom functions along with Workflow rules.

Custom function code:
 
zuidList = list();
/*          Get all owners and teams.      */
for each  owner in taskOwners
{
zuidList.add(owner.get("id").toString());
}
getTeamUsers = invokeurl
[
url :endPointV3 + portalId + "/teams/users"
type :GET
connection:"*XXXXX*"
];
if(getTeamUsers.get("page_info").get("count") > 0)
{
associtedTeams = list();
for each  user in getTeamUsers.get("team_users")
{
info zuidList + " == " + user.get("zuid") + " : " + zuidList.contains(user.get("zuid"));
if(zuidList.contains(user.get("zuid")))
{
associtedTeams.addAll(user.get("associted_teams"));
}
}
associtedTeams = associtedTeams.distinct();
}
/*   Get all associate teams      */
getAssociatedTeams = invokeurl
[
url :endPointV3 + portalId + "/projects/" + projectId + "/teams"
type :GET
connection:"*XXXXX*"
];
// info getAssociatedTeams;
 
associteTeam = list();
for each  teamid in associtedTeams
{
associteTeam.add({"id":teamid});
}
/*   Remove teams that are already associated   */
if(getAssociatedTeams.get("page_info").get("count") > 0)
{
for each  team in getAssociatedTeams.get("teams")
{
if(associtedTeams.contains(team.get("id")))
{
associtedTeams.removeElement(team.get("id"));
}
}
}
// info associtedTeams;
/*   Associate teams to project of not added   */
if(associtedTeams.size() > 0)
{
params = Map();
params.put("team_ids",associtedTeams);
info params;
associateTeamToProject = invokeurl
[
url :endPointV3 + portalId + "/projects/" + projectId + "/associate-teams"
type :POST
parameters:params
connection:"*XXXXX*"
];
info associateTeamToProject;
}
/*   Associate teams to task of not added   */
if(associteTeam.size() > 0)
{
params = Map();
params.put("teams",{{"add":associteTeam}});
info params;
associateTeamToTask = invokeurl
[
url :endPointV3 + portalId + "/projects/" + projectId + "/tasks/" + taskId
type :PATCH
parameters:params.toString()
connection:"*XXXXX*"
];
info associateTeamToTask;
}
return "success";
 
Make sure to replace XXXXX with Zoho Projects connection link name along with scopes ZohoProjects.tasks.UPDATE, ZohoProjects.teams.ALL. Please find the screenshot of the list of parameters to be mapped for reference.
 
We hope you found this post useful. If you have any questions, feel free to share them in the comments below.

    Access your files securely from anywhere









                          Zoho Developer Community





                                                • Desk Community Learning Series


                                                • Digest


                                                • Functions


                                                • Meetups


                                                • Kbase


                                                • Resources


                                                • Glossary


                                                • Desk Marketplace


                                                • MVP Corner


                                                • Word of the Day


                                                • Ask the Experts



                                                          • Sticky Posts

                                                          • Introducing Version-3 APIs - Explore New APIs & Enhancements

                                                            Happy to announce the release of Version 3 (V3) APIs with an easy to use interface, new APIs, and more examples to help you understand and access the APIs better. V3 APIs can be accessed through our new link, where you can explore our complete documentation,
                                                          • Schedule Exports for Regular Project Updates

                                                            Tracking project data often means exporting data at regular intervals. Instead of manually exporting data every time, users can schedule exports for Phases, Tasks, and Tasks in Zoho Projects. These exports can be set to run once, daily, weekly, or monthly
                                                          • Set Custom Business Calendars and Holidays for Global Teams

                                                            Managing a project across diverse teams means accounting for more than just tasks and deadlines; it means acknowledging how and when each team actually works. Users might follow different working days or observe region-specific holidays that cannot be
                                                          • Restore Trashed Records Anytime Within 30 Days

                                                            Access the recycle bin from the Data Administration tab under the settings page in Zoho Projects, which gives better control over the trashed data. When records like projects, phases, task lists, tasks, issues, or project templates are trashed, they are
                                                          • Organize and Clone Task Custom Views

                                                            We have rolled out two new enhancements to task custom views: Custom View Groups and Custom View Clone. Custom View Groups Similar to predefined view groups, we have introduced groups for custom views to help organize and categorize them. My Custom Views:


                                                          Manage your brands on social media



                                                                Zoho TeamInbox Resources



                                                                    Zoho CRM Plus Resources

                                                                      Zoho Books Resources


                                                                        Zoho Subscriptions Resources

                                                                          Zoho Projects Resources


                                                                            Zoho Sprints Resources


                                                                              Qntrl Resources


                                                                                Zoho Creator Resources



                                                                                    Zoho CRM Resources

                                                                                    • CRM Community Learning Series

                                                                                      CRM Community Learning Series


                                                                                    • Kaizen

                                                                                      Kaizen

                                                                                    • Functions

                                                                                      Functions

                                                                                    • Meetups

                                                                                      Meetups

                                                                                    • Kbase

                                                                                      Kbase

                                                                                    • Resources

                                                                                      Resources

                                                                                    • Digest

                                                                                      Digest

                                                                                    • CRM Marketplace

                                                                                      CRM Marketplace

                                                                                    • MVP Corner

                                                                                      MVP Corner







                                                                                        Design. Discuss. Deliver.

                                                                                        Create visually engaging stories with Zoho Show.

                                                                                        Get Started Now


                                                                                          Zoho Show Resources


                                                                                            Zoho Writer Writer

                                                                                            Get Started. Write Away!

                                                                                            Writer is a powerful online word processor, designed for collaborative work.

                                                                                              Zoho CRM コンテンツ




                                                                                                Nederlandse Hulpbronnen


                                                                                                    ご検討中の方




                                                                                                          • Recent Topics

                                                                                                          • Bookings page very slow to load

                                                                                                            I recently switched to Zoho bookings from calendly and yesterday I switched back. Zoho Bookings page was taking 7-23 seconds to load. We were losing paid clicks from Google because they had to wait too long. Does anyone have any suggestions?
                                                                                                          • Presenting the brand new Zoho Bookings!

                                                                                                            Hello everyone, Greetings from Zoho Bookings! We're happy to announce a new version of our product with enhanced features to simplify scheduling, coupled with a sleek interface and improved privacy across teams. Here's what you can expect from the latest
                                                                                                          • Zoho Desk API - Influence which layout is used

                                                                                                            Hello, how can the ticket layout be changed using the API? I would like to choose the layout directly when creating the ticket. If this is not possible, my question would be how can I change it afterwards? Best regards, Sven
                                                                                                          • Zoho API Deal Creation and Pipeline

                                                                                                            I want to sync my zoho crm and backend with eachtoher, I can receive webhooks from crm and sync from it but when I try to sync to crm , I get this error for Deals module Zoho error: { data: [ { code: 'MANDATORY_NOT_FOUND', details: [Object], message:
                                                                                                          • Intermittently high CPU usage

                                                                                                            I get high CPU usage intermittently both using Zoho Mail on Firefox as well as on the Zoho Mail Desktop app (Mac). To me it seems like a bug because idle usage is normally quite low. Right now, for example, the desktop app uses <1% in the background which
                                                                                                          • Transfer to agent not working on flutter app after integration

                                                                                                            [media pointer="file-service://file-LF6KAwkyDJNd6MbzZmctS3"] [media pointer="file-service://file-FN66XQUngquBJGLdrS827u"] +7 -2 Lines changed: 7 additions & 2 deletions Original file line number Diff line number Diff line change @@ -1,10 +1,11 @@ import
                                                                                                          • Zoho Blog from Zoho Sites

                                                                                                            I keep receiving this error after trying to edit blog posts that were previously saved for posting at a later date: Additionally, I try to make new posts and they show this message, "Failed to save".
                                                                                                          • Help Center Home Tab Search Bar Description

                                                                                                            How do I change what it says above the search bar?
                                                                                                          • First Respons time questions regarding ticket SLA's, Ticket Re-Assignment, and Ticket Closure.

                                                                                                            I am chasing down a few outliers on tickets that my team is reporting to me seen in some of our Zoho Analytics Dashboards with regards to Zoho Desk with regards to First Response Time. Our support organization is setup with different SLA's based on three
                                                                                                          • Toggle Option for SQL Query Auto-Formatting

                                                                                                            We all write SQL queries in a style that makes them clear and easy to understand. However, I’ve noticed that Zoho Analytics sometimes reformats queries in a way that reduces readability - especially when editing existing queries written in a specific
                                                                                                          • payment configuration process

                                                                                                            payment configuration process
                                                                                                          • Lookups from Standard Modules to Custom Modules

                                                                                                            I have created an "External Contacts" Custom Module for adding Contacts who aren't directly associated with a Customer or Vendor but who are related to Orders by being a Site Contact, Job Contact, Warehouse Contact, etc for third party. How can I go about
                                                                                                          • Run automation on quiz completion

                                                                                                            Hello, We're exploring Zoho Learn as a possible solution to creating some training courses to external users on our system. We'd like to run a workflow/ integration to Zoho CRM when a course is completed. Is this possible?
                                                                                                          • Dynamic user applications for CPQ?

                                                                                                            Hi, I've been enjoying getting to know CPQ, the Product Configurator and Price Rules components have been very useful, albeit with some issues. I have noticed that I don't have the power to decide which level of sales staff has permissions when it comes
                                                                                                          • Need details on search criteria for zoho.crm.searchRecords

                                                                                                            Hi, If I understood correctly the integrated functions (getRecords, searchRecords, etc..) I can use inside Functions in Zoho CRM are actually using the Zoho CRM V2 API. I am looking for all the field types and criteria I can use with searchRecords. The
                                                                                                          • Do my notebooks get transferred to a new phone?

                                                                                                            Hello I was wondering about a new phone and I'd like to know whether your notes are automatically transferred to the new device? Regards Will.
                                                                                                          • Client Script Error - Cannot read properties of undefined (reading 'CRM')

                                                                                                            Hi Guys I have a custom form, and I have a client Script set for onLoad of the new form. Below is the script I have defined and the error: Cannot read properties of undefined (reading 'CRM') See Screen Shot Attachement for Details. Here is the Script:
                                                                                                          • Notebook sync

                                                                                                            Hi,After Restart Mobil-Phone since i pressen „Synchronisation“ in my Notebook-App (iPhone) the App is hanging all the time and I have no possibility to Break up. Also Not After Restart my mobile-Phone. After the Restart ( inkl. Connection to WiFi or mobile
                                                                                                          • Employee survey data when the survey creator's account is deleted

                                                                                                            I can’t find in the documentation on this topic, so asking here. When the employee who has created an Employee Engagement survey leaves the organisation and their Zoho account is deleted, will the survey results still be accessible to other persons if
                                                                                                          • DANE IS NOT implemented

                                                                                                            According to the answer of @Sagar S , "DANE has been implemented". on this topic Allow me to disagree, DANE is not implemented at least not to the EU area. The Zoho domain is not under DNSSEC protection and the related TLSA DNS records
                                                                                                          • Enhance Your CRM Experience with Zoho Webinars in Sandbox Environments

                                                                                                            Greetings all, Zoho Webinars will now be available for testing and deployment in Zoho CRM's sandbox environment. Sandboxes offer a safe way to replicate production environments and enable risk-free testing, training, and refining processes before making
                                                                                                          • Increase the elegant comparator to more than 5 users

                                                                                                            Hi Team Requesting to increase the elegant comparators number of custom users to more than 5, this is such a crucial tool in dashboarding but 5 users is simply not enough.
                                                                                                          • No emails coming in

                                                                                                            Hi, I am not receiving any emails, I have tried to send myself an email from another acct and I am not receiving anything, possibly for the last few days. Bit desperate as we are a nursery and not getting important emails from our parents.
                                                                                                          • Problem with Schedule Email parameters in "Send Reply to an Email" API

                                                                                                            Hello, This is my Json script: { "fromAddress": "test@gmail.com", "toAddress": "{{8.fromAddress}}", "subject": "{{8.subject}}", "content": "{{4.result}}", "action": "reply", "isSchedule": true, "scheduleType": 6, "timeZone": "Europe/Lisbon", "scheduleTime":
                                                                                                          • What's New? - May 2025 | Zoho Backstage

                                                                                                            Hi everyone, A May-zing month for you! As summer rolls in and event season picks up the pace, we’ve been working on a set of updates in Zoho Backstage to help make your day-to-day life a little easier. This month’s improvements are all about tackling
                                                                                                          • Integrate Zia AI into Zobot with Support for Hebrew and Bot Context

                                                                                                            Dear Zoho SalesIQ Team, Greetings. We would like to submit a feature request that would significantly enhance the functionality and intelligence of Zobot: native integration of Zia AI into Zobot scripts and blocks—with full support for Hebrew language
                                                                                                          • Mail Merge: Need Transparent Background for Signatures

                                                                                                            I'm using ZohoCRM and Zoho sign to send documents to customers to sign. We use zohoCRM's "Mail merge" option to create the templates. The problem is that those "Signature" fields have a solid white background so it looks like a stamp on the page instead
                                                                                                          • Zoho Flows

                                                                                                            Basically I can't build a connection that works between Excel on OneDrive and Zoho. I wanted to have 1 flow checking on a row added to an excel file and then intiate an import of that row. I'm doing that manually now and thought that this could be automated.
                                                                                                          • Zoho time tracking with automated screenshots

                                                                                                            Time tracking option with automated screen shots would be an exeptuonally good feature, any plans to develop something like that?
                                                                                                          • Sharing my portal URL with clients outside the project

                                                                                                            Hi I need help making my project public for anyone to check on my task. I'm a freelance artist and I use trello to keep track on my client's projects however I wanted to do an upgrade. Went on here and so far I'm loving it. However, I'm having an issue sharing my url to those to see progress. They said they needed an account to access my project. How do I fix this? Without them needing an account.
                                                                                                          • Zoho Campaigns Forms not Responsive on Website

                                                                                                            I have a mobile responsive Zoho Sites website and when I add a Zoho Campaigns form, it is not responsive. I have used the website code and ensured that the 'responsive' checkbox is selected. But, the form is not responsive to mobile. I have attached a
                                                                                                          • Oldest mail on top?

                                                                                                            I am old, and probably missing something simple, but how do I flip my zoho mail so oldest mail is on top?  Thanks in advance, and a HUGE thank you to the entire ZOHO team.  You just keep getting better!
                                                                                                          • Desk API to add or change commenterId to a comment

                                                                                                            Please let me know how to add comments on tickets for different agents using the API. When adding a comment it will take commenterId but then ignores that and used the API agentId. Did not see in API docs which values are readonly. I pleased to see commentedTime worked for past times. Regards, Glenn
                                                                                                          • How send a ticket attachment using the Sendreply API in Zoho Desk

                                                                                                            API document references : you make use of the Upload file API and gather the attachment ID. This ID is be passed with the Send email Reply API to deliver responses with the attachment intact. Code template is as below: // ORGID ORGID = "XXXXXXX"; // Masked
                                                                                                          • First Insight - Find your Fields

                                                                                                            The Wheels of Ticketing - Desk Stories Find your Fields What are fields? Fields are crucial in ticketing modules that capture information about Tickets, Customers, Organizations, Products, and more. Depending on the kind of data being stored, users can
                                                                                                          • Automation#30: Auto-Update Time Entry to the Nearest 5 Minutes

                                                                                                            Hello Everyone, Time tracking is a feature in Zoho Desk to help businesses stay organized and efficient. For Zylker Techfix, this feature has helped to track the duration of gadget services to generate accurate bills. However, Zylker Techfix faced a unique
                                                                                                          • Email adding to existing ticket

                                                                                                            hello Is there some syntax i can add e.g. to the subject line / body of my email that when it reaches the Zoho portal will add the request to an existing ticket. e.g {123} Currently if i have an open ticket and a customer emails me direct, i then forward
                                                                                                          • How to define different shift timings for each weekday in Zoho People?

                                                                                                            Hi everyone, We’re using Zoho People for attendance tracking and need to configure a standard 39-hour workweek that is structured like this: Monday to Thursday: 8 hours per day Friday: 7 hours Currently, our service provider has set up the workweek as
                                                                                                          • add two date range

                                                                                                            Hi, How can I add two date range selections to compare two different column values in a single pivot view? I have attached a snap for your reference.
                                                                                                          • Announcing new features in Trident for Windows (v.1.26.5.0)

                                                                                                            Hello Community, Trident for Windows is here with exciting new features to elevate your email communication and enhance productivity. Let’s dive into what’s new! Open .eml files in Trident. You can now open .eml files directly using Trident. This makes
                                                                                                          • Next Page