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.


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

    • Peppol Malaysia API

      Hi Zoho Books, my country Malaysia will going to implement "Peppol" (E-Invoicing), starting 1 Jul 2025 for all businesses. The government intends to provide API for accounting app. The workflow involves creating an invoice from accounting app, triggers
    • Problem when condition with lookup field in Zoho Creator

      this is my code: if input.promotions1 != null { info input.promotions1; } And this my result: when i info input.promotion1 (which is a lookup field), it turn back nothing, so what type of this field is? normally i use the condition: if lookup_field ==
    • Multiple workflows based on stage?

      I am trying to have multiple things happen when I close a deal. First, I would like to send a thank you/coupon email to all deals that are closed. Second, I would like to create connected records in a separate pipeline for certain projects that qualify.
    • Integrate WordPress site as a Knowledge Base for Zoho Desk Suggested Articles

      Dear Zoho Desk Support Team, We'd like to propose a feature enhancement for the Suggested Articles system within Zoho Desk. This feature would allow seamless integration with a WordPress knowledge base, enabling relevant article suggestions for agents
    • Error 403 (forbidden) when using get ticket API on a ticket in a new department

      Hi We use get ticket API and it works well. We created a new department and when we try to use the same API on the tickets from this department, it fails with the error: b'{"errorCode":"FORBIDDEN","message":"You are not authorized to access this resource."}'
    • Custom Buttons

      Is there any way to create a "Custom Button" that would initiate a workflow, or call a custom function, preferably directly from a ticket? In Zoho CRM records can have custom links and buttons that make outside integrations relatively simple.
    • Is there a way to automatically add Secondary Contacts (CCs) when creating a new ticket for specific customers?

      Some of our customers want multiple contacts to receive all notifications from our support team. Is there a way to automatically add secondary contacts to a ticket when our support team opens a new ticket and associates it with an account? This would
    • Issues with GC Integration and Ticket Retrieval in Instant Messaging

      I am using Guided Conversations (GC) within Instant Messaging (IM) channels. When a user sends a message, a ticket is created in Desk, but GC cannot identify which ticket it corresponds to. To address this, I have implemented a workflow rule to rename
    • 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?
    • 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.
    • Contact details when no answer in Chat

      Hello, it would be great to have a feature that when no one is answering in the chat for lets say 60 seconds ... the user gets a meesage to enter his email and we can follow up later. Now we can have only prechat forms ... which can loose potential clients
    • Calculation of depreciation

      Can we add the feature of calculating the depreciation on assets as the year-end and mark a journal once done?
    • Launching CPQ for Zoho CRM! An in-built solution for bespoke quote management

      Hello everyone, We are thrilled to announce the public release of CPQ (Configure, Price, Quote) for Zoho CRM, which is a fundamental block in sales management. NOTE: CPQ was a public early access feature from March 2023 — January 2024. Since February
    • The current Account Name is amt-lubricatingoil.com, and I would like to change it.

      Hello, my current Account Name is a***********l.com, and I would like to change it to w*******x.com. Thank you!
    • Changing Default PDF Name

      Is it possible to change the default name of a PDF? As of right now, all of my quotes are named 'QT_$QuoteNumber' (i,e: 'QT_19803471298374) - would it be possible to change this to: '$CompanyName - $AccountName - $QuoteNumber' for instance?
    • Simple Deluge Script

      Hi. I'm brand new to functions but I'm trying to create a script to convert a date field in Meetings to a written format. For example, instead of 02/05/2025 8:00AM, I'd like to convert it to Wednesday, February 5, 8:00 AM. My Date field is the API Name
    • Is the a way to show the actual Zoho Books Invoice in Zoho Crm Deal ?

      Im currently using the following code to create deals and tasks based off a new quote in zoho books, the problem is the quote is created under Accounts in CRM in the Zoho FInance Module, so when the deal is created it does state the amount of the quote
    • How to auto-update a task owner in a preset list of tasks on a new project?

      We have automation set up between the CRM and Projects that will automatically create a new project with a preset list of tasks when a sales order is created for specific products. Of the tasks that are automatically populated in these new projects, we
    • Zoho Analytics - CRM Sync Failure

      We have experienced consistent sync failures between our Zoho CRM and Analytics apps, but there aren't any details provided as to why this failure might be occuring. Please advise on troubleshooting steps so we can figure out how to restore the sync.
    • Matrix dropdown

      Is there a way to create a matrix question with dropdown answers but 1 row correlates to 1 column? So really I want to combine 4 dropdown questions into 1 matrix but each question has a single, and different, dropdown for answers.
    • 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
    • "Reply to" email address issue

      On the New campaign page, you select or add a reply to email address.  It sends a verification email to that email address. But my recipient had a filter on and never go tthe email.  Now he removed the filter, but campaigns says verification email already was sent.
    • [Client Script] How to get selected related record Id

      Hi Zoho, I set an client script button in related record list. We would like to fetch the selected record id/field for further action. But I don't know how to get the selected id. If there is not possible to get related record info, then what does the
    • Now Indian Businesses can start accepting online payments with Zoho and Razorpay

      Hello Everyone, At Zoho, we have always ensured a hassle-free online payment experience for our customers. Today, with our integration with Razorpay, Zoho's customers from India can now offer a seamless checkout experience for one-time and recurring payments, with a host of payment options including card payments, multiple wallet offerings, and net banking with over 50 banks. With Zoho and Razorpay, help your customers pay their way. Whether it's with debit cards, credit cards, wallets, or net banking,
    • Workflows being applied and the Large unwanted popup

      When a workflow is being applied do to an action, then the Agent is left with a large Window asking if they would like the see the changes this workflow did. Is there any way to disable this prompt from appearing?
    • Repeating Sections in Writer

      I am wondering if it's possible to create repeating sections or text boxes of a document based on a merged subform fields coming from Zoho Forms. We are currently using excel to dynamically create a legal PDF document based on input fields in another
    • Duplicate Column Data with Individual Filters

      Is it possible to create a report using the Zoho Desk Connector which would look something like this: | Account Name | Ticket Count (filtered by department 1) | Ticket Count (filtered by department 2) | For Example: Where Dept. 1 = Support Tickets, and
    • Introducing bot filtering for accurate analytics

      Dear Zoho Campaigns Users, We're happy to introduce bot filtering to enhance the accuracy of your email campaign analytics. This new feature is designed to help you filter out bot-generated opens and clicks, which will ensure your campaign reports reflect
    • Housing Leads and Existing Customers

      We are a Software as a Service (SaaS) company offering subscription-based services. Our customers include individuals, businesses, and resellers who market our software to their clients. Currently, we use Zoho CRM solely for leads/deals, but we would
    • Change default "Sort by"

      Is there a way to change the default "sort by" when searching across modules?" in Zoho CRM? Currently the default sort method is "Modified time" but i would like to utilize the second option of "relevance" as the sort by default and not have to change
    • Customer Success Pipeline

      Hello all, currently, we are using Leads -> Deals Pipelines to manage our Sales. So far so good. Now, we rely heavily on activating dormant clients and nurturing active clients into ambassadors, or cross- or upsell active clients. I can't wrap my head
    • Why hasn't Zoho CRM For Everyone been rolled out?

      I don't understand the point of rolling out new features so slowly after a big fanfare launch 8 months ago. I've signed up for 'early access' and also contacted my point of contact, but nothing. Not even an auto reply. Would you say that this is good
    • Apple Messages for Business in Omnichannel communications?

      Hello, Apple launched "Apple Messages for Business" but Zoho CRM or Zoho Desk don't appear in the list of possible integrators. Zoho already promotes https://www.zoho.com/crm/omnichannel.html Omni Channel integration, but Apple Messages does not yet appear.
    • External E-Mail to approve Form

      I am currently setting up a form to apply for a member discount. To do this, the entry must be confirmed by the external partner of which the person completing the form is a member. Is it possible to enter an external email address as approval or is this
    • RSC Connectivity Linkedin Recruiter RPS

      It seems there's a bit of a push from Linkedin Talent Solutions to keep integrations moving. My Account Manager confirmed that Zoho Recruit is a Certified Linkedin Linkedin Partner but does not have RSC as of yet., (we knew that :-) She encouraged me
    • when I open my sheet ,it always start at "A1" despite I left it at "N234"

      when I open my sheet ,it always start at "A1" despite I left it at "N234"  Is it possible to make the sheet open where I left it? 
    • ZOHO Reports - Filter Logic?

      Hi, I need a way to apply filter logics such as ((1 AND 2) OR 3). All I can see as of now is a way to enter different AND filters in the respective filter column. But how can I add an OR filter? Any advice would be highly appreciated. Mark
    • Notebook for watch no longer in Play store.

      I had to reinstall Notebook on my Galaxy Watch 7. Alas: the app is no longer available in the Play store. What now?
    • Introducing more ways to customize your Bigin forms!

      Greeting, I hope all of you are doing well. We're happy to announce a few recent enhancements we've made to Bigin's forms: You can now effortlessly gather contact and pipeline data. We're also improving the user experience with enhancements to design
    • Import template from Zoho Writer

      I am trying to import a mail merge template - tried to import direct from my .docx file on my hard drive and the formatting went all over the place. I then imported the .docx file in my Zoho Docs and then fixed up the formatting within Zoho Writer. Can
    • Next Page