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

        • 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
        • Introducing teamspaces and team modules in Zoho CRM mobile app

          Hello everyone, We have an exciting update to share in the Zoho CRM mobile app. As part of CRM For Everyone—a new set of features that reflect our vision to democratize CRM and make it accessible for all—teamspaces and team modules are now available on
        • Client Script - change page and/or section background colours

          Hello, Would anyone be willing to help me with a bit of Client Scripting code? I have had a go myself but only been able to alter the form field styles, not the overall page/section/heading styles. I want to set a different page background colour for
        • 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
        • Zoho SalesIQのチャットボット、ブロックのコピー機能

          Zoho SalesIQのチャットボットの構築でドラッグアンドドロップで作成を行っているます。 内容は同じブロックのコピーペースト機能がないみたいなのですが、同一のブロック、同一の複数のブロックをいくつも作成する場合は、皆様はどのように行われていますか? 例えば添付の4つのブロックをまとめてコピーして、別のフローの先につなげる場合です。 教えていただけますと幸いです。よろしくお願いいたします。
        • Questions About Zoho Commerce Member Portal

          Hello, A couple questions about the Zoho Commerce Member Portal: 1. Can I add only specific pages be added to the Members Portal, and not the entire website? 2. When a customer signs up on my Zoho Commerce site, is there a setting that gives me a chance
        • Cancel and refund

          Hi, Yesterday I paid for the Zoho email subscription. Within a few minutes, I realized that the subscription counts one email ID as one user. To make another email ID for the same domain name, I'd have to pay for another user. I emailed right away to
        • Online Payment Fees

          We don't take many online credit card payments so the merchant service provider (PayPal) charges us the 2.9% fee for processing the amount. I would like the ability for the fee to be automatically added to the total amount for "ease of payment". We'd
        • Error occured. please try again!!!

          I created a new list. Added two new contact's email addresses. I try to EDIT either one of them to add their first name, last name and phone number. Whatever I try to edit and update, I get the error message  Error occured. please try again!!! And it doesn't update any of their info. I tried just editing first and last name. Still get the error. No matter what I try to update, I get the error. I tried creating a new list, and adding just one email address and then edit it and also get the error.
        • "Send email as" not work

          Hi team, I currently use ZOHO MAIL services on the MAKE platform (formerly INTEGROMAT). In MAKE I entered my ZOHO MAIL credentials but the problem is that when the emails are sent from the automation in MAKE, the emails do not come in with the name set
        • *UPDATE: ISSUE RESOLVED, SEE HOW FOR HELP* Issue imbedding Youtube Videos

          **UPDATE: RESOLVED** For anyone that is having a similar issue, try this workaround before attempting to have the Zoho techs fix it. I have been in communication with them for weeks about this and they can't seem to fix the issue. Thinking it may have just been my computer or my browser, I tried two different computers on two different networks, each running different versions of Windows, and tried it on Chrome, Firefox and IE; nothing worked. So, needless to say, it's an issue with Zoho somewhere.
        • Backorder For Composite Items

          Hello If i released SO for composite item and use backorder feature of zoho inventory then it should backorder child item items of composite and not composite item.This is basic of backordering.I conveyed this to zoho call center but no solution yet.
        • Paid Support

          We are in the process of creating tiers for our support offerings. There will be three tiers of support available - 2 paid and 1 free. The paid tiers will be purchased in allotted hours. I need to figure out how to a) work in the out of the box SLA, Contracts
        • Where is the desktop app for Zoho Projects???

          As a project manager, I need a desktop app for the projects I manage. Yes, there's the web app, which is AWESOME for cross browser and platform compatibility... but I need a real desktop app for Projects that allow me to enter offline information where
        • Automatically CC supervisor

          Hello,  in our organization agents are replying to tickets and they are required to CC their supervisor on all emails to and from customers.  is there a way to have an email address automatically populate in the CC field when reply to a ticket?  tha
        • Zoho One - White Label

          Releasing a white-label feature for Zoho One, or any software or service, can offer several advantages and benefits for both the company providing the software (Zoho in this case) and its users. Here are some key reasons for releasing a white-label feature
        • Are this Features included in the Road Map

          1. Sync between description/short description in Zoho Books/Inventory and Zoho Commerce: I am unsure how it works now. I belive the description is not pulled. 2. Pick Up: This feature is great. It is added on Zoho Commerce but not on Books/Inventory which
        • Reconciliation - Show Transactions After End Date

          I did a quick search, and I've only seen this brought up indirectly. In the reconciliation interface, transactions dated up to a week after the end date should be available for being reconciled. The use case is pretty simple... many times, transactions
        • Auto populate email field in zoho form

          Hi,  Is there a way the email field in zoho forms can be auto populated based on the name selected from a drop down list?
        • Option to accept and pay for estimate from Public Estimate link?

          Is there any way that our customers can get the Estimate in their email, click on "View Estimate" and from the public link, click Accept and Pay? When they click that, in the background Zoho would create the invoice record in the so that the payment would
        • Kaizen #125 Manipulating Multi-Select Lookup fields (MxN) using Zoho CRM APIs

          Hello everyone! Welcome back to another week of Kaizen. In last week's post in the Kaizen series, we discussed how subforms work in Zoho CRM and how to manipulate subform data using Zoho CRM APIs. In this post, we will discuss how to manipulate a multi-select
        • Easily track referrals with Zoho Forms

          Referral tracking can be a powerful way for businesses to understand where their leads are coming from. With Zoho Forms, tracking the referral sources of your leads is an easy and straightforward process. Here are some tips to help you make the most of
        • Add an email to an existing ticket is not working

          I noticed that in Zoho Desk the funcionality to add an email to an existing ticket is not working using the syntax [##12345##], has the method changed? In red is the syntax we use to add email to an existing ticket As you can see, he did not add the email
        • New CRM to Campaigns Sync Doesn't Continue Making Updates

          Changes made in CRM are not appearing in mapped fields in matching Campaign records after migrating to the new sync process. The only way we've found to get records to update is to call into Support and point out the problem. After convincing Support
        • Zoho Integration with UPS

          I have 2 questions: Firstly, is there a way to notify UPS that we have a package to collect once we have done the shipping label? Secondly, how do I get the tracking number and shipment method onto the Invoice and Package Slip for the customer? Than
        • Cannot log in to IMAP account as of last night

          Hey I've been using MFA with an authenticator for a while and have had to use application passwords for Outlook and Edison Mail on my Android devices. Last night the app passwords started to be rejected on my Android devices so I created new ones for
        • Low Stock View

          We use the Low Stock view frequently as a guide to inform us when to reorder items, but the view is misleading because it does not take into account Purchase Orders that have already been raised. Unless you are aware and check item by item, this can lead
        • Improve History Feature in Zoho Inventory

          At present there is a "history" tab on Zoho Inventory Items, however this only shows a date and time stamp along with the users name. It doesn't say what was changed. What is the value of this if you can't see what was changed? My Ideal is to include
        • Payroll and BAS ( Australian tax report format )

          Hello , I am evaluating Zoho Books and I find the interface very intuitive and straight forward. My company is currently using Quickbooks Premier the Australian version. Before we can consider moving the service we would need to have the following addressed : 1.Payroll 2.BAS ( business activity statement ) for tax purposes 3.Some form of local backup and possible export of data to a widely accepted format. Regards Codrin Mitin
        • Show backordered items on packing slip

          We send out a lot of large orders, and often there are one or two things backordered. How can I fix the packing slips to show quantity ordered  & quantity packed There should also be the ability to "ship" 0 of an item so the receiver knows that things
        • Document | Files

          The vendor "Partial matches" still not fixed here after years of putting up with having to select most vendors manually ! ( again, the banking "Transaction rules" would solve a lot of these issues ) Some unwanted, irrelevant pdf's also arrive. It would
        • books+POS+ tap to pay+ stripe

          So in the UK we now have tap to pay with stripe. So we can use the stripe app as a POS terminal. Brilliant news. Can we hope that the Books App might add this feature ASAP. It would be great to have one system rather than using the not very good Square
        • Canvas Form View - Client Script Page on load - Url params not working

          We have a custom module with a canvas page for form view. We have a button in Customers module to open this canvas page using invokeurl function. We send few parameters as in the URL as query parameters. https://crm.zoho.in/crm/orgxxxxxxxx/tab/CustomModule12/create/canvas/64333200000261xxxx?layoutId=643332000002605001&c=${Customers.Customer
        • Sending Recruit SMS's to Zoho Cliq - Or tracking in the Messages module in Recruit?

          Is there any way to send SMS Gateway messages in Recruit to ZOho Cliq? We use 2-way SMS massages a lot in Zoho Recruit to speed up communication with Candidates. However the only way to keep track of received SMS's is by keeping a look out for the Email
        • Next Page