Power of Automation: Automatically notify project owners via email when a project is overdue.

Power of Automation: Automatically notify project owners via email when a project is overdue.

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 wants an automatic email to be triggered to the respective project owner when a project becomes overdue. Specifically for those projects that were due yesterday. This has been implemented using the Schedule functions in Zoho Projects.

Below is the custom function code for reference. 

Custom function code:-

endPoint = "https://projects.zoho.com/restapi/portal/";
endPointV3 = "https://projects.zoho.com/api/v3/portal/";
projectOwnerEmailIds = List();
projectNames = List();
// get all project layouts
getAllLayoutsResponse = invokeurl
[
url :endPoint + portalId + "/module/projects/layouts/"
type :GET
connection:"XXXXXXX"
];
layoutId = getAllLayoutsResponse.get("layout").get(0).get("layout_id");
// get project layout details
getAllProjectFieldsResponse = invokeurl
[
url :endPoint + portalId + "/module/projects/layouts/" + layoutId + "/"
type :GET
connection:"XXXXXXX"
];
customFields = getAllProjectFieldsResponse.get("custom_fields");
for each customField in customFields
{
if(customField.get("column_name").containsIgnoreCase("END_DATE"))
{
endDateId = customField.get("cfid");
break;
}
}
// get all custom Views
getAllCustomViewResponse = invokeurl
[
url :endPoint + portalId + "/module/projects/customview/"
type :GET
connection:"XXXXXXX"
];
customViews = getAllCustomViewResponse.get("default_views");
for each customView in customViews
{
if(customView.get("name").containsIgnoreCase("allprojs"))
{
customViewId = customView.get("custom_view_id");
break;
}
}
// get all delayed projects
getAllProjectsParam = Map();
getAllProjectsParam.put("filter",{"criteria":{{"cfid":""+endDateId+"","criteria_condition":"yesterday","value":{"${YESTERDAY}"}}},"pattern":"1"});
getAllProjectsParam.put("custom_view_id",customViewId);
getAllProjectsParam.put("page",0);
getAllProjectsParam.put("per_page",100);
getAllProjectsParam.put("is_gantt",false);
getAllProjectResponse = invokeurl
[
url :endPointV3 + portalId + "/projects"
type :GET
parameters:getAllProjectsParam
connection:"XXXXXXX"
];
projectsList = getAllProjectResponse.get("data").get(0).get("entities");
if(getAllProjectResponse.get("view_count") > 0)
{
for each project in projectsList
{
projectId = project.get("id");
// get project details
getProjectDetailsResponse = invokeurl
[
url :endPoint + portalId + "/projects/" + projectId + "/"
type :GET
connection:"XXXXXXX"
];
projectOwnerEmailIds.add(getProjectDetailsResponse.get("projects").get(0).get("owner_email"));
projectNames.add(getProjectDetailsResponse.get("projects").get(0).get("name"));
}
sendmail
[
from :zoho.loginuserid
to :projectOwnerEmailIds
subject :"Delayed projects"
message :"Names of the delayed projects "+ projectNames
]
}

Make sure to replace XXXXXXX with the Zoho Projects connection link name with scope ZohoProjects.portals.READ and ZohoProjects.projects.ALL. Check this link to learn how to create the connection.

