Power of Automation :: Automatically create a tag and associate it to all the tasks in a project

Power of Automation :: Automatically create a tag and associate it to all the tasks in a project

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. 


Let us consider the below use case from a customer - 


Whenever a project is created, a tag should be automatically created based on the project name and must to associated with that project and all the tasks created in that project 

We had accomplished this requirement using Custom functions at both Project & Task levels.


Create a connection for the Zoho Projects service with the scopes “zohoprojects.tags.ALL, zohoprojects.projects.READ” to replace ‘connectionprojects’ with the connection name. Click this link below to learn how to create the connection.


To automate this process, you can create Workflow Rules at Task & Project levels and associate the below custom functions.


Script to be used at Task level

endPoint = "https://projects.zoho.com/restapi/portal/";

endPointV3 = "https://projects.zoho.com/api/v3/portal/";

tagIds = List();

getProjectResponse = invokeurl

[

url :endPoint + portalId + "/projects/" + projectId + "/"

type :GET

connection:"connectionprojects"

];

tagDetails = getProjectResponse.get("projects").get(0).get("TAGS");

for each  tagDetail in tagDetails

{

tagIds.add(tagDetail.get("id"));

}

tagsParam = Map();

tagsParam.put("tag_id",toString(tagIds));

tagsParam.put("entity_id",taskId);

tagsParam.put("entityType","5");

url1 = endPointV3 + portalId + "/projects/" + projectId + "/tags/associate";

associateTagsResponse = invokeurl

[

url :url1

type :POST

parameters:tagsParam

connection:"connectionprojects"

];

return "success";


Script to be used at project level

url1 = "https://projects.zoho.com/api/v3/portal/" + portalId + "/tags";

tagObject = Map();

tagObject.put("name", projectName);

tagArray = List();

tagArray.add(tagObject);

tagParam = Map();

tagParam.put("tags",tagArray);

createTagResponse = invokeurl

[

url :url1

type :POST

parameters:tagParam

connection:"connectionprojects"

];

tagId = createTagResponse.get("tags").get(0).get("id");

    tagsParam = Map();

tagsParam.put("tag_id",tagId);

tagsParam.put("entity_id",projectId);

tagsParam.put("entityType","2");

url1 = "https://projects.zoho.com/api/v3/portal/" + portalId + "/projects/" + projectId + "/tags/associate";

associateTagsResponse = invokeurl

