Automating Attendance Tracking with Zoho Cliq Developer Platform

Automating Attendance Tracking with Zoho Cliq Developer Platform

I wish remote work were permanently mandated so we could join work calls from a movie theatre or even while skydiving! But wait, it's time to wake up! The alarm has snoozed twice, and your team has already logged on for the day.



Keeping tabs on attendance shouldn't feel like guiding a flock of rebellious sheep. Hence, let's automate check-in and check-out notifications using the Zoho Cliq Platform Schedulers and the Zoho People API, eliminating the guesswork in attendance management and reducing the risk of errors associated with manual monitoring.

How does this solution benefit a business?

  1. Real-time reminders reduce instances of ghost check-ins and ensure accurate recording of everyone's logged hours.
  2. Essential for attendance tracking, payroll accuracy, compliance with labour laws, and audits.
  3. The entire team stays informed, fostering a cohesive workflow that eliminates the need for micromanagement.      
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 any unique name with the scopes - ZohoPeople.Attendance.ALL , ZohoPeople.forms.ALL and ZohoPeople.leave.ALL

ⓘ Document for reference : Connections in Cliq 

 

How to obtain or locate the channel unique name in Cliq?

  • Navigate to the top right corner of the channel and locate the three dots. Click it.

  • In the menu that appears, select "Channel info" and a pop-up will open, displaying detailed channel information.

