The constant ebb and flow of employee absences can disrupt projects and hinder productivity. With Zoho Cliq's leave alert automation, you can easily keep your team informed. Real-time notifications can be sent to team chats, ensuring that everyone stays connected.

This enhances communication and workflow management by making all team members aware of colleague absences, while minimizing miscommunication and potential scheduling conflicts.


Pre-requisites:  

Before beginning to script the code below, we must create a connection in Cliq with Zoho People. Once a connection is created and connected, you can use it in Deluge integration tasks and invoke URL scripts to access data from the required service.

Create a Zoho People default connection with a unique name "getemployeeinfo" with the scope - ZOHOPEOPLE.leave.ALL and ZOHOPEOPLE.dashboard.ALL

ⓘ Document for reference : Connections in Cliq 

How to obtain the bot unique name?

 

To use the postToChannelAsBot deluge task, the bot's unique name is essential, and the bot must be a participant in the channel.
  1. Create a bot with channel participation settings enabled to allow users to add the bot to any channel, send messages, listen to messages, and auto-follow threads.
  2. Click on the bot to open its details on the right-hand side. Locate the bot's incoming endpoint, and find the unique name of the bot in the URL after /bots.


Example : If the API Endpoint is:  https://cliq.zoho.com/company/242424/api/v2/bots/leavealerts/message
The unique name of the bot is 'leavealerts'.
  1. Add the bot to the preferred channel of your choice where you want the alerts to be posted.
ⓘ Document for reference :  Adding participants to a channel

Implementation :

Setting up the Zoho Cliq Scheduler

  • Open Zoho Cliq, click your profile picture, select Bots & Tools, and navigate to Schedulers.

  • Under Schedulers, create a new scheduler with the recurring period set to weekly and choose the days from Monday to Friday.

  • Specify the time name, description, and time of execution according to your needs.

ⓘ Document for reference : Schedulers  



Sample Leave alerts script

After providing the scheduler details, click "Save and Edit Code" to add the script below.
  1. currentDate = zoho.currentdate;
  2. currentDateString = currentDate.toString("dd-MMM-yyyy");
  3. info currentDateString;
  4. note = "";
  5. isRestrictedHoliday = "false";
  6. try
  7. {
  8. holidayResponse = invokeurl
  9. [
  10. url :"https://people.zoho.com/people/api/leave/v2/holidays/get?shift=General&employee=1&from=" + currentDateString + "&to=" + currentDateString + "&dateFormat=dd-MMM-yyyy"
  11. type :GET
  12. connection:"getemployeeinfo"
  13. ];
  14. info holidayResponse;
  15. holidayResponse = holidayResponse.toMap();
  16. if(holidayResponse.containsKey("data"))
  17. {
  18. holidayResponseData = holidayResponse.get("data").toList();
  19. if(holidayResponseData.size() > 0)
  20. {
  21. currentDayStatus = holidayResponseData.get(0);
  22. isRestrictedHoliday = currentDayStatus.get("isRestrictedHoliday");
  23. if("true".endsWithIgnoreCase(isRestrictedHoliday))
  24. {
  25. name = currentDayStatus.get("Name");
  26. note = "\nOptional holiday - " + name;
  27. }
  28. }
  29. }
  30. }
  31. catch (ex)
  32. {
  33. exceptionString = "exception occurred during restricted holiday check:  " + ex.toString();
  34. info exceptionString;
  35. }
  36. response = invokeurl
  37. [
  38. url :"https://people.zoho.com/api/v2/leavetracker/leaves/records?from=" + currentDateString + "&to=" + currentDateString + "&dateFormat=dd-MMM-yyyy&approvalStatus=[APPROVED]"
  39. type :GET
  40. connection:"getemployeeinfo"
  41. ];
  42. //info response;
  43. members = response.get("records");
  44. leaveMembers = "";
  45. membersSize = 0;
  46. for each member in members
  47. {
  48. membersSize = membersSize + 1;
  49. leaveMembers = leaveMembers + "[" + member.get("Employee") + "](zohoid:" + member.get("ZUID") + ")\n";
  50. }
  51. info "leave members : " + leaveMembers;
  52. if(leaveMembers.length() > 0)
  53. {
  54. data = {"card":{"theme":"7","title":"Team mates on leave (" + membersSize + ")" + note,"thumbnail":"https://thesoftwarepro.com/wp-content/uploads/2019/12/outlook-out-of-office.jpg"},"text":leaveMembers.trim(),"bot":{"name":"Leave Alerts","image":"https://www.pngfind.com/pngs/m/220-2200933_portfolio-alert-bot-by-symphony-alert-bot-hd.png"}};
  55. info data;
  56. }
  57. else
  58. {
  59. data = {"card":{"theme":"7","title":"Team mates on leave 0" + note,"thumbnail":"https://thesoftwarepro.com/wp-content/uploads/2019/12/outlook-out-of-office.jpg"},"text":"All Present Today.","bot":{"name":"Leave Alerts","image":"https://www.pngfind.com/pngs/m/220-2200933_portfolio-alert-bot-by-symphony-alert-bot-hd.png"}};
  60. }
  61. zoho.cliq.postToChanneAsBotl("CHANNEL_UNIQUE_NAME","BOT_UNIQUE_NAME",data);

