Power of Automation :: Trigger Automatic reminders to the task owners five days before the due date.

Power of Automation :: Trigger Automatic reminders to the task owners five days before the due date.

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

Quote
One of our customers was tracking their Retail management using Zoho Projects and they wanted to track deadlines for vendor orders where the due dates for tasks are updated months in advance. They wanted a feature that automatically notifies the task owners five days before the due date to ensure timely order submission. This was achievable using the Schedule Functions in Zoho Projects.

  
Custom function code:-
 
projectParam = Map();
projectParam.put("status","active");
getAllProjects = invokeurl
[
url :projectsEndpoint + portalId + "/projects/"
type :GET
parameters:projectParam
connection:"XXXXXXX"
];
if(getAllProjects.containKey("projects"))
{
projects = getAllProjects.get("projects");
usersParam = Map();
usersParam.put("user_type","active");
getAllUsers = invokeurl
[
url :projectsEndpoint + portalId + "/users/"
type :GET
parameters:usersParam
connection:"XXXXXXX"
];
if(getAllUsers.containKey("users"))
{
users = getAllUsers.get("users");
for each  user in users
{
userId = user.get("id");
taskParam = Map();
taskParam.put("status","open");
taskParam.put("owner",userId);
taskParam.put("time","all");
// taskParam.put("all_tasks", true);
getAllTasks = invokeurl
[
url :projectsEndpoint + portalId + "/mytasks/"
type :GET
parameters:taskParam
connection:"XXXXXXX"
];
if(getAllTasks != "")
{
tasks = getAllTasks.get("tasks");
taskRow = "";
// Get the current date
current_date = zoho.currentdate;
// Add 5 days to the current date
five_days_after = current_date.addDay(5);
for each  task in tasks
{
if(task.get("end_date")==five_days_after.toString()){
info "task date : "+task;
res = invokeurl [
url : task.get("link").get("self").get("url")
type : GET
connection : "XXXXXXX"
];
taskRow = taskRow + "<tr> <td>" + task.get("project").get("name") + "</td> <td>" + task.get("name") + "</td> <td>" + res.get("tasks").get(0).get("link").get("web").get("url") + "</td>  <td>" + task.get("start_date") + "</td> <td>" + task.get("end_date") + "</td> <td>" + task.get("status").get("name") + "</td> </tr>";
}
}
if(taskRow!=""){
sendmail
[
from :zoho.loginuserid
to :user.get("email")
subject :"Orders that are pending in  5 days"
message :"<html> <style> table, th, td { border:1px solid black; border-collapse: collapse; } </style> <body> <h2>Orders that are pending in  5 days</h2> <table style=\"width:100%\"> <tr> <th>Project Name</th> <th>Order Name</th> <th>Order URL</th>  <th>Start date</th><th>Due date</th>  <th>Status</th></tr> " + taskRow + " </table> </body> </html>"
]
}
}
}
}
}
InfoAll you have to do is to replace XXXXXXX with the Zoho Projects connection link name which has the scopes: ZohoProjects.users.ALL, ZohoProjects.portals.ALL, ZohoProjects.projects.ALL, ZohoProjects.tasks.ALL in the below codeCheck this link to learn how to create the connection.Please find the screenshots of the parameters to be mapped and sample schedule function 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



                                          Zoho Marketing Automation
                                                  • Sticky Posts

                                                  • 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 Projects Roadshow, USA - 2024

                                                    Dear Users, We are happy to announce the Zoho Projects Roadshows 2024 in USA. This is an excellent opportunity to learn more about Zoho Projects and gain in-depth knowledge of the advanced features. Our team will also discuss industry specific solutions
                                                  • Project Billing with the Staff Hours Method in Zoho Projects

                                                    The Staff Hours Billing Method in Zoho Projects allows you to bill your clients based on the actual time spent by each team member on a project, at the rate set for each user. This is useful for projects where different skill sets are needed and service
                                                  • Tip 37: Time Log Restriction in Zoho Projects

                                                    Timesheet in Zoho Projects helps you big time in entering log hours for the tasks and issues and approving them. Now, with the new Time Log Restriction option, you can set daily and weekly log hour limits. You can restrict users from entering extra log hours than the permissible limit. The limits are restricted to 24 hours per day and 168 hours per week by default based on business hours. To customize, navigate to Task & Timesheet settings under Portal Configuration in Zoho Projects setup and enable
                                                  • Organize and Track Phases with Phase Custom Views

                                                    Phase Custom Views let you filter and display phases based on specific criteria. This helps you focus on what’s most relevant for you and your team. Filter phases using criteria such as budget, status, and more. Share views with specific users or teams


                                                  Manage your brands on social media



                                                        Zoho TeamInbox Resources

                                                          Zoho DataPrep 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 Initiate WhatsApp Message on SalesIQ?

                                                                                                    I've just activated a Business WhatsApp phone number through SalesIQ because of its touted omnichannel chat approach. Sounds exciting. I understand that when a customer sends me a WA message, I can reply to it on SalesIQ and keep the chat going, perfect.
                                                                                                  • Introducing the New SalesIQ Live Chat Widget: Twice as Fast, Fully Optimized for Engagement!

                                                                                                    Hello everyone! To celebrate our 10-year milestone, we're thrilled to unveil the new and improved SalesIQ Live Chat Widget! Redesigned at both the User Interface and performance levels, this enhanced widget is not only optimized but also 2X faster than
                                                                                                  • E-mails to suppliers

                                                                                                    Hi, i want to upload a spread sheet every day and send an e-mail to our suppliers every day (or when triggering a button?) with info from the spreadsheet lines. The supplier e-mail would be on each line. Unfortunately, when creating a scheduled automation,
                                                                                                  • How can I transfer data from Production to Development environment?

                                                                                                    Hi, I am using Creator V6 and would like to bring all the data in production to the Development and Testing environments? Is there an easy way of doing that or I have to export and import each table?
                                                                                                  • Issue Configuring SSO Integration with Cognito in Zoho Help Center

                                                                                                    Dear Zoho Support Team, We have been working on configuring SSO integration for our Zoho Help Center using Amazon Cognito. While the setup appears to be completed successfully, we are encountering an issue when attempting to access the Help Center. The
                                                                                                  • Custom Roles & Granular Permission Control in Zoho SalesIQ

                                                                                                    Hello Zoho SalesIQ Team, We appreciate the functionalities offered by Zoho SalesIQ, but we would like to request a crucial enhancement regarding user roles and permissions. Current Issue: At present, Zoho SalesIQ provides fixed roles—Admin, Supervisor,
                                                                                                  • Zoho Creator Upcoming Updates - October 2023

                                                                                                    Hello all! As we step into the final quarter of this year, we're ushering in a fresh wave of improvements and new features to supercharge your experience with Zoho Creator. Join us today as we present the newest updates and enhancements for this month:
                                                                                                  • Sales without an invoice

                                                                                                    Sales without an invoice is not included on the “payments received” report. Also, sales without an invoice is not listed in the transactions under the customer’s profile, also making it easy to do a double entry. Is there a way for me to see my sales
                                                                                                  • Rebrand your CRM with the all-new custom domain mapping setup

                                                                                                    UPDATES TO THIS FEATURE! 19th Jan, 2024 — Custom domain mapping has been made available for portal users in Zoho One and CRM Plus. 23rd June, 2023 — Custom domain mapping has been made available for all users, in all DCs. Hello everyone! We are elated
                                                                                                  • Nested Sub-forms (Subform within subform)

                                                                                                    Hi Team, Whether there is any possibilities to add sub-form with in another sub-form like Main Form       -> Sub form A             ->Sub form B If we tried this, only one level of sub form only working.  Any one having any idea about this? Thanks Selvamuthukumar R
                                                                                                  • CASE Module - email function

                                                                                                    HI there, I dont know if this has been asked or answered before as i couldnt find it on the forums. Issue: when a new case is raised, it goes under case tab and everything is captured. Then how do i send emails to the client who raised case with the details
                                                                                                  • Enhancements to the formula field in Zoho CRM: Auto-refresh formulas with the "Now" function, stop formula executions based on criteria, and include formulas within formulas

                                                                                                    Dear Customers, We hope you're well! By their nature, modern businesses rely every day on computations, whether it's to calculate the price of a product, assess ROI, evaluate the lifetime value of a customer, or even determine the age of a record. With
                                                                                                  • Zoho CRM Kiosk Upload Files

                                                                                                    Hello all, We are trying out Kiosks at the moment to see where it can fit best in our business. We are still a bit off in the application but lets say we will sort this out. My question is the following - when I create a Kiosk I can add "File Upload"
                                                                                                  • Delay Function

                                                                                                    Hello, I would like to emphasize the importance of incorporating a delay functionality within custom functions, particularly in the context of integrating multiple platforms. As I understand, a delay function is not available by default in Zoho. However,
                                                                                                  • Client Script | Update - Introducing Subform Events and Actions

                                                                                                    Are you making the most of your subforms in Zoho CRM? Do you wish you could automate subform interactions and enhance user experience effortlessly? What if you had Client APIs and events specifically designed for subforms? We are thrilled to introduce
                                                                                                  • Whatsapp Connection Status still "Pending" after migration

                                                                                                    Hello, I migrated my WhatsApp API to Zoho from another provider a day ago. So far the connection status is still “Pending”. There is a problem? How long does it usually take?
                                                                                                  • Marking a Desk ticket as Unread after merge

                                                                                                    We have a custom script that runs against every new ticket and auto-merges it with any existing ticket that matches our criteria. That works fine but there is no functionality that reverts the newly-updated ticket back to an "unread" state. I found the
                                                                                                  • How to add a customized/dynamic Zoho Booking link in email footer?

                                                                                                    We just installed the latest version of the Zoho Desk <=> Zoho Booking extension from the marketplace and are quite happy to see the feature where a ticket-specific appointment booking link can be inserted in a reply. Is there any way to configure this
                                                                                                  • Date Time

                                                                                                    Hi Everyone, I would seek some help about this concern that bugs me. I'm currently working using Zoho Flow to automatically plot a calendar on the Calendar Report. Whenever a ticket from Zoho Desk Field was updated this will trigger to create a plotted
                                                                                                  • How to change contact record owner to its creator?

                                                                                                    When I convert a lead record into a contact and a deal then a the contact record will have User AAAA as record owner, and the contact record will have User XXXX as the record creator. I don't have any workflow rules in Contact module. I use the blueprint
                                                                                                  • Custom function inside a CUSTOM BUTTON - BOOKS CUSTOM MODULE

                                                                                                    I am trying to upload the attachment in a custom module(Books) to a work drive. One module is working, but another module(New) is not giving me the desired result as it is also giving an error. Of course, I changed the module name etc. Attaching the script
                                                                                                  • Function to update field in CRM Meetings from Bookings Appointment Status

                                                                                                    Hello, We're creating some reporting in Zoho Analytics using data from CRM and Bookings. Unfortunately it looks like when Bookings Appointments are carried over to CRM Meetings, the Bookings Appointment Status is not recorded in CRM Meetings. We would
                                                                                                  • Introducing Bot Filtering for Accurate Email Campaign Analytics

                                                                                                    Update : This feature has been revamped. For the most current information and improved functionalities, please visit the updated version here. Dear Marketers, We're excited to announce a new feature designed to enhance the accuracy of your email campaign
                                                                                                  • Zoho Meeting very bad video quality

                                                                                                    Hello, I need 1080p HD on my Zoho Meeting as explained here: Low Resolution/Quality Video (zoho.com) Currently, video quality is lagging with 400mb internet which is not acceptable for my business. My 1080p 60FPS webcam performs well on platforms like
                                                                                                  • Multi Day booking for resources

                                                                                                    I have following business-case: Rental for Tablets. Customer should be able to select how many device for how many days he'd like to rent. Same as a car rental for multiple days. Is this possible with Bookings on the current version?
                                                                                                  • How can I make time entry mandatory for tickets?

                                                                                                    Hi guys,  I just want to make a time entry field mandatory for tickets. How can I do that? At this stage of our usage, it's not mandatory and it could be forgotten to input a time for a ticket.  Thanks in advance 
                                                                                                  • Set Mandatory Lookup Fields in Ticket Layout

                                                                                                    I added a custom module called 'Site' in the desk. I also added a lookup field 'Site' in the ticket layout. Now, I want the 'Site' field to be mandatory in the blueprint transition. How can I do that?
                                                                                                  • When converting a lead to an account, the custom mandatory fields in the account are not treated by zoho as mandatory

                                                                                                    In my Account module I have a number of custom fields that I have set as mandatory. When I enter a new customer as a new account they work, I can't save the record without populating them. However when I convert a lead, my CRM users are able to save the
                                                                                                  • Zoho Workplace gets yet another security boost: The addition of Zoho Vault

                                                                                                    Hello Community, Passwords are often the first line of defense, yet they're also one of the most common weak points. We're thrilled to announce that Zoho Vault is now integrated with Zoho Workplace! Zoho Vault Standard is now included at no extra cost
                                                                                                  • Announcing new features in Trident for Windows (v.1.20.4.0)

                                                                                                    Hello Community, Trident for Windows is here with some new features to elevate your work experience. Let's take a quick look at what's new. Export emails. You can now export emails in the .eml file format as compressed zipped files to create a secure
                                                                                                  • Best Carding Forum 2025 | Trusted Hacking Forum | Verified Carder Forum | Carder Forums 2025

                                                                                                    Best Carding Forum 2024 | Trusted Hacking Forum | Verified Carder Forum Welcome to Legitcarding.net , the #1 Trusted Carder Forum of 2024! Whether you're a seasoned carder or just starting out, our platform offers everything you need to succeed in the
                                                                                                  • Automatic Email Alerts for Errors in Zoho Creator Logs

                                                                                                    Hello, We would like to request a feature enhancement in Zoho Creator regarding error notifications. Currently, Zoho Creator allows users to view logs and errors for each application by navigating to Zoho Creator > Operations > Logs. However, there is
                                                                                                  • Quickbooks Online Customer Creation Code

                                                                                                    Hi! I'm looking for code that will automatically create a quickbooks customer account when clicking on a button located directly within Zoho CRM - Contacts Module. Here's what I have and I can't seem to figure it out. xxxxx is our company id which we
                                                                                                  • Customers would like to add tips when paying in Client Portal

                                                                                                    I am happy with the clean interface of the Client Portal. However, I am running into a challenge: my customers would like to be able to add tips/gratuities when making payments. Currently, this is very clunky because they have to 1) manually over-pay,
                                                                                                  • Multi-currency in Zoho CRM Forecast and Reports

                                                                                                    As a company we have branches in 4 different countries with as many different currencies. Our Sales Teams would like to work with their local currency as much as possible. The Forecast module using only 1 currency is practically usable only by the sales
                                                                                                  • Change to copy/paste functionality in Deluge code editor

                                                                                                    Recently there was a change to the Deluge code etidor where it now inserts backslashes into strings automatically when copying/pasting strings with double quotes, it's a nightmare to have to go delete all these. Is it possible to toggle this on or off?
                                                                                                  • CRM portal users can now log in using their mobile phone numbers

                                                                                                    Hello everyone! You can now invite portal users using their mobile phone numbers. These portal users will be able to log in using their mobile number and OTP. Templates for these portal-related SMS can be customized as per your needs. This enhancement
                                                                                                  • Clear a date field?

                                                                                                    I've got a date field, let's call it Returned_date.  I'd like to write a script that clears the values from another date field called Expected_date upon a successful entry.  I know where to put the expression, but I'm having trouble building the expression.  Any assistance from anyone for a newb question would be appreciated.  Thanks in advance!
                                                                                                  • Integrating ChatGPT with Zoho Creator for Automated Report Generation: Is It Possible?

                                                                                                    Hi everyone, I’m currently working on an application in Zoho Creator and would like to know if it’s possible to integrate ChatGPT to automate the generation of reports based on the data captured within the application. Has anyone successfully implemented
                                                                                                  • There anyway to change a creator app Back to DEV thats not got a back up?

                                                                                                    As above, is it possible? Thanks.
                                                                                                  • Next Page