[

url :url1

type :POST

parameters:tagsParam

connection:"connectionprojects"

];

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. 



      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

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

          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

                                  • Exported Slide Image Lacks Portion of the Background Image

                                    This does not always happen, but when I export (or "download") the rendered image of a slide, it sometimes lacks a portion of the background image. I created a sample slide deck to demonstrate it and shared it with the admins. It is also publicly available
                                  • Subform Disabled Fields Should Remain Disabled on Edit/View

                                    Currently, when we disable a subform field using on user input or on add new row, it works perfectly during the initial data entry. However, when the record is saved and reopened for viewing or editing, these disabled fields become editable again. This
                                  • How to create a Zoho Mail extension similar to Outlook's OnSend add-in?

                                    Hi, I want to create a Zoho Mail extension similar to Outlook’s OnSend add-in. The extension should: Let the user select headers and footers from a taskpane while composing an email. When the user clicks Send, the extension should: Automatically insert
                                  • Effective Inbox Organization: Folders vs Tags in Zoho Mail?

                                    I'm exploring the best ways to organize a busy inbox, especially when managing multiple clients or project using Zoho Mail. I’d love to know what works best for others: 1. Do you prefer **folders** (possibly with sub-folders) for each client or project?
                                  • Piss poor service in Support in Domains and email

                                    Srijith Narayanan B contacted me today. Very pleasant fellow. Just didn't want to tell him how bad your support service is. You help the person, but you leave before we can finish the next stage. Which causes a lot of frustration. It's been 8 days now
                                  • Zoho Mail android app update: Block & reject future emails, Report phishing, Spam alerts, Suspicious URL detection

                                    Hello everyone! In the most recent Zoho Mail Android app update, we have brought in support for the following features: Block & reject future emails Report Phishing Spam alerts in the mail details screen. Suspicious URL detection. Block & reject future
                                  • Zohomail does not support additional fields in mailto links

                                    Hello, I set up Zohomail as default composer in Firefox according to manual here: https://www.zoho.com/mail/help/defaultcomposer.html#alink2 Later, I wanted to use this functionality to answer in a Linux mailing list thread using mailto link: mailto:xxxxx@kernel.org?In-Reply-To=%3C727o0521-q24p-s0qq-66n0-sn436rpqqr1p@example.com%3E&Cc=xxxxx%example.org&Subject=Re%3A%20%5BPATCH%20v2%28%29
                                  • Emails not being received from a particular domain

                                    Cannot receive any emails sent from atco.com Domain is in the spam whitelist so should be no reason for it not to be coming through. Have filed a ticket and besides a generic response of we are looking at it - it seems there is no actual support workers
                                  • Email address for forwarding is not saving and there's no confirmation ema

                                    Steps to reproduce: 1. Enter my forward email in the email forward section of the account 2. Click save 3. See a notification stating saved successfully 4. Refresh the page, no forward email is saved 5. No email confirmation received at the forwarding
                                  • This domain is not allowed to add in Zoho. Please contact support-as@zohocorp.com for further details

                                    This is the error i keep getting when trying to use my Zoho Domain Mail. This domain is not allowed to add in Zoho. Please contact support-as@zohocorp.com for further details Find attached. I hope this can be resolved very quickly so i can go on and make
                                  • Auto CC - Moving Departments

                                    We have Auto CC e-mail replies to your support mailbox enabled. We have two departments: Helpdesk (helpdesk@domain.com) Delivery (delivery@domain.com) If we create a Helpdesk ticket, and reply, replies are CC'd to helpdesk@domain.com (OK) We then move
                                  • I have error AS101 when I try to add paypal@mydomain.com to Zoho

                                    Please help me with this. I tried to call the help line 4 times but don't get any response.
                                  • unable to send message reason 554 5.1.8 Email outgoing blocked

                                    unable to send message reason 554 5.1.8 Email outgoing blocked
                                  • Zoho Mail Android app update: Manage folders

                                    Hello everyone! In the latest version(v2.9) of the Zoho Mail Android app update, we have brought in support for an option to manage folders. You can now create, edit, and delete folders from within the mobile app. You can also manage folders for the POP
                                  • Mailk got blocked / Inquiry About Email Sending Limits and Upgrade Options

                                    Dear Zoho Support Team, My name is Kamr Elsayed I created this account to use for applying for vocational training in Germany. As part of this process, I send multiple emails to different companies. However, after sending only 8 emails today, I received
                                  • SMTP email sending problem

                                    Hello, I've sent emails before, but you haven't responded. Please respond. My work is being disrupted. I can't send emails via SMTP. Initially, there were no problems, but now I'm constantly receiving 550 bounce errors. I can't use the service I paid
                                  • unblock my zoho mail account. outlines@zoho.com

                                    please unblock my zoho mail account, outlines@zoho.com
                                  • Unable to see free plan option

                                    Hello Zoho Support Team, I hope you are doing well. I am trying to sign up for Zoho Mail, but I am unable to see the option for the free plan. Could you please guide me on how I can access or activate the free plan? Thank you for your assistance.
                                  • Outgoing blocked: Unusual activity detected.

                                    I just made payment for my Zohomail Today and have been debited so i will like to be Unblocked because this is what it says (Outgoing blocked: Unusual activity detected) Thank you i await your swift responses
                                  • How to remove some users in zoho accounts

                                    How to remove some users in Zoho accounts.
                                  • Forwarder

                                    Hi, I tried to add a forwarder from which emails are sent to my main zoho account email . However, it asks me for a code that should be received at the forwarder email, which is still not activated to send to my zoho emial account. So how can I get the
                                  • Forwarder

                                    Hi, I tried to add a forwarder from which emails are sent to my main zoho account email . However, it asks me for a code that should be received at the forwarder email, which is still not activated to send to my zoho emial account. So how can I get the
                                  • DKIM cannot be enabled for the domain as no verified default selector present

                                    Hi Support Team, For Domain DKIM record trying to enable status. but showing error "DKIM cannot be enabled for the domain as no verified default selector present" So, please resolve the issue. Thank you.
                                  • I can't log in to my account on Thunderbird

                                    I've just had to rebuild my PC (calamitous mess from Microsoft with Win10/Win 11 'upgrade' - they confirmed I had to start with a new build). I have used Zoho mail for years via Mozilla Thunderbird, but now I've had to download the latest version of TBird,
                                  • Sorten the domain of zoho mail ids

                                    I recently created zoho mail id and am quite excited with the features. But one issue ig nobody wanna type this big zohoaccounts.com I mean silly bold Suggestion zmail.com (sound gmail) (attraction) or some genz words looks cool
                                  • Get Zoho Mail API working (including DRE Connector, Oauth Token, ZUID, ZOID & ACCOUNT_ID)

                                    Disclaimer: I’m not a professional coder! Do you need to use Zoho Mail API? Me too. It lets you do all sorts of things — like reading the complete header of an email, or forwarding an email with its attachments — which is what I wanted to do. But setting
                                  • Weekly Tips : Customize your Zoho Mail Notifications

                                    In a professional context, email communication remains one of the most crucial channels for staying connected and managing workflows. Keeping track of your emails, task updates, or important announcements can be overwhelming—especially if you are juggling
                                  • How to move emails to Shared Mailbox?

                                    Hello, I created a Shred Mailbox instead of using a distribution group. But I cannot move previous emails to certain shared mailbox. Is it possible move some emails from inbox to shared mailbox?
                                  • Email task creator when task is updated/marked complete

                                    I am looking for a way to notify the creator of a task in zoho todo when - Task is updated Task is closed Comments entered 1 and 2 are critical, and I cannot find a zoho flow to do this. There is no way that as a manager I will know when someone has completed
                                  • The attendees will now be redirected to the landing webpage when they exit the webinar, set by the organizer.

                                    Hello All, In the latest version of the Zoho Meeting iOS mobile app (v1.3.16), we have brought in the below enhancements:   Post Webinar Re-direction Revamped exit UI for Webinar Post Webinar Re-direction:  The attendees will now be redirected to the
                                  • Download API file contents from browser

                                    Hi Team - is there something being planned to be able to trigger file downloads from the browser via a deluge script? i.e. retrieve a file via API, trigger the file download directly from the browser. Or... using the convertToPdf function (https://www.zoho.com/deluge/help/functions/file/convert-to-pdf.html)
                                  • March 15, 2023: Zoho Docs is discontinued

                                    As of today (March 15, 2023) Zoho Docs is discontinued for all users. We would like to thank our customers for trusting us for so many years! Going forward, we're confident you'll enjoy using Zoho WorkDrive for all your advanced file management and collaboration
                                  • When using "locations" in zoho books, can you keep the two locations totally separate from each other?

                                    I am looking to add a location but I don't want to intermingle the banking or other accounts. I want that to be like two separate independent branches that use different banking accounts, accounts payable, and accounts receivable. The people who are in
                                  • Adding a Channel to SalesIQ

                                    I have a client that currently uses Zoho CRM and Zoho Desk. They would like a live chat to place on their website that has a mobile app and chat bots (something like SalesIQ). However, they would also like to have all this work over SMS as well. Does the SalesIQ API allow this? Can I add visitors without them being a visitor on a website? Thanks! Bryan Redeagle
                                  • Zoho CRM IP Addresses to Whitelist

                                    We were told to whitelist IP addresses from Zoho CRM.  (CRM, not Zoho Mail.) What is the current list of IP Addresses to whitelist for outbound mail? Is there a website where these IP addresses are published and updated?  Everything I could find is over
                                  • Empowered Custom Views: Cross-Module Criteria Now Supported in Zoho CRM

                                    Hello everyone, We’re excited to introduce cross-module criteria support in custom views! Custom views provide personalized perspectives on your data and that you can save for future use. You can share these views with all users or specific individuals
                                  • How Do I Refund a Customer Directly to Their Credit Card?

                                    Hi, I use books to auto-charge my customers credit card. But when I create a credit note there doesn't seem to be a way to directly refund the amount back to their credit card. Is the only way to refund a credit note by doing it "offline" - or manually-
                                  • Zoho Flow Needs to Embrace AI Agent Protocols to Stay Competitive

                                    Zoho Flow has long been a reliable platform for automating workflows and integrating various applications. However, in the rapidly evolving landscape of AI-driven automation, it risks falling behind competitors like n8n, which are pioneering advancements
                                  • Important Features Missing

                                    Hey all I love linkthread, but i am missing some important features. I want to be able to include my Google Tag Manager. I have all the important stuff in my GTM Container: Facebook Pixel, LinkIn Pixel, Zoho Pagesense and so on. So i am able to do retargeting
                                  • Introducing Record Summary: smarter insights at your fingertips

                                    Hello everyone, We’re excited to introduce the Record Summary feature. This powerful addition makes use of Zia to simplify how you interact with your CRM data, providing a seamless, consolidated view of critical record information. Scrolling through the
                                  • Next Page