Hover over the "Connectors" section and click it. Under "API Parameters," you will find the Channel ID and unique name.
We need to create two schedulers, specifically one for check-in and another for check-out.
  1. After a successful login in Cliq, hover to the top right corner and click your profile. Post clicking, navigate to Bots & Tools > Schedulers.
  2. On the right, click the "Create Scheduler" button.
  3. To learn more about schedulers and their purposes, refer to the Introduction to Schedulers.
  4. Create a scheduler using your preferred name. Specify the following details: the scheduler name and a description.  

  1. For the recurring period, choose the type "Weekly." Select Monday through Friday and set the time of execution to 11 AM or any other time that aligns with your company's check-in time, or customise the recurring period based on your specific use case.
  2. Finally, click "Save & edit code" and paste the following code.
  1. currentDate = zoho.currentdate;
  2. currentDateString = currentDate.toString("dd-MMM-yyyy");
  3. fromIndex = 1;
  4. toIndex = 200;
  5. // Get all active users
  6. users = zoho.people.getRecords("employee",fromIndex,toIndex,{},"{CONNECTION_LINK_NAME}");
  7. usersList = List();
  8. usersList.addAll(users);
  9. iterations = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25};
  10. // Get All Employees ( 4000 MAX )
  11. if(users.size() == 200)
  12. {
  13. for each  iteration in iterations
  14. {
  15. fromIndex = fromIndex + toIndex;
  16. toIndex = toIndex + 200;
  17. users = zoho.people.getRecords("employee",fromIndex,toIndex,{},"{CONNECTION_LINK_NAME}");
  18. if(users.size() > 0 && users.size() == 200)
  19. {
  20. usersList.addAll(users);
  21. }
  22. else if(users.size() > 0 && users.size() < 200)
  23. {
  24. usersList.addAll(users);
  25. break;
  26. }
  27. else
  28. {
  29. break;
  30. }
  31. }
  32. }
  33.  
  34. // Get all the employees checkedin from the morning.
  35. getAttendenceEntries = invokeurl
  36. [
  37. url :"https://people.zoho.com/api/attendance/fetchLatestAttEntries?duration=240"
  38. type :GET
  39. connection:"{CONNECTION_LINK_NAME}"
  40. ];
  41. latestAttendanceRecords = getAttendenceEntries.get("response").get("result");
  42. checkedInUsers = List();
  43. for each  userRecord in latestAttendanceRecords
  44. {
  45. checkedInEmployeeEmail = userRecord.get("emailId");
  46. checkedInUsers.add(checkedInEmployeeEmail);
  47. }
  48.  
  49. // Get all the employees who applied for leave both approved and pending ( Remove PENDING to exclude only the leave approved employees )
  50. leaveApprovedEmployees = invokeurl
  51. [
  52. url :"https://people.zoho.com/api/v2/leavetracker/leaves/records?from=" + currentDateString + "&to=" + currentDateString + "&dateFormat=dd-MMM-yyyy&approvalStatus=[APPROVED,PENDING]"
  53. type :GET
  54. connection:"{CONNECTION_LINK_NAME}"
  55. ];
  56. info  leaveApprovedEmployees;
  57. leaveApprovedEmployeesList = List();
  58. for each  member in leaveApprovedEmployees.get("records")
  59. {
  60. leaveApprovedEmployeesList.add(member.get("EmployeeId"));
  61. }
  62. info leaveApprovedEmployeesList;
  63.  
  64.  
  65. // Add the users to yet to checkin list if they are not checked from the morning and not applied for leave
  66. usersYetToCheckIn = list();
  67. for each  user in usersList
  68. {
  69. employeeEmail = user.get("EmailID");
  70. employeeId = user.get("EmployeeID");
  71.     employeeStatus = user.get("Employeestatus");
  72. if(!checkedInUsers.contains(employeeEmail) && !leaveApprovedEmployeesList.contains(employeeId) && employeeStatus.equals("Active"))
  73. {
  74. usersYetToCheckIn.add(employeeEmail);
  75. }
  76. }
  77.  
  78. // Mention the list of users in the channel.
  79. if(usersYetToCheckIn.size() == 0)
  80. {
  81. info "No users were found yet to checked-in at 11 PM today. Great to see everyone wrapping in on time! ✅";
  82. }
  83. else
  84. {
  85. usersYetToCheckInString = "";
  86. for each  user in usersYetToCheckIn
  87. {
  88. usersYetToCheckInString = usersYetToCheckInString + "[" + user + "](mail:" + user + ") \n";
  89. }
  90. usersYetToCheckInString = usersYetToCheckInString.subString(0,usersYetToCheckInString.length() - 2);
  91. response = Map();
  92. card = Map();
  93. card.put("title","Employees who haven’t checked in yet ( " + usersYetToCheckIn.size() + " )");
  94. card.put("thumbnail","https://i.pinimg.com/originals/85/e9/f3/85e9f3f5ac31fc5aab586e208297f43d.gif");
  95. card.put("theme","modern-inline");
  96. response.put("card",card);
  97. response.put("text",usersYetToCheckInString);
  98. info zoho.cliq.postToChannel("{CHANNEL_UNIQUE_NAME}",response);
  99. }

  1. Now, let's follow the same steps and create a scheduler for checkout reminders. Under the recurring period, choose the type as "Weekly." Select Monday through Friday and set the time of execution to 7 PM or any other time that aligns with your company's checkout time, or customise the recurring period based on your specific use case.
  2. Click "Save & edit code" and paste the following code.
  1. attendanceResponse = invokeurl
  2. [
  3. url :"https://people.zoho.com/api/attendance/fetchLatestAttEntries?duration=600"
  4. type :GET
  5. connection:"{CONNECTION_LINK_NAME}"
  6. ];
  7. info attendanceResponse;
  8. todayDate = zoho.currenttime.toString("YYYY-MM-dd");
  9. latestAttendanceRecords = attendanceResponse.get("response").get("result");
  10. usersWithoutCheckout = list();
  11. if(latestAttendanceRecords.size() > 0)
  12. {
  13. for each  userRecord in latestAttendanceRecords
  14. {
  15. userEmail = userRecord.get("emailId");
  16. dailyEntries = userRecord.get("entries");
  17. for each  dailyEntry in dailyEntries
  18. {
  19. if(dailyEntry.containsKey(todayDate))
  20. {
  21. todayEntryDetails = dailyEntry.get(todayDate);
  22. attendanceLogs = todayEntryDetails.get("attEntries");
  23. for each  logEntry in attendanceLogs
  24. {
  25. if(!logEntry.containsKey("checkOutTime"))
  26. {
  27. usersWithoutCheckout.add("{@" + userEmail + "}");
  28. }
  29. }
  30. }
  31. }
  32. }
  33. }
  34. usersWithoutCheckoutString = usersWithoutCheckout.toString("\n");
  35. if(usersWithoutCheckoutString.trim().length() == 0){
  36. usersWithoutCheckoutString = "No users were found checked-in after 7 PM today. Great to see everyone wrapping up on time! ✅";
  37. }
  38. response = Map();
  39. card = Map();
  40. card.put("title","List of users who remain checked in ( " + usersWithoutCheckout.size() + " )");
  41. card.put("thumbnail","https://media.tenor.com/Hd8nLZZTPRYAAAAi/alarm-clock-alarm.gif");
  42. card.put("theme","modern-inline");
  43. response.put("card",card);
  44. response.put("text",usersWithoutCheckoutString);
  45. info zoho.cliq.postToChannel("{CHANNEL_UNIQUE_NAME}",response);

