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 leave alerts in Zoho Cliq

      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
    • 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
    • Convert a message on Cliq into a task on Zoho Connect

      Message actions in Cliq are a great way to transform messages in a conversation into actionable work items. In this post, we'll see how to build a custom message action that'll let you add a message as a task to board on Zoho Connect. If you haven't created
    • Cliq Bots - Post message to a bot using the command line!

      If you had read our post on how to post a message to a channel in a simple one-line command, then this sure is a piece of cake for you guys! For those of you, who are reading this for the first time, don't worry! Just read on. This post is all about how
    • Cliq Bots - How to make a bot respond to your messages?

      Bots are just like your buddies with whom you can interact. They carry out your tasks, keep you notified about your to-dos and come in handy when you need constant updates from a third party application.  So, how can you make your bot respond to a message? The bot message handler is a piece of code triggered when a message is sent to the bot. Message handlers help you customise your bot responses to make it look conversational. The message input from the user can be either a string or an option selected
    • Recent Topics

    • How to add a customized/dynamic Zoho Booking link in email footer?

      We just installed the latest version of the Zoho Desk <=> Zoho Booking extension from the marketplace and are quite happy to see the feature where a ticket-specific appointment booking link can be inserted in a reply. Is there any way to configure this
    • Date Time

      Hi Everyone, I would seek some help about this concern that bugs me. I'm currently working using Zoho Flow to automatically plot a calendar on the Calendar Report. Whenever a ticket from Zoho Desk Field was updated this will trigger to create a plotted
    • Is it possible to load a Module with a filter pre-applied by the URL?

      In many of the CRM related lists, there is limited sorting, and no filtering available. I thought of the idea of putting a Custom Button on a Related List that would take the user to that module, but PRE-FILTERED by the Account from where they were viewing
    • Which WhatsApp API works seamlessly with Zoho CRM?

      I’m exploring WhatsApp API solutions that integrate seamlessly with Zoho CRM for customer communication, lead nurturing, and automation. I would love to hear insights from those who have successfully implemented WhatsApp within Zoho CRM. My Requirements:
    • Crear tarea CRM con recordatorio desde Zoho Flow

      Hola, estoy intentando crear desde Zoho Flow una tarea en CRM. Lo he logrado hacer pero sin recordatorio, ya que no se como se debe escribir el string adecuado. He probado varias alternativas, pero ninguna me funcionó hasta ahora. - FREQ=NONE;ACTION=EMAIL;TRIGGER=DATE-TIME:${FechaVto}
    • Trying to setup a record to automatically create on a weekly basis

      Hello all, I need multiple records to be automatically created on a weekly basis. What I'm trying to accomplish is, I have a maintenance database where I track when I work on IT related systems. Every week on the same days I perform backups on systems
    • 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?
    • Custom Roles & Granular Permission Control in Zoho SalesIQ

      Hello Zoho SalesIQ Team, We appreciate the functionalities offered by Zoho SalesIQ, but we would like to request a crucial enhancement regarding user roles and permissions. Current Issue: At present, Zoho SalesIQ provides fixed roles—Admin, Supervisor,
    • Help with cookie code, utm variables are overwritten on every page load with new variables

      Hi all, My goal is to track the very first web page that a user visits, and store those utm values throughout all of the future visits until a lead form is submitted. That way, if a person is retargeted, I can still attribute the very first visit as the
    • Alignment of Company Information Page Structure in Zoho One and Zoho Desk

      Hello Zoho One Support, We appreciate the continuous improvements across Zoho products. Recently, Zoho Desk restructured the Company Information page into three distinct sections: Company Profile – Includes Company Name, Logo, Alias, Description, Website,
    • How to connect the Squarespace website with Zoho Thrive

      Our website is created using Squarespace. To boost our sales, I planned to do the affiliate program and I thought to integrate our website store with Thrive. but I don't see the Squarespace platform. if I choose the custom build, I have to generate the
    • Gravity Forms plugin not passing some fields

      I use the gravity form zoho plugin to push data from my lead form into my lead page in Zoho CRM. Everything was working file for about 6 months. Suddenly on Oct 1st, some of the fields are no longer getting passed to Zoho. The fields with the problem
    • Introducing 'Queries' In Zoho CRM

      Hello everyone! We are here with an exciting feature - Queries in Zoho CRM! A little context before we dive right into the feature specifics :) In today’s fast-paced business environment, immediate access to relevant data is essential for informed decision-making.
    • Weekly Tips: SecurePass For Extra Security

      Imagine sensitive data from your organisation sent via email is being accessed by unintended recipients. The sensitive data can range from Personal Identification Information to a tender quotation or a client’s NDA document. The unintended access could
    • Auto Copying an field from auto generated field in zoho crm

      I have products module in zoho crm, in which i have Part Number which is auto generated whenever the new product is created, i have made another field by name "SKU Number" i want that value of "Part number" should be auto copied to "SKU Number" whenever
    • Calling a function within another function

      Hello there, I have just found out that you can simply call up functions in other functions, regardless of the department. You can't create functions with the same name twice, even though you are in a different department. If you try it, you don't get
    • Related Record Bug

      Hi, Report a bug. Related record amount currency will display default currency (AUD) not the actual one (CNY). While if we click into the record and back, the currency will change to CNY (Correct). Then If we refresh browser, currency still show AUD
    • Introducing Social Toolkit

      Hi everyone, We're thrilled to launch Social Toolkit, a one-stop dashboard to help take your social media presence to new levels by letting you create aesthetic profiles and share content that your audience will actually enjoy engaging with. Social Toolkit
    • Zoho Forms - Shared Forms

      I chose SHARED FORMS and noticed "Enter atleast" needs a space to be correct.
    • Email Verification on Subdomain

      Hi, The latest guidelines for setting up an email newsletter are to set it up on a subdomain of your main domain so that if you get put in a spam block, it doesn't block all your company email. We have been trying to set this up and managed to get our
    • Posibility to add Emoticons on the Email Subject of Templates

      Hi I´ve tried to add Emoticons on the Subject line of Email templates, the emoticon image does show up before saving the template or if I add the Emoticon while sending an Individual email and placing it manually on the subject line. Emoticons also show
    • How to display Motivator components in Zoho CRM home page ?

      Hello, I created KPI's, games and so but I want to be able to see my KPI's and my tasks at the same time. Is this possible to display Motivator components in Zoho CRM home page ? Has someone any idea ? Thanks for your help.
    • Custom module - change from autonumber to name

      I fear I know the answer to this already, but thought I'd ask the question. I created a custom module and instead of having a name as being the primary field, I changed it to an auto-number. I didn't realise that all searches would only show this reference.
    • Show my cost or profit while creating estimate

      Hi, While creating estimate it becomes very important to know exact profit or purchased price of the products at one side just for our reference so we can decide whether we can offer better disc or not .
    • Show Zoho Cliq Reminders in Zoho Calendar

      Hi Zoho Team, I hope you're doing well. We appreciate the existing integration between Zoho Cliq and Zoho Calendar, which allows meetings scheduled via Cliq to be displayed in the calendar. However, we’ve noticed that reminders set in Zoho Cliq do not
    • Pushing GCLID info from Gravity Forms to ZohoCRM

      We are switching to Gravity Forms from Zoho Forms and I cannot find any good info on how to make sure my GCLID tracking info is pushed through to the CRM through my new forms. There was an article in the documentation about placing something within the
    • 【Zoho CRM】アクセシビリティ向上機能リリースのお知らせ

      ユーザーの皆さま、こんにちは。コミュニティチームの中野です。 今回は「Zoho CRM アップデート情報」の中からアクセシビリティ向上機能をリリースしましたのでご紹介します。 アクセシビリティ向上機能とは? すべての人が快適に利用できるように、フォントサイズの調整、色覚サポート、キーボード操作の最適化など、18のアクセシビリティコントロールを提供し、ユーザーのニーズに応じたカスタマイズを可能にします。 概要動画はこちら(英語) 以下にて、本機能の一部を紹介します。 アクセシビリティ向上機能の設定方法
    • 5名限定 課題解決型ワークショップイベント Zoho ワークアウト開催のお知らせ(2/27)

      ユーザーの皆さま、こんにちは。Zoho ユーザーコミュニティチームの藤澤です。 2月開催のZoho ワークアウトについてお知らせします。 今回は久しぶりに品川にて「オフライン開催」します!! ※定員に達したため、受付を終了しました。 ━━━━━━━━━━━━━━━━━━━━━━━━ Zoho ワークアウトとは? Zoho ユーザー同士で交流しながら、サービスに関する疑問や不明点の解消を目的とした「Zoho ワークアウト」を開催します。 Zoho サービスで完了させたい設定やカスタマイズ、環境の整備など……各自で決めた目標達成に向け、
    • I want to change the threshold for data quality.

      The following error occurs in Zoho Data Prep. > The export was interrupted because the quality of the data set (88.147) is below the minimum quality (100) set. I want to change the data quality threshold, but where can I do this? Translated with DeepL.
    • Bulk change color of selected notes

      When I select several notes, I want to change their color, but there is no such function. I miss it.
    • 📣📣 Zoho Bookings - Feature Roadmap 2024

      Hi Everyone, Thank you for all the support you have been showing Zoho Bookings. We had a fabulous 2023, with a bunch of new features and over 60K new users. In 2024, our prime focus will be on user experience, and we have a few vital features coming in
    • 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
    • Importing Attendees- Excel

      I would like the ability to import attendees using an excel file. Sometimes groups, such as schools have to sign up attendees through there system and then send my organization an excel spreadsheet. Right now there doesn't seem to be a way to import those attendees. If Backstage can export to an excel file it seems like a no-brainer that one would be able to populate that template and import attendees into Backstage.
    • Python Code: Calling "Deals" API results in 404 Error.

      Good evening, I wrote a small python code to scrape the data from a selected record and then copy the information I need into another website. We have renamed the "Deals" module to "Opportunities", however the API name remains as "Deals" which is fine.
    • Bad change: Zoho Notebook Android app requiring Google Play Store login

      I have been a Zoho user for a decade or so, and a One subscriber for several years. There are always areas for improvement, but on the whole, I've been quite happy with it. A big part of my choice to go wtih Zoho is that I value data privacy, and try
    • Marking a Desk ticket as Unread after merge

      We have a custom script that runs against every new ticket and auto-merges it with any existing ticket that matches our criteria. That works fine but there is no functionality that reverts the newly-updated ticket back to an "unread" state. I found the
    • Need best practices and ideas for group calendars or personal calendar with group invite

      Please share your ideas and best practices to use Calendars. Here's the situation. Using a group calendar to hold weekly recurring meetings for the "Design Team" means that Design Team members can easily view/hide the calendar. However, it also means
    • Restrict Payment Methods

      Allow us to restrict certain payment methods specific for each customer.
    • Issue with Bin Locations and Stock Counting in Zoho Inventory

      Dear Zoho Support, We are currently experiencing a significant issue with bin locations and stock counting in our warehouse. Our warehouse is divided into 7 zones, each containing approximately 250 bin locations. When performing a stock count for an item,
    • How to block a WhatsApp user for sending spam

      Is there a way to block those whatsapp users that just come to play and annoy our service, they also spam us. We have a waba service with sales iq
    • Next Page