Please note that the email content can be customized as per the requirement by updating the subject and message in the code above. Also, a screenshot of the sample Schedule Function along with arguments to be mapped is attached 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





                                                  Use cases

                                                  Make the most of Zoho Desk with the use cases.

                                                   
                                                    

                                                  eBooks

                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho Desk.

                                                   
                                                    

                                                  Videos

                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho Desk.

                                                   
                                                    

                                                  Webinar

                                                  Sign up for our webinars and learn the Zoho Desk basics, from customization to automation and more

                                                   
                                                    
                                                  • Desk Community Learning Series


                                                  • Meetups


                                                  • Ask the Experts


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner




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


                                                            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

                                                                                                            • how to differentiate if whatsapp comes from certain landing page?

                                                                                                              I create a Zobot in SalesIQ to create a Whatsapp bot to capture the lead. I have 2 landing pages, one is SEO optimized and the other want is optimized for leads comes from Google Ads. I want to know from which landing page this lead came through WhatsApp
                                                                                                            • Zoho Desk - Community

                                                                                                              As a regular user of Zoho Cares Community I would really love to see the publish date of articles. For example, when I look at Announcements, it would be very beneficial to see which ones were posted recently, over those which have just and a recent comment.
                                                                                                            • access to quartz for my customers

                                                                                                              Hi how can I have access to the application quartz you use for us to send you screen rocording, this feature would be immensely useful for our customers support https://quartz.zoho.com/
                                                                                                            • Issue with Inline Images in Email Reply via Zoho Desk API

                                                                                                              Hi, I am attempting to send inline images in an email reply using the Zoho Desk API, but the images are not being displayed inline for the recipient. I have followed this documentation: https://desk.zoho.com/DeskAPIDocument#Uploads https://desk.zoho.com/DeskAPIDocument#Threads#Threads_SendEmailReply
                                                                                                            • Turning off the new UI

                                                                                                              Tried the new 'enhanced' UI and actively dislike it. Anyone know how to revert back?
                                                                                                            • Change Last Name to not required in Leads

                                                                                                              I would like to upload 500 target companies as leads but I don't yet have contact people for them. Can you enable the option for me to turn this requirement off to need a Second Name? Moderation update (10-Jun-23): As we explore potential solutions for
                                                                                                            • How to search a value stored in a subform?

                                                                                                              Hello, We store serial numbers in subforms but now we would like to be able to search the values to be able to easily find the record with the serial number. I saw that it's not possible to search such values through global search but is it possible to do it an other way? Thank you,
                                                                                                            • Field Dependency Not Working on Detail Page in Zoho Desk

                                                                                                              Hi Support Team, I’ve created field dependencies between two fields in Zoho Desk, and they are working correctly on the Create and Edit layouts. However, on the Detail page, the fields are not displaying according to the dependencies I’ve set — they appear
                                                                                                            • How do the keyword critera work?

                                                                                                              Hi, I'm working on automated assignment of tickets based on keywords. How does this feature work? Where does this criteria look for keywords - email address, subject, email body? Can you please clarify this as I want to avoid overlapping with criteria
                                                                                                            • Error: Unsupported content type: text/html;charset=UTF-8 after tryeing to get the token for n8n automation

                                                                                                              I am working on ZOHO Desk automation and need to get the ZOHO auth token for n8n I have created the app in ZOHO Desk API, got client id and client secret. Added all data required to get a token in n8n. After I sign in with my ZOHO credentials in ZOHO
                                                                                                            • Improving Collaboration Features in Zoho Portal

                                                                                                              Hello Zoho Community, I’ve recently started exploring Zoho services and I’m really impressed with the wide range of features. However, I feel there is still room for improvement in the collaboration area. For example, it would be really helpful if we
                                                                                                            • Clear Tag & Linking Between Quotes and Sales Orders

                                                                                                              Hi Zoho Team, In Zoho Books, when a quote is converted into a sales order, it would be extremely useful to have: A clear tag/indicator on the quote showing that it has been converted into a sales order. A direct link in the sales order back to the originating
                                                                                                            • New in Cadences: Option to Resume or Restart follow-ups when re-enrolling records into a Cadence, and specify custom un-enrollment criteria

                                                                                                              Managing follow-ups effectively involves understanding the appropriate timing for reaching out, as well as knowing when to take a break and resume later, or deciding if it's necessary to start the follow-up process anew. With two significant enhancements
                                                                                                            • Send a campaign to one recipient.

                                                                                                              Very often I speak to a customer and they say they didn't see my email (maybe it went in Junk, maybe they deleted it). Anyway, I just want to go into the Campaign and send it to one person. You already have a feature very close to this - when sending a Test. While developing a campaign, I can send tests to anyone. Why can't we have this AFTER  the campaign has been sent? I know, there's a caveat, and that's in the use of merge tags. Most of the time I only use FNAME, but maybe you could check if
                                                                                                            • Feature Request - Insert URL Links in Folders

                                                                                                              I would love to see the ability to create simple URL links with titles in WorkDrive. or perhaps a WorkDrive extension to allow it. Example use case: A team is working on a project and there is project folder in WordDrive. The team uses LucidChart to create
                                                                                                            • Try FSM again for our business

                                                                                                              We already have our customers individual equipment in CRM with serial numbers, install dates, warranty length and importantly next service which is generally 2 years. a month before the service date is due we get get a report and send out service reminders.
                                                                                                            • GST Slabs Redefined: Stay Compliant Using Zoho Books!

                                                                                                              Hello Everyone! The Government of India is rolling out new GST rates, a major reform aimed at simplifying the current tax structure starting 22 September 2025. GST will move from four slabs (5%, 12%, 18%, 28%) to two main slabs (5% and 18%), plus a special
                                                                                                            • 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
                                                                                                            • Get Cliq Meetings in my O365 calendar

                                                                                                              Hi, we are currently evaluating to replace the Teams Messaging and Meetings with Cliq. We currently still have all our email and calendars in O365. What i want to achieve is, to create a (ZOHO) meeting from Cliq and have this meeting added to my Outlook/O365
                                                                                                            • Issue with Zoho Help Portal – Tickets Missing or Not Answered

                                                                                                              Hi, How are you? I think there may be an issue with the Zoho Help Portal. I opened a few tickets directly in the help portal a some time ago but never received any response I also opened ticket 148356451 by email. I did receive a reply to it, but the
                                                                                                            • Changing the Default Search Criteria for Finding Duplicates

                                                                                                              Hey everyone, is it possible to adjust the default search criteria for finding and merging duplicate records? Right now, CRM uses some (in my opinion nonsensical) fields as search criteria for duplicate records which do nothing except dilute the results.
                                                                                                            • Zoho Creator as LMS and Membership Solution

                                                                                                              My client is interested in using Zoho One apps to deploy their membership academy offer. Zoho Creator was an option that came up in my research: Here are the components of the program/offer: 1. Membership portal - individual login credentials for each
                                                                                                            • DUNS & Bradstreet and Credit risk monitoring integration with Zoho books

                                                                                                              Small businesses not being paid by bigger clients and clients of all sizes is a huge problem. It will be nice if Zoho develops integration with DUNS & Bradstreet(D&B) and Credit risk monitoring integration with Zoho books. That have small businesses can
                                                                                                            • Filtering Tickets based on Email headers

                                                                                                              We're starting to get a lot more junk coming into our Zoho Desk, which is then triggering unnecessary email alerts to agents. Once thing we could do to cut this junk in half, is to filter tickets based on email headers. Any email containing the `List-Unsubscribe`
                                                                                                            • Zoho Forms - Form Rules based on attachment fields

                                                                                                              Many businesses use forms to collect documents and images from customers. In many cases, you may want to trigger a notification or other automation based on whether or not an attachment was added. I've noticed that attachment fields do not appear in Rules
                                                                                                            • Add QUOTE OWNER profile image to a Quote Template

                                                                                                              I can add their email address.. phone number, DOB. I need to add a users profile picture so when they assign a template to a quote they own it adds their picture to the cover page. I've tried hacking a solution together but there has to be an easier way.
                                                                                                            • Elevate your CX delivery using CommandCenter 2.0: Simplified builder; seamless orchestration

                                                                                                              Most businesses want to create memorable customer experiences—but they often find it hard to keep them smooth, especially as they grow. To achieve a state of flow across their processes, teams often stitch together a series of automations using Workflow
                                                                                                            • No Response from Zoho Support in 8 Days - Typical?

                                                                                                              I have a couple of issues I'm trying to work through. Initially, I was getting support from support@zohofsm.com, but I have not received a response in 8 days (11 on another question). Is this typical? Can I pay for support? For context, I am not spamming
                                                                                                            • Office 365 and CRM mail integration: permission required

                                                                                                              Has anyone run into this weird problem? My email server is Office 365. When I try to configure Zoho CRM to use this server, a Microsoft popup window opens requesting user and password. After entering that, I get a message in the Microsoft window saying
                                                                                                            • Age Calculation

                                                                                                              I've attempted to calculate the age of someone based on their birthday input by using the formula field. It works but I don't want all those decimals on there. I then tried to use "set variable" after birthday input but I get a field type mismatch, long vs. floating. Any ideas would be wonderful.
                                                                                                            • Open filtered deals from campaign

                                                                                                              Do you think a feature like this would be feasible? Say you are seeing campaign "XYZ" in CRM. The campaign has a related list of deals. If you want to see the related deals in a deal view, you should navigate to the Deals module, open the campaign filter,
                                                                                                            • Change scheduling emails time

                                                                                                              When sending an individual email there is a great feature to schedule them to send later. I could only use the one time that is suggested. Is there a way to select another time? Regards, Glenn
                                                                                                            • Zoho CRM: how can I control which contacts to sync with Outlook?

                                                                                                              I was just playing around syncing contacts from Zoho to MS Outlook (MS365 account.) The problem is our firm has hundreds of thousands of contacts and I don't want to bury my contacts list in outlook. Any help with this is greatly appreciated.
                                                                                                            • How to overcome limitations in meetings

                                                                                                              As a company, one of our deliverables is a meeting between two other companies, where we act as facilitators. So, if we recorded this meeting  in Zoho CRM, it should be connected to 2 accounts, 2 contacts, and 1 campaign (a campaign, in our use, is the
                                                                                                            • Different MRP / Pricing for same product but different batches

                                                                                                              We often face the following situations where MRP of a particular product changes on every purchase and hence we have to charge the customer accordingly. This can't be solved by Batch tracking as of now so far as I understand Zoho. How do you manage it as of now? 
                                                                                                            • Add a 'Log a Call' link to three dot icon in Canvas

                                                                                                              Hi, There's a three dot element when creating a canvas called 'More'. I would like to modify this to add a link that says 'Log a Call' in order to quickly record the details of a cellphone call. I'd also like this to be a simple 'contact' selection and
                                                                                                            • Syncing Zoho Forms with Bigin - Embedding issue?

                                                                                                              Hello everyone, I created a Zoho Form for a page on my GoDaddy website to collect leads, which then transfers the data to Bigin. However, I'm facing an issue where it doesn't seem to work properly. I've integrated Zoho Forms with Bigin and tried embedding
                                                                                                            • Can not add fields to a Section

                                                                                                              I feel like I'm missing something obvious: I can add new Sections to my form but I can not add fields to the Sections. I've tried fields already on the form as well as dragging and dropping new fields into the Section but nothing will go into it. What
                                                                                                            • Record Logged in User while using CRM lookup field

                                                                                                              Is it possible, while using the Zoho CRM lookup field, to automatically use the user account logged into Zoho CRM in a hidden field? I was hoping to add employee accounts to my current plan. But would like a record on the Form submission of who submitted
                                                                                                            • Form Rules for Suburb Categories to alternate landing pages or Making a Fields Contents ALL CAPS

                                                                                                              I need to send differentform submissions to two to three different thank-you URLs (for Meta/Google pixels) depending on which suburb a user selects in a form. I have ~400 suburbs split into two categories (A and B, based on business value). Current challenges:
                                                                                                            • Next Page