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.


      Zoho Campaigns Resources


        • Desk Community Learning Series


        • Digest


        • Functions


        • Meetups


        • Kbase


        • Resources


        • Glossary


        • Desk Marketplace


        • MVP Corner


        • Word of the Day


        • Ask the Experts


          • Sticky Posts

          • 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
          • 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,
          • 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:

          Zoho CRM Plus Resources

            Zoho Books Resources


              Zoho Subscriptions Resources

                Zoho Projects Resources


                  Zoho Sprints Resources


                    Zoho Orchestly Resources


                      Zoho Creator Resources


                        Zoho WorkDrive Resources



                          Zoho CRM Resources

                          • CRM Community Learning Series

                            CRM Community Learning Series


                          • Tips

                            Tips

                          • Functions

                            Functions

                          • Meetups

                            Meetups

                          • Kbase

                            Kbase

                          • Resources

                            Resources

                          • Digest

                            Digest

                          • CRM Marketplace

                            CRM Marketplace

                          • MVP Corner

                            MVP Corner




                            Zoho Writer Writer

                            Get Started. Write Away!

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

                              Zoho CRM コンテンツ





                                ご検討中の方

                                  • Recent Topics

                                  • Zoho Connections Desk API relative URL PATTERN_NOT_MATCHED

                                    While i am trying to do this: async function fetchTicketsFromDesk(timeFilter = 'current_month') { try { const response = await ZOHO.CRM.CONNECTION.invoke("desk_connection", { url: "/api/v1/tickets", method: "GET", }); const data = response.details ? JSON.parse(response.details)
                                  • Zoho CRM - Custom Views for Portal Users

                                    I'm looking for an option to customise custom views for portal users in CRM. It would be great if "portal user" was a permission on custom views.
                                  • 【参加無料】10/17(金) 東京 ユーザ交流会 Vol.3 参加登録 受付開始!

                                    ユーザーの皆さま、こんにちは。コミュニティチームの藤澤です。 10/17(金)に、東京・新橋で「東京 ユーザー交流会 Vol.3」を開催します! 今回のユーザー事例セッションのテーマは、「Zoho Flowを活用した他社の決済サービスとの連携事例」です。 さらに、Zoho Flowに限らず、Analytics や Campaigns などの多彩なZohoサービスの活用方法について、豊富なご経験をもとにご紹介いただきます。 また、Zoho社員セッションでは、Zoho CRMを活用して日々の営業業務を効率化する具体的な事例をお話しします。業界を問わず、幅広い方にご参考いただける内容となっています!
                                  • Zoho Meeting Plug compatibility with newer versions of Outlook

                                    Documentation states that the zoho meeting plug in for outlook is only compatible with versions up to Outlook 2019 What is available to users of more up to date versions of outlook/office 365?
                                  • Getting Attachments in Zoho Desk via API

                                    Is there a way to get attachments into Zoho Desk via an API?      We have a process by which a zoho survey gets sent to the user as a link in a notification.    The survey has several upload fields where they can upload pdf documents.    I've created
                                  • Introducing Zoho's own SMS gateway

                                    We're thrilled to announce the launch of our own SMS gateway feature within Zoho Marketing Automation! This new feature enables seamless SMS campaign management alongside your email marketing initiatives, providing a more integrated and efficient way
                                  • Embedding in Desk articles

                                    We would like to embed documents in our Desk articles. When we use an iframe for the embed, we get scrollbars and a frame border. Neither of those is acceptable. I've spoken with the Desk Support team about what we want and they tell me that it cannot
                                  • Zoho Desk KB article embedded on another site.

                                    We embed KB articles from Zoho Desk on another site (our application). When opening the article in a new tab, there is no issue, but if we choose lightbox, we are getting an error "To protect your security, help.ourdomain.com will not allow Firefox to
                                  • Zoho CRM button to download images from image upload field

                                    Hello, I am trying to create a button in Zoho CRM that I can place in my record details view for each record and use it to download all images in the image upload fields. I tried deluge, client scripts and even with a widget, but feel lost, could not
                                  • Mass Update Contacts In Zoho Campaigns

                                    Is there a way to mass update contacts in zoho campaigns? I want to be able to change the content of a field for a few hundred contacts, and can't go through all of them individually.
                                  • report showing assignment type

                                    Hi, We've created a number of workflows to allow us to auto assign tickets to agents based on keywords and other criteria. I'm struggling to create a report that would show me what is the percentage of tickets that are assigned automatically via workflows
                                  • Option to Disable Knowledge Base Section in Feedback Widget Popup Hello Zoho Desk Team

                                    Hello Zoho Desk Team, How are you? We are actively using Zoho Desk and would like to make more use of the Feedback Widget. One of the ways we implement it is through the popup option. At the moment, the popup always displays the Knowledge Base section,
                                  • Placeholders in Ticket Templates

                                    We should be able to use placeholders in ticket templates. When we create a new ticket, our description field is shown to the client in the email they receive.  It would be very handy to be able to personalize that description field in our ticket templates to pull in the name of the client that the ticket is for. Using them in the subject field as well, so we can auto populate Account Names, etc. 
                                  • when the record is created the tag want to Show as Opportunity how i achive this using Deluge Script

                                    In the quotation i have the work flow schedule for create opportunity record in the module , on that time the quotation tag select as opportunity created. How i achive this using Deluge Script . this like i want to Do tag1 = Map(); tag1.put("name","Nurturing
                                  • Delete a channel

                                    I need delete a channel in tickets.
                                  • Copy / Duplicate Workflow

                                    I have workflows setup that are very similar to each other. We have a monitoring system watching servers, and all notifications - no matter what client it is about - will come from a  noreply@ address which is not very helpful in having it auto assigned to the right account. I have setup a workflow that will change the contact name of the ticket (currently it would say noreply@) to the correct customer which is based on the subject line, as that mentions which server the alert it is about. I need
                                  • Subtasks don't update parent task's times

                                    Hi there: I've recently upgraded to premium and check that subtasks completion % don't update the proportional completion of the parent tasks related to it.  We've been challenging with the problem of having to update twice or sometimes 3 times the completion of the related tasks. I've seen posts similar to this, of 3 years old.  Is there any roadmap for making this happen in a future release? Thanx César Ratto Lima, Perú.
                                  • Apply transaction rules to multiple banks

                                    Is there any way to make transaction rules for one bank apply to other banks? It seems cumbersome to have to re-enter the same date for every account.
                                  • Should I Use DMARC?

                                    When I configure Zoho Mail's DMARC settings, it's mandatory to fill in the RUA and RUF (Aggregate notification email address*, Forensic notification email address*) addresses. When we enter an email address in these fields, we receive reports from the
                                  • Mail ToDo & Tasks Webhooks

                                    Our company uses Zoho ToDo inside Mail to manage our tasks. When I create a task and assign it to a team member it does not notify them unless I add a reminder via mail. I'm trying to create a webhook for when a task is created to send a cliq message
                                  • What is Resolution Time in Business Hours

                                    HI, What is the formula used to find the total time spent by an agent on a particular ticket? How is Resolution Time in Business Hours calculated in Zohodesk? As we need to find out the time spent on the ticket's solution by an agent we seek your assistance
                                  • Create static subforms in Zoho CRM: streamline data entry with pre-defined values

                                    Last modified on (9 July, 2025): This feature was available in early access and is currently being rolled out to customers in phases. Currently available for users in the the AU, CA, and SA DCs. It will be enabled for the remaining DCs in the next couple
                                  • Can't upload attachments.

                                    I can't upload attachment in Zoho Mail.
                                  • Tip #44 – Get Deeper Insights with Zoho Assist’s Custom Reports – ‘Insider Insights’

                                    In today’s fast-paced IT environment, having a clear view of your remote support activities is more important than ever. Zoho Assist’s Custom Reports feature gives IT teams the ability to generate tailored reports that provide actionable insights and
                                  • Message "...does not support more than 100 distinct values..." WHY????

                                    I get this message on one of my reports: Sorry, Zoho Reports currently does not support more than 100 distinct values in columns. 'Account Name * Sum(Amount),Count(Amount Tier)' contains more than 100 distinct values.  Possibly, you can apply filter to reduce the number of distinct values in 'Account Name' or drop the 'Account Name' field in Rows. I want to list all ACCOUNT NAMES (about 500) with SALES BY ACCOUNT.  What is blocking this?
                                  • Need Easy Way to Update Item Prices in Bulk

                                    Hello Everyone, In Zoho Books, updating selling prices is taking too much time. Right now we have to either edit items one by one or do Excel export/import. It will be very useful if Zoho gives a simple option to: Select multiple items and update prices
                                  • Let's Talk Recruit: Super-charge hiring with Zoho Recruit add-ons

                                    Welcome back to our Let’s Talk Recruit series! This time, we’re diving into something that might seem like a small upgrade but has a huge impact on recruiter productivity: Zoho Recruit add-ons. Think about how much of your day is spent in your inbox or
                                  • Vendor Signatures Needed for Purchase Orders

                                    Hello everyone, We have a unique requirement that necessitates that Vendors & Suppliers formally acknowledge our Purchase Orders upon receipt. I was hoping that there would be an option to do so in Zoho Books, but that does not appear to be the case.
                                  • Is there an API to "File a Ticket" in Desk

                                    Hi, Is there an API to "File a Ticket" in Desk to zoho projects?
                                  • Store "Sign in with Google/Microsoft/GitHub etc." details

                                    Quite often now, users are using a sign-in provider like Google or Microsoft to sign into various apps and services. It would be great if Vault could remember which providers you use for each website and sign you in with that provider instead of a username
                                  • Critical Issue: Tickets Opened for Zoho Support via the Zoho Help Portal Were Not Processed

                                    Hi everyone, We want to bring to your attention a serious issue we’ve experienced with the Zoho support Help Portal. For more than a week, tickets submitted directly via the Help Portal were not being handled at all. At the same time no alert was posted
                                  • Tip of the Week #72– Assign thread ownership to avoid confusion.

                                    When teams handle a large volume of emails, managing threads becomes important to stay organized. Without a clear system, duplicate replies, missed follow-ups, or confusion over responsibilities can happen. Thread assignment solves this by designating
                                  • Migrate Your Notes from OneNote to Zoho Notebook Today

                                    Greetings Notebook Users, We’re excited to introduce a powerful new feature that lets you migrate your notes from Microsoft OneNote to Zoho Notebook—making your transition faster and more seamless than ever. ✨ What’s New One-click migration: Easily import
                                  • Unarchive tickets

                                    How can I manually unarchive tickets?
                                  • Optimize your Knowledge Base for enhanced accessibility by adding alt tags for images

                                    Let's learn why alt tags are crucial for your articles. You can add alternative tags (alt tags) and alternative text (alt text) to the images you share on your community forums or when embedding them in articles. Alt tags refer to the HTML attribute,
                                  • FSM trying again

                                    have not linked FSM yet to the rest of out Zoho suit. It certainly looks like the apointment and service part is more manageable for our staff. The question is that our engineers multi task examples 1. deliver products to customers not fitted 2. Service
                                  • Feature Request: Conditional Field Mandatoriness Based on Display Status

                                    Hello Zoho Creator Team, I would like to suggest an enhancement to improve the flexibility of form validations. Currently, when we need a field to be mandatory only if it's displayed on the form, the only option is to: Set the field as not mandatory in
                                  • Data Migration Strategies for Moving to a Cloud Solution

                                    Hi everyone, I’ve been working on moving some of our critical systems, including CRM and project data, to a Zoho cloud solution, and one of the biggest challenges I’ve encountered is data migration. Transferring large volumes of data while keeping it
                                  • Commerce Order as Invoice instead of Sales Order?

                                    I need a purchase made on my Commerce Site to result in an Invoice for services instead of a Sales Order that will be pushed to Books. My customers don't pay until I after I add some details to their transaction. Can I change the settings to make this
                                  • How to set different item selling prices for Zoho Commerce and Zoho Books

                                    Item selling prices for Zoho Commerce and Zoho Books are in sync. If we update the Item selling price in Books, the same will happen in commerce and vice versa. I need a separate commerce selling price for online users and a separate books selling price
                                  • Next Page