Customize and deploy

 

Utilizing the data received from the invoke URL task (i.e., leavetracker/leaves/records GET request), construct a leave report card with Cliq's message builder and post it in the preferred chat or channel.

 

How to obtain the channel unique name?

  1. Go to the channel where you want the alerts to be posted.

  2. Hover over the three dots in the top right corner of the channel and select "Channel Info."

  3. In the Channel Info menu, go to the "Connectors" section to find the Channel Unique Name.





Troubleshooting :

  • Ensure your Zoho People pricing plan includes access to employee leave details.  

  • Verify whether the necessary administrative permissions are granted. Limited access can result in "Permission Denied" errors.

Empower automated workflows and stay ahead of absences

Automating leave alerts in Zoho Cliq boosts efficiency by minimizing disruptions from employee absences. Teams can benefit from real-time leave updates, allowing them to adjust plans, reassign tasks, and maintain the continuity of the project schedule.


      • Sticky Posts

      • Automating Employee Birthday Notifications in Zoho Cliq

        Have you ever missed a birthday and felt like the office Grinch? Fear not, the Cliq Developer Platform has got your back! With Zoho Cliq's Schedulers, you can be the office party-cipant who never forgets a single cake, balloon, or awkward rendition of
      • Accelerate Github code reviews with Zoho Cliq Platform's link handlers

        Code reviews are critical, and they can get buried in conversations or lost when using multiple tools. With the Cliq Platform's link handlers, let's transform shared Github pull request links into interactive, real-time code reviews on channels. Share
      • App Spotlight : PagerDuty for Zoho Cliq

        App Spotlight brings you hand-picked apps to enhance the power of your Zoho apps and tools. Visit the Zoho Marketplace to explore all of our apps, integrations, and extensions. In today's fast-paced world, seizing every moment is essential for operational
      • Automate your status with Cliq Schedulers

        Imagine enjoying your favorite homemade meal during a peaceful lunch break, when suddenly there's a PING! A notification pops up and ruins your moment of zen. Even worse, you might be in a vital product development sprint, only to be derailed by a "quick
      • Bulk user onboarding for Cliq Channels in a jiffy

        As developers, we frequently switch between coding, debugging, and optimizing tasks. The last thing we want is to be burdened by manual user management. Adding users one by one to a channel is tedious and prone to errors, taking up more time than we could

        • Recent Topics

        • Approval - Report/Views

          Hi, On Zoho Desk - Is there a way to report on pending approvals, or a view or similar?
        • "Zoho CRM Integration" option is missing in Zoho Social Settings

          I am trying to integrate my Zoho Social account with my Zoho CRM account. I am on the Professional Trial plan and my user role is "Brand Admin". However, I cannot find the "Zoho CRM Integration" or "Lead Generation" option anywhere in my Zoho Social settings.
        • Zoho CRM still doesn't let you manage timezones (yearly reminder)

          This is something I have asked repeatedly. I'll ask once again. Suppose that you work in France. Next month you have a trip to Guatemala. You call a contact there, close a meeting, record that meeting in CRM. On the phone, your contact said: "meet me
        • Error 553

          Não estou conseguindo enviar ou receber e-mail, sempre dando o erro 553, sendo que há mais de um mês o domínio está pago e liberado. Preciso de um suporte urgente
        • Automate insurance document workflows with Zoho Writer

          Insurance companies have to deal with creating and managing complex documents and forms, such as policy applications, explanation of benefits documents, brochures, renewals, and claim forms. Handling all of this manually is hugely time and effort intensive,
        • Create PDFs with Text so that we can copy from a generated PDF

          Currently, any information that a user enters into a field cannot be highlighted and copied from the PDF that Zoho Sign renders. For example, if someone were to provide a phone number in a Zoho Sign text field, you would not be able to copy the phone
        • How To Insert Data into Zoho Table using Api

          Hi Community, I have created a table inside zoho tables. How do I insert data into table using API. Please tell the exact endpoint and payload , I just have to insert data into table columns. Also tell how to find tableid, viewid, baseid etc. which are
        • How do I delete a folder in Marketing Automation?

          Folders are used across contact lists and segments, and email templates. How do I delete a folder once it's been created?
        • Portal Approval Process

          Hi Zoho team and fellow users, I am seeking a method to establish a multi-step approval process between a Zoho user and a portal user (Custom Portal) to review and approve requests through the Custom Portal. For instance, within this setup, one of the
        • Narrative 8: Intelligent in-app support that's instantly available anytime and anywhere

          Behind the scenes of a successful ticketing system - BTS Series Narrative 8: Intelligent in-app support that's instantly available anytime and anywhere The App Support Across Platforms (ASAP) add-on for Zoho Desk is an independent application that integrates
        • Navigation issue — unable to return to Customer page after opening Receipt from Transactions

          Steps to reproduce: Open a Customer record. Go to Transactions tab and open a Receipt by clicking its receipt number. After viewing the receipt, clicking browser Back or closing the receipt does not reliably return me to the original Customer record (I
        • Thermal Printer Option Needed for Delivery Challan Templates

          Currently in Zoho Books, the Delivery Challan template only supports A4 and A5 page sizes. However, in many businesses (especially retail and hardware), we use thermal printers (like 3-inch or 4-inch rolls) to print delivery challans. It would be very
        • Separate Default Payment Modes for Receipts vs. Payments

          Right now, when I set a default Payment Mode via a customer invoice or Payments Received screen, that same mode shows up for vendor payments (Purchases → Payments Made). 🔹 Request: We need different default modes for: Customer receipts (e.g., default
        • Update/Change GSTIN in GST Settings of zohobooks

          We are trying to update our GSTIN under the GST settings section of our Zohobooks account Initially, we had entered a dummy GSTIN (123456789123456) to generate a sample invoice before obtaining our official GST registration. After receiving our actual
        • Link Payment Mode and Paid Through Accounts

          For most users, it's very difficult for them to understand that the Payment Mode is totally independent of the Paid Through account when paying bills. It seems (and is) redundant for them to have to select what is basically the same thing twice. The current
        • Lets enable business to choose the default payment mode

          Lets enable business to choose the default payment mode so that we do not have choose payment mode again and again for each and every transsctions
        • Add Attachment Support to Zoho Flow Mailhook / Email Trigger Module

          Dear Zoho Support Team, We hope you are well. We would like to kindly request a feature enhancement for the Mailhook module in Zoho Flow. Currently, the email trigger in Zoho Flow provides access to the message body, subject, from address, and to address,
        • South African Payment Gateways

          Since the "Demise" of Wave many South African users have moved over to Zoho and yet for years users have been requesting Integration with a South African Payment Gateway to no avail. Payfast was the most commonly requested gateway as it supports recurring
        • Has anyone verified if Zoho is PCI compliant?

          We are planning on using Zoho to process payments via Authorize.net. We have everything set up and are attempting to complete the PCI DSS SAQ-A requirement for our merchant account. This requires us to prove Zoho has completed the SAQ-D for Service Providers. We need a way to verify compliance, or a copy of an attestation of compliance signed by the appropriate officer at Zoho. I assume I'm not the first person to use Zoho to process payment, and therefore not the first to require this information
        • Support for Custom Fonts in Zoho Recruit Career Site and Candidate Portal

          Dear Zoho Recruit Team, I hope you're doing well. We would like to request the ability to use custom fonts in the Zoho Recruit Career Site and Candidate Portal. Currently only the default fonts (Roboto, Lato, and Montserrat) are available. While these
        • Bigin Plugin for Outlook

          Could we get this added? The Gmail version already exists, and I would like to avoid having to make a switch.
        • Date does not fit the field

          Hi There. I am having fun learning zoho sign API. Today I noticed the "Signed Date" field does not fit, or alternatively the font is to large for the auto field space. See screenshot below. The signed date field is created by putting {{Signdate}} on the
        • Tip of the Week #69 – Automate your Zoho TeamInbox tasks with n8n integration.

          Don’t waste time repeating the same tasks—like sending follow-up emails or adding new contacts. Let automation save the day. With n8n, an open-source automation tool, you can connect your favorite apps and let them handle the busywork for you. You don’t
        • Multi Page/Step Forms in creator

          Greetings i was wondering if it's possible to create multipage/step forms on creator similar to what we have on zoho forms. is that possbile? Thanks
        • Package Geometry

          how can i add the dimensions and weight capacity of the available boxes to be default in the system everytime we use it ?
        • How to create a Master Kanban Board that syncs with Child Projects?

          Hello, We're currently using Zoho Sprints for managing our interdepartmental teams, and we're looking to enhance our workflow using Kanban boards as part of a company-wide productivity improvement initiative. Our goal is to implement a project structure
        • Writer.. Broken?

          Hello,  Writer has been really good to me during the months I've used it, up until now.  I usually launch the app by tapping the icon and I could immediately pick up where I left off.  Now I'm greeted by a loading circle not reaching 100% and I only have the option to create a new account.  By pressing that button it now switches to a login screen and I can access my account. However, it seems (only speculating ofc) to be stuck in cell-phone mode? everything looks scrambled.  I can't access any of
        • How to access Recruit Variables in a Deluge function?

          I have set up Recruit Variables in Zoho Recruit, and I would like to know how to retrieve these variables from within a Recruit custom function (Deluge). Could someone please explain the correct way to access them? I tried the following code, but it did
        • Upon De activate a user what name doe sthe contacts candidates go under?

          When deactivating a user, does the user name remain the same, as the candidate owner? If not what/who, does it change to? Do I need to change the user name in contacts and candidates before I deactivate the user?
        • Weekly Tips: Customize alerts from your Priority Users

          You might receive hundreds of emails daily, but messages from your manager, clients, or team leads often require immediate attention, as they may contain urgent requests or critical updates. How would you ensure you never miss important messages from
        • Maximum 100 records in Sheet View is limiting. How can I increase this?

          Thanks in advance for any help with this. There was a similar post that showed answered but it did not help with increasing the number of records you see in a Sheet View. Editing in the Sheet View is fast and efficient but I have 3500 records and I need
        • Revenue Management: #3 Revenue Recognition Simplified

          In continuation of the previous post on how to compute revenue recognition, let's explore a solution that helps businesses handle real-world complexities. While the Accounting Standards provide a clear framework for recognizing revenue, the real challenge
        • Tip #40- Strengthen Remote Support with IP-based Restrictions in Zoho Assist– ‘Insider Insights’

          Protecting sensitive data and preventing unauthorized access is a top priority for any organization. With IP-based restrictions in Zoho Assist, you can ensure that only users from trusted networks can initiate remote support sessions. Say your IT team
        • Push Invoices to Xero Manually

          Hi guys, I'm wondering if anyone has wanted to do this and has a workaround or knows of an app that may be able to help with this. I sell B2B and B2C. The customers can purchase on our website or through marketplace, all of which send sales to zoho. The
        • OpenAI error code: 1010 in a Zobot

          Please see short linked screen recording. Insights welcome. Please and thank you! https://workdrive.zohoexternal.com/external/f3247ba9c872639157b707700c0300c433c7664aea924a034f4da3c3ad2e355f
        • Ability to Create Sub-Modules in Zoho CRM

          We believe there needs to be a better, more native way to manage related records in Zoho CRM without creating clutter. Ideally, Zoho would support "sub-modules" that we can create and associate under a parent module. Our use case: We have a custom module
        • Installing EMAIL Setup in New Domain

          Respected Support team, I'm facing an issue with cloudflare in Pakistan, I want to setup Zoho Mail Setup but I Don't know how to enable Zoho mail setup without cloudflare. My Website https://stumbleguymod.com/ is using CF, and I want a different Zoho
        • Does Zoho Sheet Supports https://n8n.io ?

          Does Zoho Sheet Supports https://n8n.io ? If not, can we take this as an idea and deploy in future please? Thanks
        • Signature change

          I cannot see how to change signature or out of office details easily now in the new format.
        • Inventory API - Retrieve all uploaded product / item images

          I know that I can get the primary image for each product / item or composite item, by using the /image endpoint.  https://inventory.zoho.com/api/v1/compositeitems/<item-id>/image?authtoken=<TOKEN> This will return only one photo, even if the item has multiple images uploaded. Is there a way to retrieve all images stored for an item via the Zoho Inventory API?
        • Next Page