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

        • Bigin Android app update: User management

          Hello everyone! In the most recent Bigin Android app update, we have brought in support for the 'Users and Controls' section. You can now manage the users in your organization within the mobile app. There are three tabs in the 'Users and Controls' section:
        • Zoho Projects Fonts and Accessibility missing

          I cannot find any more the tab where I can change the font in Zoho Project. I also checked the knowledgebase and there they have accessibility tab which I am completely missing. Is there some setup I am missing or is it a problem with our account?
        • 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,
        • Zoho Books Custom Widgets Deprecation Error

          I created a simple sample widget with zet and published it using sigma Both in the Sandbox and Production the Widgets are showing this error
        • Problems with PDF files in notebook

          I'm evaluating Zoho Notebook as an alternative to Evernote and imported my Evernote account to Zoho Notebook. First issue is that notes in Evernote that comprise a PDF are turned into a 'group' with a single note page (that has the text from the Evernote
        • API (v3) Tasks sorting issue

          We are using the v3 API for Projects. When we gat all tasks, per page of 100 tasks, we get the task info alright. But when we try to sort based on DESC(last_modified_time) we don't get the correct sort order. It is roughly sorted by the last_modified_time,
        • Assemblies make my stock go negative

          I am sure this is just the way that we are using this feature, but we use assemblies, a lot. The issue for us is the way that the relive inventory and the fact that it makes our composite item stock go negative. I have added flows to auto assemble and
        • User Activity Reports

          I'd like to get data related to user activity.  For example, Login and logout times, emails sent/received, new records created , etc. Is that currently available. I just can't seem to find anything . Thanks, Dave
        • Help: Populate “Contact Owner” details into Customer custom fields (for email templates) in Zoho Books

          We want to send invoices on behalf of our sales agents, and include the agent’s name, email, and phone in the email body using placeholders. Plan is to copy the Customer Owner details into three Customer custom fields, so they can be used as placeholders
        • Undocumented Books API error message - 1000 - The requested action could not be completed. Please try again. | Unexpected error

          This code sometimes throws this error 1000 - The requested action could not be completed. Please try again. | Unexpected error What does it mean? result = zoho.books.updateRecord("salesorders",organization.get("organization_id"),salesorder_id,sales_
        • Partial payments for retainer invoices

          When a customer does not pay the entire retainer invoice there is no way to apply a partial payment. PLEASE add this function.
        • Making Tags Mandatory

          When creating an expense, is it possible to make the Tags field mandatory?  I see the option in settings to make other fields mandatory, like Merchant, Description, Customer, etc, but nothing about Tags. Thanks! Kevin
        • Mass Update not trigger workflows

          Hi, I have performed a mass update of all records in a custom module using a custom view. I have a dummy checkbox on my module that I turn on or off - hoping to trigger all the new workflows that have been created for that module. However, no workflows
        • Multi-Select lookup field has reached its maximum??

          Hi there, I want to create a multi-select lookup field in a module but I can't select the model I want the relationship to be with from the list. From the help page on this I see that you can only create a max of 2 relationships per module? Is that true?
        • Generating CRM reports based on date moved in staged history

          Hi everyone, I'm trying to generate CRM reports of jobs (I think these are called usually deals) based on when they were moved to a particular stage, ie all jobs that were moved to Proposal/Quote in the previous financial year. I can see from other similar
        • Modules for missed calls, emails, texts etc

          Hi there. Is there a way to create a module that would automatically show a list of all inbound calls that were missed by our users, as well as any inbound SMS's, emails & WhatsApp messages. That way, a user who is available, can work through that list
        • Subforms and automation

          If a user updates a field how do we create an automation etc. We have a field for returned parts and i want to get an email when that field is ticked. How please as Zoho tells me no automation on subforms. The Reason- Why having waited for ever for FSM
        • Conditional layouts - support for multi-select picklists

          Hi, The documentation for conditional layouts says the following: "Layout Rules cannot be used on the following field types: Auto Number Lookup Multi Select Lookup User Lookup Formula File Upload Multi Line" I have a custom module with a multi-pick list
        • Ability to Set a General Email Signature for the Organization in Zoho Recruit

          Dear Zoho Recruit Team, I hope you're doing well. We would like to request a feature that would allow us to set a general email signature at the organizational level within Zoho Recruit. Currently it is only possible for individual users to create their
        • Custom Buttons & Links Now Supported in Portals

          We’ve just made portals in Zoho Recruit more powerful and customizable than ever! You can now bring the power of Custom Buttons and Links to your Candidate, Client, Vendor, and Custom Portals — enabling portal users to take direct action without recruiter
        • 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
        • CC and/or BCC users in email templates

          I would like the ability to automatically assign a CC and BCC "User (company employee)" into email templates. Specifically, I would like to be able to add the "User who owns the client" as a CC automatically on any interview scheduled or candidate submitted
        • Is there a way to show contact emails in the Account?

          I know I can see the emails I have sent and received on a Contact detail view, but I want to be able to see all the emails that have been sent and received between all an Accounts Contacts on the Account Detail view. That way when I see the Account detail
        • Live webinar: Transform data into impactful visuals with Zoho Show

          Data is frequently a core part of a presentation, whether it’s a sales pitch, project update, research report, or performance review. But when it’s just numbers on a page, the message you’re trying to convey can get buried. The real magic happens when
        • Zoho Projects - Q2 Updates | 2025

          Hello Users, With this year's second quarter behind us, Zoho Projects is marching towards expanding its usability with a user-centered, more collaborative, customizable, and automated attribute. But before we chart out plans for what’s next, it’s worth
        • File attachments not working - web version

          Since Notebook announced better file attachments, I have experienced file attachments failing. When uploaded from my pc to the web version, notebook just spins. Acting like the attachment is very large. When it's 30k. If I cancel out of this, the notecard
        • API - Barebones Data for Send Doc For Signiture

          I am learning how to use with Zoho Sign API. I am wondering if someone can give me a bare bones JSON data sample for "Send Document For Signature". Below is the blank data that is pre-populated in postman. Seems like there is more here than the bare minimum
        • Revenue Management: #2 How to compute revenue?

          In our previous post, we discussed the revenue recognition standards under IFRS 15 and ASC 606 and the five-step model. Now, let's examine three distinct business scenarios to see how the standards and model work in practice. This will help you understand
        • External lookup in CRM (as in Books)

          Hello Context: We have a CRM module, similar to Deals, but for Purchasing. Once the PO is created, a link to this PO should be updated in that "deal". In Books, you can add a custom 'external' field which can look up into CRM modules. I'm asked to have
        • "Undo Send" Feature

          Would love it if TeamInbox had an "Undo Send" feature, that gives you 10 seconds or so to "undo" the sending of an email. Many other email clients already have this feature, and my clients really miss it, as it has saved them many times in the past when
        • Better Notes Commenting

          Hi, I'd like to suggest better collaboration tools for NOTES. The current notes section for Accounts, Contacts and Deals is not ideally suitable for any degree of communication or collaboration. When responding to a note, there is no ability to leave
        • Zoho Sites

          Does anyone have experience building Zoho sites or know how I can find someone who does?
        • Zoho Crm Lagging

          Hi Zoho Support Team, Starting from today, my Zoho CRM has been extremely slow and laggy when accessing any pages or modules. This is affecting my work and overall productivity. Could you please help to check if there are any ongoing issues or if there’s
        • Is there a way to reference/attach mails to deals/contacts when the mails haven't come through their contacts normal email and the mail comes through software / app who use their mail system

          There are often system mails that come through systems or other software which use their email addresses since they use their own mail servers to mail. This causes an issue as it does not record the mail in the history of the CRM since the email is not
        • Recommendation

          I give up on Zoho. It's never going to be an all in one solution, their own apps don't even connect. Can any one recommend an alternative at least for the crm / people.
        • CRM - Site/Location

          Hi Zoho, One massive oversight of the Zoho CRM is the inability to add multiple sites or locations to one account. Many organisations have several (in some cases, hundreds) of sites across the country or even the globe. The workaround to this, of course,
        • An unknown error occurred. Please contact support

          Whenever I visit this page I see this. I changed browser and still the same. Can someone from Zoho help me please?
        • How to Streamline Pick & Ship

          Is there a way to streamline the built-in pick and ship process? I guess mostly on the ship side. Our current process allows us to choose shipping super fast. It's an EasyPost plugin for WooCommerce. You have to populate the boxes / weights / shipping
        • How to add, delete or rename the "payment method" drop down?

          When we recorded payment in invoice, there's a "payment method" drop down with choices like cash, bank transfer... We want to add and delete or rename some new selection. How to do such adjustment? Please advice.
        • Smarter data gathering with Query component in Wizards

          Dear All, Introducing the Query Component in Wizards for CRM! A smart search field that saves you time and effort, and helps you manage and gather data more efficiently than ever before. Long and complex record entries can be overwhelming and prone to
        • Next Page