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.

    Access your files securely from anywhere



                  Zoho Developer Community




                                          • Desk Community Learning Series


                                          • Digest


                                          • Functions


                                          • Meetups


                                          • Kbase


                                          • Resources


                                          • Glossary


                                          • Desk Marketplace


                                          • MVP Corner


                                          • Word of the Day


                                          • Ask the Experts



                                                    • Sticky Posts

                                                    • 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
                                                    • Automate a CRM workflow with Zoho Cliq

                                                      Imagine having a virtual assistant that provides rapid updates to your team through Zoho Cliq, helping you stay on top of your sales processes. After returning from a client meeting filled with updates and action items, managing this information together
                                                    • 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


                                                    Manage your brands on social media



                                                          Zoho TeamInbox Resources



                                                              Zoho CRM Plus Resources

                                                                Zoho Books Resources


                                                                  Zoho Subscriptions Resources

                                                                    Zoho Projects Resources


                                                                      Zoho Sprints Resources


                                                                        Qntrl Resources


                                                                          Zoho Creator Resources



                                                                              Zoho CRM Resources

                                                                              • CRM Community Learning Series

                                                                                CRM Community Learning Series


                                                                              • Kaizen

                                                                                Kaizen

                                                                              • Functions

                                                                                Functions

                                                                              • Meetups

                                                                                Meetups

                                                                              • Kbase

                                                                                Kbase

                                                                              • Resources

                                                                                Resources

                                                                              • Digest

                                                                                Digest

                                                                              • CRM Marketplace

                                                                                CRM Marketplace

                                                                              • MVP Corner

                                                                                MVP Corner





                                                                                  Design. Discuss. Deliver.

                                                                                  Create visually engaging stories with Zoho Show.

                                                                                  Get Started Now


                                                                                    Zoho Show Resources


                                                                                      Zoho Writer Writer

                                                                                      Get Started. Write Away!

                                                                                      Writer is a powerful online word processor, designed for collaborative work.

                                                                                        Zoho CRM コンテンツ








                                                                                          Nederlandse Hulpbronnen


                                                                                              ご検討中の方




                                                                                                    • Recent Topics

                                                                                                    • Weekly Tips: Zoho Mail's Email Signatures for a Professional Touch

                                                                                                      We all may have noticed how much more polished an email looks when it is properly signed off, with title, contact info, or even a link to a website. Without it, the email can come across as incomplete or lacking professionalism. Whether you are sending
                                                                                                    • Multiple Admin accounts

                                                                                                      We recently moved Admin access to our original recruiter (who left) and owner ship of the admin account is set to our CEO. I've asked to also be given admin access so he is not a limiting resource but he/we can't seem to find that out. He recently upgraded
                                                                                                    • Automating CRM backup storage?

                                                                                                      Hi there, We've recently set up automatic backups for our Zoho CRM account. We were hoping that the backup functionality would not require any manual work on our end, but it seems that we are always required to download the backups ourselves, store them,
                                                                                                    • Global Search Custom Field

                                                                                                      I need to be able to search a custom field within a lookup field (see attached screenshot). The custom field will not glean any results
                                                                                                    • How to control the # of version of files to keep?

                                                                                                      Currently most of the WorkDrive Storage comprise of the many versions of files saved. How do I save some space and reduce the number of version of date or files saved in WorkDrive? Thanks
                                                                                                    • Announcing the all-new Offers Module and Offer Approvals in Zoho Recruit

                                                                                                      We're happy to introduce - Offers as a module. As we all know, Zoho Recruit is a powerful Applicant Tracking System that can help us. One of its key features is the ability to generate and approve offer letters. When a candidate is the right fit for a
                                                                                                    • Add "Repeating" functionality to Calls

                                                                                                      Tasks supports repeating tasks.... so why not calls.  Phone calls need to be scheduled on a repeating basis for many salespeople.  Then when they filter or report on PHONE CALL activity, they see calls, not tasks. It is not acceptable to have to schedule
                                                                                                    • Inserted Records not showing in Kanban view

                                                                                                      When insert a new record into a report from a workflow, it doesnt show in KANBAN view. When i view the report in a regular list view, the records are there. If i edit the record (while in list view) and then update it at all (even if i dont change anything,
                                                                                                    • Page - Gauge - Target Values

                                                                                                      Is there a way to make the Target and Maximum values say a formula or query?  For example, total sales for the month = 109 and I want to make my gauge today's percentage.
                                                                                                    • Zoho Books Product Road Map

                                                                                                      I am planning to look into Zoho Books to maintain my Company's Account Books. Is the roadmap of Zoho Books Development available online? What happens if you product dies, without an export feature to other popular Accounting softwares like Tally or Quickbook. Are we going to be left in lurch? Do you have a product road map? Regards, Vishal.
                                                                                                    • Elevate email communications with Zia's Writing Assistant in Zoho CRM

                                                                                                      Hello all, Zoho CRM now brings a comprehensive Writing Assistant powered by Zia, designed to help users write clear, concise, and polished texts, for sending emails in CRM. Why you need writing assistant Communicating effectively is critical in sales
                                                                                                    • how to have incline alert on subrow's column or subform or other workaround that at least can let the user know this subform currently has some validation checking.

                                                                                                      I have a subform and each row that are some columns that are compulsory to fill up. If user did not fill up, how to show incline alert on those columns or incline alert on the subform. Or any workaround that at least can bring the user to that fields
                                                                                                    • Need to show discount before total after subtotal

                                                                                                      Need to show discount before total after subtotal on my estimate template (see attachment)
                                                                                                    • NOW Zoho Creator still cannot bulk download Image or File Upload Field

                                                                                                      The filedownloader has been deprecated for 5 years. Until now, we still cannot have a replacement tool. How can we bulk download the file that we uploaded to Zoho Creator. Previously, it was so simple to bulk download all those files. But now failed to
                                                                                                    • Forwarding email into Desk - DMARC errors

                                                                                                      Hi, Our email domain is hosted through Exchange Online (Office 365). Customers email support@ourdomain.xyz which is delivered to Exchange. Exchange rewrites the TO email header to the email address associated with our Zoho Desk (support@ourdomain.zoho.xyz).
                                                                                                    • Zoho Creator Upcoming Updates - March 2025

                                                                                                      Hello everyone, We hope you’ve had the chance to explore Release Projection 1 for 2025! This month, we’re keeping up the momentum by bringing even more powerful features and enhancements to Zoho Creator. Here's what you can expect in March: App menu builder
                                                                                                    • Getting Started All Zoho Desk APIs require these two mandatory fields in the header.

                                                                                                      Hey, according to API Dokumentation, All Zoho Desk APIs require these two mandatory fields in the header. Authorization - Authentication request token orgId -ID of the organization to access. All API endpoints except /organizations mandatorily require
                                                                                                    • Records not showing immediately.

                                                                                                      Hi, I keep coming across a problem when records are inserted, updated or deleted via deluge, the changes / new records or deletions aren't visible in the form's report. (Even after refreshing and clearing browser cache). I am experiencing this issue in both Google Chrome and Firefox. The records will eventually show up, but the delay can vary wildly. Below screenshot shows the report still showing a record which has been deleted via deluge.  When clicking "edit" on the record, Zoho displays a single
                                                                                                    • Create a draft in reply to an email via Emails API

                                                                                                      Hi, I’d like to use the outgoing webhook to automatically create a draft reply to incoming mail. How can I use the Emails API to create a draft reply that is linked to an existing email thread? I couldn’t find the relevant method in the documentation.
                                                                                                    • Download PDF from File Field with the name in another single line field

                                                                                                      Hi I am storing a PDF file in a File Field of a Form using Zapier automatically. now i need to download that file and set its file name as per the value stored in a single line field in that form. ANy turnout for that Thanks
                                                                                                    • DKIM cannot be enabled for the domain as no verified default selector present

                                                                                                      Can't get the DKIM working. May you please check my account (nksy.us) to see what's wrong?
                                                                                                    • 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
                                                                                                    • Circuite fail because www.zohoapis.com:443 refuse conection

                                                                                                      Is anyone else experiencing this issue? A few weeks ago, I started having issues with circuits failing due to www.zohoapis.com:443 refusing the connection. The error message is quite clear and points to a problem on Zoho's API server, rather than with
                                                                                                    • Export PDF File Name

                                                                                                      Is it possible to change the default Zoho .pdf naming scheme for inventory items like quotations? Would like to use the the Subject as the default quote name. Is this possible?
                                                                                                    • Does Zoho campaign de-duplicate based on mobile for SMS campaigns?

                                                                                                      Hi - We recently sent our first SMS campaign using Zoho Campaign integrated into Burst SMS and got feedback that some of our customers received multiple messages. Upon inspection, this was due to multiple contacts in our list containing the same mobile
                                                                                                    • I can't auto-scheduling calls down - the code does not change anything

                                                                                                      Hi, I was trying to set a function that auto-schedules calls based on their call result; i.e "Requested more info". I had also included a reminder to send an email in the code. I logged a test call and nothing changed. Is there anything wrong with the
                                                                                                    • Zoho Flow Custom Function to Register Sale in Zoho Thrive

                                                                                                      Hi Thrive team, I want to create a custom function which sends purchase information back into Thrive for Affiliate commission. I'm stuck on how to setup the connection, specifically creating an OAuth connection through https://api-console.zoho.eu/ Please
                                                                                                    • Feature Request - Insert URL Links in Folders

                                                                                                      I would love to see the ability to create simple URL links with titles in WorkDrive. or perhaps a WorkDrive extension to allow it. Example use case: A team is working on a project and there is project folder in WordDrive. The team uses LucidChart to create
                                                                                                    • Open Link in Lighbox

                                                                                                      I use Zoho Sites and Zoho forms. Is there a way to create a link in Zoho sites that opens up the Zoho Form in a Lightbox in such a way that the user doesn't have to change tabs/windows in order to complete the form? In addition, I would like to create Links to videos with a light box. I want the light box as well so the user doesn't have direct access to the link on Zoho forms. Any assistance would be appreaciated. 
                                                                                                    • How to add custom icons in Sites ?

                                                                                                      I've been trying to upload some of my own icons (specific to my business) to my zoho Site draft, and can't find a way to do it. I guess the workaround could be to insert images instead of icons and upload my icons as images, but I was wondering if its possible to customize the icon library.
                                                                                                    • Documents won't open

                                                                                                      I literally just downloaded the desktop app, and it won't open a document I'm trying to load. I don't have this issue with any other word processor. It's just stuck like this. I do not want to use the online platform at all, I just want to use the desktop
                                                                                                    • FSM

                                                                                                      Hello, I have a question regarding the FSM system. Currently our company has setup the FSM which has two major parts, Requests and Work Orders. The system is set for Requests and Workorders to communicate with each other. Currently Request has 45gb of
                                                                                                    • Free Webinar Alert! Building Your Brand: Solopreneur Tips to Use Zoho Mail

                                                                                                      Hello Zoho Mail Community! We’re excited to invite you to an exclusive session: "Building Your Brand: Solopreneur Tips to Use Zoho Mail." In this webinar, we’ll explore how Zoho Mail helps solopreneurs create a professional brand with custom email domains,
                                                                                                    • Hundreds of folders or tags (for each client): best practices?

                                                                                                      I'm preparing to switch from Gmail Workspace where each of my clients has their own label, assigned automatically after I manually set it up when someone becomes a customer. I know that those labels can be converted into folders in Zoho Mail, resulting
                                                                                                    • how to Add a TXT record in the DNS

                                                                                                      hi everyone, i am using https://pradairways.weebly.com domain for practice purpose, now a Domain Verification - pradairways.weebly.com is required ,how to add txt reocrd in dns and complete the process. thanks in advanced
                                                                                                    • Using Linkedin as 'Unique Identifier ' for Duplicate Management for Candidates and Contacts in Zoho Recruit

                                                                                                      Quick hats off to Zoho Recruit on the functionality of Unique Identifier ' for Duplicate Management for Candidates and Contacts in Zoho Recruit. I recently added the ability to manage duplicates based on Linkedin profile. Candidates' and Contacts' email
                                                                                                    • job opening status is locked and and I cannot change it

                                                                                                      Dear Support I am using standard plan. The job opening status is locked and and I cannot change it.
                                                                                                    • Unified View Desk Tasks

                                                                                                      In the unified view of the tasks, It is not possible to have the tasks of all the services in Zoho Desk. We have to choose a service to display but It's not really the purpose of the unified view
                                                                                                    • The ability to show fields from subforms when viewing from related list

                                                                                                      Hi there, Currently im only able to display default columns , however when im unable to add the columns/fields from the subform Ive created. below is a field called quantity from the subform. Im not able to search up this field from the manage column
                                                                                                    • How to find (total) profits per item in Zoho inventory or Zoho Books

                                                                                                      Hi, I would like to find out how to generate a report that has Item/ Cost Price/Sales Price (total)/Profit (total)/Margin The current sales reports has the total qty sold and the sales price but does not show the profits. Can i check how to do it? Similar
                                                                                                    • Next Page