Wrapping up and checking out for the day, hopefully

Whether you're from HR, tired of chasing attendance logs, or an enthusiastic team lead trying to increase your team's visibility and adjust workload accordingly, Cliq Platform's schedulers are essential and ensure that accurate tracking is consistent and compliance is maintained. Additionally, this would be scalable to handle organizations of any size.

If attendance tracking is a binge-watchable series, what plot twist would these reminders add to your team's script? Let us know in the comments below!

    • Sticky Posts

    • Add Claude in Zoho Cliq

      Let’s add a real AI assistant powered by Claude to your workspace this week, that your team can chat with, ask questions, and act on conversations to run AI actions on. This guide walks you through exactly how to do it, step by step, with all the code
    • 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
    • Zoho Cliq REST APIs v3 : A complete guide to what's changed and why 

      APIs are not just consumed by a developer with numerous automations and a series of open browser tabs. They are parsed by LLMs, fed into agent pipelines, and auto-completed by AI coding assistants that have zero tolerance for inconsistency. A verb tucked
    • 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
    • Automating Real-Time Zoho Bookings Alerts in Zoho Cliq

      Enable your teams to respond in seconds by bridging the gap between booking confirmation and team notification. No sticky notes, no calendar nudges and no follow-up frenzies. For businesses that rely on scheduled appointments, real-time visibility is
    • Recent Topics

    • [BUG] WebTabs in ZohoCRM now have a spurious "\" displayed along with some additional HTML Head code included

      An example of the issue can be seen below:
    • CNIL - Suivi de Pixel

      Bonjour à tous, À la suite de la nouvelle recommandation de la CNIL sur les pixels de suivi dans les e-mails, savez-vous si Zoho Campaigns permet : de conditionner le suivi des ouvertures au consentement de chaque contact ; de proposer un lien permettant
    • Scheduled import

      The tutorial shows a scheduled import option but this option doesn't appear to be available when using Zoho DB.
    • #4 Choosing How My Invoice Should Look

      Day 4: Meera had the basics sorted. Her business name was there, the address looked right, and her logo finally appeared where it should. But the invoice still did not quite look like hers. Her old studio used invoices that were clean, tightly laid out,
    • Transaction rules for "Owner's Contribution" ?

      I have a bank account where a lot of the deposits are "Owner's Contributions" (i.e., the business owner investing money in the company). Is it possible to create a Transaction Rule to automatically recognize these? They all have the same verbiage from
    • DYK 12: Turn Email into Work Items

      Did you know you can add work items to your Zoho Projects portal directly from your inbox? The initial step of important collaborations start over an email, and most of these require an immediate follow-up by creating a task, or reporting an issue. During
    • Custom Function not getting package details when triggered from Workflow Rules.

      I have a custom function for Packages that submits a form in our Creator app that we use to generate custom shipping labels (internal staff complete deliveries so we cannot generate shipping labels straight from Inventory). When the function is executed
    • how to Solve Conflict Invoices in Zoho POS

      Hello Team, I am facing a repeated issue in Zoho POS while saving a sale that contains service-based items. My products are intentionally created as Service (Non-Inventory) items because I do not want to track stock for them. However, every time I try
    • ¿Cuándo estará disponible la edición de Zoho POS para México?

      He estado revisando las capacidades de Zoho POS y su evolución dentro de la estrategia de Zoho for Retail, y me parece que existe una oportunidad muy interesante para el mercado mexicano. Zoho POS ya ofrece funcionalidades para gestionar ventas, inventario,
    • Important update for Zoho RPA Windows Agent users

      Hi everyone, We would like to share an important update for Zoho RPA Windows Agent users running Windows Server 2016 or Windows Server 2019. The new Zoho RPA Windows Agent 6.0.0 and later versions are not supported on Windows Server 2016 and Windows Server
    • Multi-Option Estimates: One Estimate, Multiple Choices

      Every service request can have multiple solutions. Multi-Option Estimates help you present these different solutions in a single estimate with its own name, parts, price, and total. Each option can differ in scope, approach, or price — whatever choices
    • Delete CRM Portal

      How do I delete portals from my CRM? I created one just to test, it is not in use and is disabled but it's existence is preventing me from marking fields in modules as "required" unless I make it 'read/write' in the portal first. I'd rather just delete
    • Marketing Tip #32: Improve SEO and customer confidence with an FAQ section

      Before making a purchase, customers often have simple questions about delivery times, returns, product usage, or sizing. If they can’t quickly find answers, they may leave your store without buying. Adding a clear FAQ (Frequently Asked Questions) section
    • Contact removed when picking ticket template.

      hi new to Desk rolling out to company, replacing Freshdesk. Is there way to keep the in context contact when selecting a template? When you choose a template you lose the contact!
    • ZOHO Campaigns in ZOHO Analytics - Campaigns vs Contacts Table

      There seems to be information in the Zoho Campaigns table such as Unique Opens and Unique Clicks that can't be found in the Campaigns vs Contacts table where only Opens and Clicks are shown on a per contact level. Is there a way to bring Unique Opens
    • Zoho Publish is now available in Zoho One!

      Hello Zoho One users, We’re excited to announce that Zoho Publish is now included as part of the Zoho One suite! As businesses grow, managing Google Business Profiles across many locations becomes challenging. Business information needs to stay accurate,
    • How to change an employee mail id

      Hi, Does the administrator have the rights to edit an  employees mail id. 
    • Cousin Domain Verification in Zoho Mail: Identify and block look-alike domains

      Phishing attacks often rely on domain names that closely resemble legitimate ones. This makes it difficult for users to identify fraudulent emails at first glance. Zoho Mail's Cousin Domain Verification feature allows administrators to define trusted
    • How do I add 2 agents under the same email?

      I have 2 agents who use the same email address. I added one, but when adding the second agent, it says that the email is already registered. How do I configure this properly?
    • Zoho Desk API modifiedTimeRange returns HTTP 500 around 2026-03-08T02:00:00.000Z

      Hello Zoho Support Team, We are experiencing a reproducible HTTP 500 Internal Server Error when querying the Zoho Desk API search endpoint with a specific modifiedTimeRange boundary. ### API Endpoint GET /api/v1/tickets/search ### Reproduction Steps &
    • Updating an Invoice Line Item's Discount Account via API Call / Deluge Custom Function

      I need help updating an invoice line item's discount account via API. Below is a screenshot of the line item field I am referring to. Now the field to the left of the highlighted field (discount account) is the sales income account. I am able to modify
    • Collaborate Visually with Whiteboard in Zoho Projects

      Whiteboard in Zoho Projects allows you to collaborate visually by creating diagrams, annotating designs, and sketching project workflows using shapes, text, and images within project modules. Team members can work simultaneously, improving productivity
    • Associate project with timer on iPhone

      When I start the timer without first associating a project (on my iPhone), its starts fine but now when I need to associate a project, and click on the link, I get a list of EVERY project I've ever put into Zoho Books. It used to just show active projects.
    • Sales Tax Refund on Commerce Order

      I've looked high and low. Relatively new to ZOHO but not to systems in general. How do we produce a refund for sales tax charged and paid for by a customer in error? This does not impact inventory stock. Simply for accounting and getting the $ back to
    • Importing Chart of Accounts from Quickbooks -- "Debit or Credit"?

      I'm trying to switch from QB to Zoho Books. I've prepped my chart of accounts and put it into the format following the structure of the sample CSV file. But one thing that does not exist at all on the Quickbooks side is the Zoho column for "Debit or Credit".
    • Long term pricing for customers managing multiple organizations

      I've been using Zoho extensively for quite some time and genuinely think it's one of the most powerful and customizable business platforms available. Between Zoho Books and Zoho Analytics, I've invested a significant amount of time building automations,
    • Default Status for Appointments to Completed

      We use Zoho Bookings integrated with Zoho Desk to book time for tech support sessions, we've configured it to only allow for a contact to book a single session to avoid customers overbooking time that may not be needed. The trouble is, once a session
    • Customer User Fields for use in Rules

      Hi, I would like to be able to add custom fields to the users, such as Department or Role, which can then be used in Rules, Reports, etc. as a condition. A use case is limiting Global lists or Choices based on the users Custom Field, so one form can be
    • Add ZeptoMail to Zoho One

      Hi Zoho Team, I would like to request that ZeptoMail be added as a fully included application within Zoho One. Why this is important Zoho One is positioned as a unified business operating system that brings the applications an organization needs under
    • Item image on document

      I know what I am asking may not be possible, but I will ask anyway, maybe I will get lucky, and someone else is doing it. My business is based on special orders only from various online stores. When I send a quote to a client, I generate a separate quote
    • Dashboard Metric Drill-Down Shows Stale Data

      Summary: When clicking between different metric components on a custom dashboard, the drill-down list shows data from the previously opened metric instead of the one just clicked. Steps to Reproduce: Create a custom dashboard with multiple pre-defined/templatized
    • Zoho Marketing Automation WhatsApp Campaign Import Sync for Zoho Analytics

      WhatsApp is a critical channel in modern marketing, yet WhatsApp Campaign metrics from Zoho Marketing Automation currently cannot be natively imported into Zoho Analytics via the default advanced analytics connector. Integrating this into the standard
    • Allow Reauthorizing CRM Connections Without Revoking First

      Currently, when a Zoho CRM connection needs to be reauthorized or authorized with another account, we first have to revoke the existing authorization and then authorize it again. This creates a gap where the connection is unavailable, and any functions,
    • Programmatic Itemized Expenses?

      It does not appear that it is possible to create itemized expenses programmatically (via the API)? Is this correct, or am I misunderstanding the situation?
    • Prefix & Suffix on Single Line, Number, etc.

      Hi, I would like to have the same Prefix and Suffix that was added to the Unique ID on Text and Number Fields. Use case could be as basic as temperature, as per another Idea I have to use Single Line (Text) for a number that might have leading zeros today,
    • Handle Leading Zeros in a Number Field

      Hi, If I use a Number Field, set with Min 7 Digits and Max 7 Digits, and enter 0000001, it will result in 1 and an error as it removes the leading zeros, the same with entering 0012340 will result in 12340 and error. So I have to use a Text Field and
    • 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
    • Virtual Option for Fields

      Hi, I would like to be able to choose another option other than Read-Only or Disabled, such as Virtual. And with Virtual, the field is shown on the form and avilable in rules, but NOT saved to the Database. A use case is having multiple Large Lists of
    • Zoho Marketing Automation Cannot Sync Lookiup Fields

      Hello all, It seems that Zoho MA cannot sync Lookup fields from the CRM. Can you confirm if this is the case? Is there a workaround? Do you know if Campaigns can sync with custom modules and also with Lookup field in the CRM? Thank you!
    • Specific ListView Canvas on Canvas Home Page Always Loads Most Recent ListView, Not the One Specified

      I had mentioned this to ZOHO, but I mainly wanted to see if others in the Community are also facing this problem. I created a Canvas ListView for a Custom Module, and then created a Canvas Home page (technically on a tab item, but I'm not sure if that
    • Next Page