Power of Automation :: Automatically Approve/Reject the associated timelogs of Issues

Power of Automation :: Automatically Approve/Reject the associated timelogs of Issues

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.

We have a few pre-defined gallery functions that are ready to use. You can access the same using the steps available in this link.        

QuoteThis week, I would like to highlight one of the Gallery custom functions - Approve / Reject Associated TimeLog Entries   
 
Use case:-

This function helps you to automatically approve/ reject the timelogs associated to the issues based on the value provided in the Argument. To automate this action, you can associate this custom function to Business Rules.

Todo:-

Create a connection for the Zoho Projects service with the scopes "ZohoProjects.timesheets.READ, ZohoProjects.timesheets.UPDATE" to replace 'xxxxx' with the connection name. Click this link below to learn how to create the connection. Refer the attached screenshot of the Arguments.

Custom function code:-
projectsDomain = "https://projectsapi.zoho.com";
// approveStatus = approved | rejected for rejected status note is mandatory.
getAssociatedTimelogEntriesAPI = projectsDomain + "/api/v3/portal/" + portalId + "/projects/" + bugProjectId + "/timesheet";
getAssociatedTimelogEntriesParam = Map();
getAssociatedTimelogEntriesParam.put("page",1);
getAssociatedTimelogEntriesParam.put("per_page",200);
getAssociatedTimelogEntriesParam.put("view_type","projectspan");
moduleJson = Map();
moduleJson.put("id",bugId);
moduleJson.put("type","issue");
getAssociatedTimelogEntriesParam.put("module",moduleJson);
info getAssociatedTimelogEntriesParam.toString();
info getAssociatedTimelogEntriesAPI;
getAssociatedTimelogEntriesResp = invokeurl
[
url :getAssociatedTimelogEntriesAPI
type :GET
parameters:getAssociatedTimelogEntriesParam
connection:"xxxxxxxxx"
];
info getAssociatedTimelogEntriesResp;
if(getAssociatedTimelogEntriesResp != null && getAssociatedTimelogEntriesResp.get("time_logs") != null)
{
updateLogHoursStatusAPI = projectsDomain + "/api/v3/portal/" + portalId + "/logs";
logEntriesList = List();
bugTimeLogEntries = getAssociatedTimelogEntriesResp.get("time_logs");
for each  timeLog in bugTimeLogEntries
{
logDetails = timeLog.get("log_details");
for each  logDet in logDetails
{
logId = logDet.get("id");
logMap = Map();
logMap.put("approval_status",approvalStatus);
logMap.put("id",logId);
logMap.put("module","issue");
logNote = Map();
logNote.put("notes",approvalNote);
logMap.put("extra_data",logNote);
logEntriesList.add(logMap);
}
}
payload = "[" + logEntriesList + "]";
updateLogStatusResp = invokeurl
[
url :updateLogHoursStatusAPI
type :PATCH
parameters:payload
connection:"xxxxxxxxx"
];
info updateLogStatusResp;
}


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. 


      • Sticky Posts

      • Automation Series: Auto-create Dependent Task on Status Change

        In Zoho Projects, you can automatically create and assign a dependent task when a task’s status is updated. This helps teams stay aligned, ensures reviews happen on time, and reduces manual effort. In this post, we’ll walk through an easy setup using
      • Time Log Reminder

        Tracking the time spent on tasks and issues is one of the most important functions of a timesheet. However, users may forget to update the time logs because they have their own goals to achieve. But, time logs must be updated at regular intervals to keep
      • Introducing the Zoho Projects Learning Space

        Every product has its learning curve, and sometimes having a guided path makes the learning experience smoother. With that goal, we introduce a dedicated learning space for Zoho Projects, a platform where you can explore lessons, learn at your own pace,
      • Update on V2 API End-of-Life Timeline

        Dear Users, Earlier this year, we shared the launch of the V3 APIs and requested users to migrate from the older V2 APIs by December 2025. We have received valuable feedback from our users and partners regarding their migration timelines. We are happy
      • Automation Series: Auto-update Phase Status

        Hello Folks! You can auto-update your phase's status based on status of underlying tasks using custom functions. In this series, we will showcase how to create and run custom functions, using Deluge, with ease. Follow the steps below and automate your

        • Recent Topics

        • Queries on Project-Based Inventory Consumption and Proforma Invoice in Zoho ERP

          We would appreciate your clarification on how Zoho ERP plans to handle the following: Project-based inventory consumption without itemized sales orders Accurate project cost tracking along with inventory reduction Proforma Invoice usage We look forward
        • Applying Excess Payments & Conflict Invoices Due to Cancelled Items

          I’m running into several issues that appear to stem from deeper-than-expected overlap between Zoho Finance (Books/Inventory) and Zoho POS. The level of coupling between these systems seems greater than what was originally communicated, and it’s leading
        • Zoho Sprint Backlog View, filter by item status

          Hello, In Zoho Sprints, it would be great to be able filter out specific items in the Backlog based on their status. We would like to track items that were Removed from our backlog without seeing them constantly in the Backlog view, as this view should
        • WATERFALL CHART IN ZOHO ANALYTICS

          Hi Team, I would like to know whether Zoho Analytics currently supports a Waterfall Chart as a built-in visualization type. If yes, could you please share the steps to create one? If not, is there any workaround or recommended method to build a Waterfall
        • Export contacts from Bigin's mobile app to your Android device

          Hello everyone! We're happy to announce that you can now export customer contacts from the Bigin mobile app to your device. Scenario A small-scale business owner has two pipelines in Bigin—one for procuring raw materials and the other for selling his
        • Passing Info from Function to Client Script

          Hello, I have recently started making use of client script for buttons, allowing me to give the user information or warnings before they proceed. This is great. However, I have never quite managed to pass back any extra information from the function to
        • ASAP iOS SDK – Xcode Compatibility Update

          Hello everyone, We have been delivering the ASAP iOS SDK developed using Xcode 16.1 to provide Help Center support within mobile applications. Thus, ASAP iOS SDK versions upto 4.5.8 are compatible with development environments running in Xcode 16.1 and
        • Sub form auto field population based on parent form

          I have a parent form called "Sites" with a text field called "Site". I have a subform called "Design Comments" (actual form name "Review Comments") with a lookup field name "Sites1" that looks up from the Sites form. I want the Sites1 lookup field to
        • "Temporary" Field Value?

          I have a custom action in Form A report Detail View that passes the Rec ID and updates a Temp Record ID lookup field in the Form B record via openURL (and opens the Form B report in popup) . The updated Temp Record ID field value in Form B is then used
        • A note-taking app right inside your project management space

          How do you feel when you check off the last task from your to-do list after a long day at work? Euphoric, blissful, satisfied? Now, imagine completing the same checklist from your PM platform, without juggling tools. Sounds simple and handy? That’s exactly
        • Email Forwarding: Maintain business continuity

          As an administrator, ensuring uninterrupted email communication is critical when a role-based employee is unavailable due to extended leave or a temporary role change. Emails from customers, partners, and internal teams must continue to be received and
        • Tip #61- Collaborate live with Invite Technician- 'Insider Insights'

          We’ve all been there: you’re deep into a complex remote session, and you realize you need a second pair of eyes. Instead of ending the call or rescheduling, why not just bring the expert to you? With Zoho Assist, you can invite internal colleagues or
        • How to integrate Zoho CRM, Zoho Forms and a WIX Web Site

          Attached video demonstrates how to use Zoho Forms included in Zoho One, to design a Contact Us form to be embedded into a WIX web site and integrated into Zoho CRM.
        • Bug Causing Major Sync & SO Access Failures in Zoho POS

          We are experiencing critical and recurring issues in Zoho POS that all trace back to role-permission handling defects in the latest POS app version. These issues directly affect syncing, login ability, and Sales Order access for role-restricted users
        • 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
        • Zoho CRM for Everyone's NextGen UI Gets an Upgrade

          Hello Everyone We've made improvements to Zoho CRM for Everyone's Nextgen UI. These changes are the result of valuable feedback from you where we’ve focused on improving usability, providing wider screen space, and making navigation smoother so everything
        • Timesheet invalid data error

          Getting the "Invalid Date" error when trying to add a time sheet to an appointment in a work order. I initially though the work order was corrupt or something so I deleted the work order and recreated it. I added the first time sheet to the AP and saved
        • OAuth2 Scope Error - Incorrectly defaulting to CRM instead of Analytics.

          Hello Zoho Team, I am trying to connect n8n to Zoho Analytics API V2 for a simple automation project. Despite using the correct Analytics-specific scopes, my OAuth handshake is failing with a CRM-related error. The Problem: The authorization screen shows:
        • Add Custom Reports To Dashboard or Home Tab

          Hi there, I think it would be great to be able to add our custom reports to the Home Tab or Dashboards. Thanks! Chad Announcement: The feature is being rolled out across DC's and Edition in phases. To know more refer to the announcement post here.
        • Hiding Pre-defined Views

          You can enhance Zoho with custom views - but you cannot hide the pre-defined views. Most users focus on 4 or 5 views. Right now for EVERY user EVERY time they want to move to one of their 4 or 5 views - they have to scroll down past a long list of pre-defined
        • why can't agent see accounts & contacts

          My new user, with 'Agent' privileges, cannot see records that don't belong to them. How can I give them access? Why isn't this the default configuration in Zoho?
        • Sender Email Configuration Error.

          Hello Team, Hope you are all doing well. We are in the process of creating the Zoho FSM environment in the UAE. When we try to add the sender email address “techsupportuae@stryker.com”, we receive the error message: “Error occurred while sending mail
        • 【Zoho CRM】フィルター機能のアップデート:ルックアップ項目を使ったデータフィルタリング

          ユーザーの皆さま、こんにちは。コミュニティチームの藤澤です。 今回は「Zoho CRM アップデート情報」の中からフィルター機能のアップデートをご紹介します。 ルックアップ項目を使ったデータフィルタリングがより詳細に行えるようになりました。 この機能は詳細フィルターとカスタムビューで利用でき、必要な情報を正確に取得できます。 これにより、タブ間を移動することなく、より深く正確な方法でデータを絞り込むことが可能になります。 ◉できること 詳細フィルターとカスタムビューで、ルックアップ先タブの項目が選択可能
        • This will be long, Please bear with me - Next Gen Layout - Search

          In general, I think that Zoho are going in the right direction with the Next Gen UI. The latest update brings some nice improvements and all-in-all from a user's perspective I think the improvements are generally very good. However, there are some areas
        • Zoho Books | Product updates | July 2025

          Hello users, We’ve rolled out new features and enhancements in Zoho Books. From plan-based trials to the option to mark PDF templates as inactive, explore the updates designed to enhance your bookkeeping experience. Introducing Plan Based Trials in Zoho
        • Zoho Books | Product updates | August 2025

          Hello users, We’ve rolled out new features and enhancements in Zoho Books. From the right sidebar where you can manage all your widgets, to integrating Zoho Payments feeds in Zoho Books, explore the updates designed to enhance your bookkeeping experience.
        • Quotes Approval

          Hey all, Could you please help in the following: When creating quotes, how to configure it in a way, that its approval would work according to the quoted items description, not according to quote information. In my case, the quote should be sent to approval
        • Important Update: Facebook Pages API Deprecation

          Dear Zoho Analytics users, As of January 26, 2026, Facebook has officially deprecated Facebook Pages API version 18. This update involves the removal of several metrics that were previously supported by the API. As a result, these changes will affect
        • Adding a Deal to and Existing Contact

          I want to easily add a Deal to an existing Contact. If I click on New Deal on the Contact page this currently this is what happens: All of the mandatory field (and other field) information exists within the Contact. Is there a simple way for it to automatically
        • Email was sent out without our permission

          Hi there, One customer just reached out to us about this email that we were not aware was being sent to our customers. Can you please check on your end?
        • Flexible Partial-Use Coupons (Stored Value Credits)

          Subject: Feature Request: Ability for users to apply partial coupon balances per transaction Problem Statement Currently, our coupons are "one-and-done." If a user has a $50 coupon but only spends $30, they either lose the remaining $20 or are forced
        • Prevent accidental duplicate entry of Customer Ordersome

          Zoho Support has confirmed that Zoho currently does not have any method (using Deluge, flow or any other method) to alert a user when a sales order has been entered twice using the same customer reference number (i.e. a duplicate). Most ERP platforms
        • Customizing Helpcenter texts

          I’m customizing the Zoho Desk Help Center and I’d like to change the wording of the standard widgets – for example, the text in the “Submit Ticket” banner that appears in the footer, or other built-in widget labels and messages. So far, I haven’t found
        • Migrating Brevo Automation Logic to Zoho Campaigns

          Hello Zoho Campaigns Support Team, I am in the process of migrating my email marketing from Brevo to Zoho Campaigns. I have around 10,000 contacts, which I have already successfully exported from Brevo and imported into Zoho Campaigns. I now need guidance
        • Is there a way to delete workspaces?

          I want to remove one of the workspaces in my Campaigns account. I don't see any obvious way to do this. Am I missing something?
        • Boost your Zoho Desk's performance by archiving tickets!

          The longer your help desk operations are, the more likely it is to accumulate tickets that are no longer relevant. For example, ticket records from a year ago are typically less relevant than currently open tickets. Such old tickets may eventually lead
        • Collapsing and expanding of lists and paragraphs

          hello Would you ever implement Collapsing and expanding of lists and paragraphs in zoho writer ? Best regards
        • New Custom View -Sorting the Custom fields

          While creating a New Custom View in invoice , Customers, Bills ,expense etc , the sorting of custom fields are not available , a query function "order by / sort by  " may also be included in  Define new criteria module  which will be more beneficial to
        • Make CAMPAIGNS email look as simple as possible

          Hi there I'm trying to make my Campaigns email look as much like a normal email as possible. I'm a bit stuck with the "justification" of the email email block. Can I LEFT JUSTIFY the "whole email" to make it look "normal"? (Please see screenshot attached)
        • [Webinar] Top 10 Most Used Zoho Analytics Features in 2025

          Zoho Analytics has evolved significantly over the past year. Discover the most widely adopted features in Zoho Analytics in 2025, based on real customer usage patterns, best practices, and high-impact use cases. Learn how leading teams are turning data
        • Next Page