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

      • Automate 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
      • 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
      • Customer payment alerts in Zoho Cliq

        For businesses that depend on cash flow, payment updates are essential for operational decision-making and go beyond simple accounting entries. The sales team needs to be notified when invoices are cleared so that upcoming orders can be released. In contrast,
      • 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

        • Recent Topics

        • Tax in Quote

          Each row item in a quote has a tax value. At the total numbers at the bottom, there is also a Tax entry. If you select tax in both of the (line item, and the total), the tax doubles. My assumption is that the Tax total should be totalling the tax from
        • Zoho Flow integration with Facebook Messenger and Whatsapp

          Hi there,  any plans of adding integrations with Facebook Messenger and Whatsapp into Zoho Flow? Seems that more and more business are delivering automated updates such as "your order is received",  "your order has been shipped" and so on via these two platforms. Not sure if Whatsapp has the API access needed i am pretty sure that Facebook Messenger has... Kind regards Bo Thygesen 
        • Multi-currency and Products

          One of the main reasons I have gone down the Zoho route is because I need multi-currency support. However, I find that products can only be priced in the home currency, We sell to the US and UK. However, we maintain different price lists for each. There
        • Campaigns unsubscribe/manage preferences links

          Hi, Where can I edit the unscubscribe and manage preferences link in the footer of the email. I would like it so that when you click 'manage preferences' an form opens up that allows the person to choose what type of emails they do and don't wish to
        • email address somehow still not verified (?!)

          L.S. After creating a new email template in CRM I was about to send a group email to my clients, then Zoho CRM announced that they would change the sender address to some kind of Zoho-e-ddress because my email address "has not been verified". Not only
        • Marketing Tip #17: Add credibility to your online store with Review Widgets

          One of the fastest ways to build trust in an online store is to show real customer feedback right where people are deciding to buy. Third-party widgets let you embed things like Google Reviews, Instagram feeds, or even a WhatsApp chat button. These add
        • adding several team members to an Opportunity

          How can we add several team members to one opportunity for collaboration? I have researched and only found something called Deal Team which I cannot find in my CRM to configure.
        • PDF Annotation is here - Mark Up PDFs Your Way!

          Reviewing PDFs just got a whole lot easier. You can now annotate PDFs directly in Zoho Notebook. Highlight important sections, add text, insert images, apply watermarks, and mark up documents in detail without leaving your notes. No app switching. No
        • Bulk update Profile Permissions

          Dears, What should we do if we add new forms or reports and need to update more than 20 permissions? Updating them one by one feels pretty harsh, doesn’t it?
        • Filter in fields from Jira extension

          We have installed the Jira extension so we can maken Jira issues from Zoho desk. In Zoho desk I can also see the Jira issue status for example but I can not filter on this field. I would like to setup an filter showing me the closed Jira issues. How can
        • Zoho Creator customer portal limitation | Zoho One

          I'm asking you all for any feedback as to the logic or reasoning behind drastically limiting portal users when Zoho already meters based on number of records. I'm a single-seat, Zoho One Enterprise license holder. If my portal users are going to add records, wouldn't that increase revenue for Zoho as that is how Creator is monetized? Why limit my customer portal to only THREE external users when more users would equate to more records being entered into the database?!? (See help ticket reply below.)
        • Link Contacts to Billed Accounts

          Hello, I want to do a survey on all my customers of 2025. For that I want to select all contacts linked to accounts who where billed in 2025. How to I create this link to I can then use Zoho Survey with this database of contacts?
        • Export all of our manuals from Zoho Learn in one go

          Hi, I know there's a way to export manuals in Zoho Learn, but I want to export everything in one go so it won't take so long. I can't see a way to do this, can I get some assistance or is this a feature in the pipeline? Thanks, Hannah
        • Historical Sales Info - Blend with Finance Invoice Line Items, Access in CRM and Desk

          My company has been using Zoho One since 2021, with sales data going back through 2020. However, we have been in business much longer, and we have historical sales information that we want to have at our fingertips when talking with customers (usually
        • Pre-Zoho Sales Info - Best Way to Add to Desk / CRM

          My company has been using Zoho One since 2021, with sales data going back through 2020. However, we have been in business much longer, and we have historical sales information that we want to have at our fingertips when talking with customers (usually
        • CRM function REST API response format

          Is there a way to control the JSON response returned by the CRM function REST API? If I call a function using either OAuth or an API key it returns a 200 OK response with a string in the format shown below. I am using a particular feature of an external
        • Using MPN across multiple SKUs and inventory tracking

          I have several different SKU's that share a common MPN and would like to track inventory by MPN. SKU1 has MPN1 assigned SKU2 has MPN1 assigned Here is an example If I start with 5 of MPN 1 in stock I want each SKU1 and SKU2 to show as 5 in stock, If I
        • Unable to Access Application:

          Whenever I try to access my application from the desktop, say I am editing it and want to test something in the desktop environment I get: An error has occurred. An internal error has occurred. Please check the URL , or try refreshing the page I can edit
        • Cannot see Application from Lookup field

          Hi all, I am trying to access data for an application on our account via a lookup field; however, the application doesn't appear in the dropdown at all. Can anyone shed any light on this, please? I have asked Zoho support; however, they're just as confused,
        • Cannot see correct DNS config for mail after moving domain to another provider

          I have moved my domain from one provider to another and after that zoho mail stopped working (expected). Problem is, zoho mail admin panel still shows (10 hours after move) that all records are correct while I haven't changed anything in my domain DNS
        • Zoho CRM Meetings Module Issues

          We have a use-case that is very common in today's world, but won't work in Zoho CRM. We have an SDR (Sales Development Rep) who makes many calls per day to Leads and Contacts, and schedules meetings for our primary Sales Reps. He does this by logging
        • Zoho Books integration sync from Zoho CRM does not work

          Hi Zoho Community & Zoho Support We just tried to get a sync some products into Zoho Books from CRM using the native sync and we're getting an error: "It looks like some mandatory fields you're trying to map are empty. Please provide valid field names
        • P & L Sub-categorized accounts

          How can I show sub-categorized Income and Expense accounts on the P & L report?
        • Report showing Bill Details with Project and Sales Invoice Number

          Hi There, I am hoping that someone can help, I am looking for report that can show the bill and expense details along with project its as assigned to and the invoice number that the sales has been raised in. The goal is I can filter a customer/project
        • Advanced Payment for Inventory Items with serial numbers

          Hello, We sell equipment that we track the unique serial numbers on using Sales Orders. We can charge the customers an advanced payment, then the balance on delivery. We cannot figure out a way to do this in Books/Inventory: - Cannot part invoice a SO
        • Is it possible to restrict ZCRM user to see only custom views created by administrator

          I have segmented data in my CRM and I want to allow different users to be able to see only parts of it based on some criteria. I've tried to create and share a custom view, but then there is always an option for user to see all open lead for example.
        • Issues Logging into ZOHO

          Hello, one of my coworkers is having issues logging into ZOHO, she has requested a code when entering and the email is correct but she has not received the code. can you help us with this?
        • Google Fonts Integration in Pagesense Popup Editor

          Hello Zoho Pagesense Team, We hope you're doing well. We’d like to submit a feature request to enhance Zoho Pagesense’s popup editor with Google Fonts support. Current Limitation: Currently, Pagesense offers a limited set of default fonts. Google Fonts
        • Add Popup Rejection Metrics to Reports

          Hello Zoho PageSense Team, We would like to request improved reporting for popup interactions. Current Limitation: PageSense currently provides conversion data, but there is no clear visibility into: Popup rejections Popup closes (✕ button clicks) Dismissals
        • Ability to Reset / Reinitialize Popup Cookies

          Hello Zoho PageSense Team, We would like to request the ability to manually reset popup cookies. Current Limitation: At the moment, it is not possible to initiate a new popup cookie from the our side. Visitors who rejected or closed a popup will not see
        • Control Popup Cookie Expiration Duration

          Hello Zoho PageSense Team, We would like to request an enhancement related to popup cookie management. Current Limitation: Currently, PageSense popup cookies remain active for 365 days, and this duration cannot be modified by us. If a visitor closes or
        • Clone / Export Popup Design Across PageSense Projects

          Hello Zoho PageSense Team, We hope you’re doing well. We would like to request an enhancement that allows popup designs to be reused across different PageSense projects. Problem Statement: Currently, Zoho PageSense allows popups to be duplicated only
        • Are there settings for hyperlinks?

          Clicking a hyperlinked cell in Sheet creates this little pop-up with the actual hyperlink inside. Is it possible to have a 1-click link where if you click the cell it opens the link directly with no pop-up?
        • Automatically include all ticket attachments in the ticket resolution email

          Hello Zoho Community, We are implementing Zoho Desk in a real customer-facing production environment and have run into a limitation that is becoming a blocking requirement for our clients. The problem When a ticket is closed or resolved, Zoho Desk sends
        • Finding text within a ticket: Expand All or Search this Ticket

          The auto-collapse feature within a ticket is nice for screen scrolling, however it makes it difficult to find text within the ticket if the email is collapsed. In fact you cannot find text if it is collapsed. I would like to propose a feature that allows
        • Books & Desk. Client mapping

          Hi, I’ve been using Zoho Books for several years and am now looking to improve my customer service. I'm experimenting with Zoho Desk and want to sync and map my client data from Zoho Books. However, it seems that mapping requires both contacts to have
        • String handling

          If I cut a currency string from a quote and try and paste it into the Deal "Amount", it will fail unless I manually delete any commas. Dollar signs are no problem, but comma's seem to fail. Please correct this Input Validation error.
        • Feature Request - Allow Customers To Pick Meeting Duration

          Hi Bookings Team, It would be great if there was an option to allow customers to pick a duration based on a max and minimum amount of time defined by me and in increments defined by me. For example, I have some slots which are available for customers
        • YouTube Live streaming? how to? Zoom has this feature, built-in. Can't find it on zoho meetings.

          YouTube Live streaming? how to? Zoom has this feature, built-in. Can't find it on zoho meetings.
        • Feature Request - A Way To Search Item Groups

          Hi Inventory Team, I can't find any way to filter or search by fields of Item Groups. It would be great to see that functionality added. I have a use case where a single product might come from 5 or more suppliers and each supplier's item is an Item in
        • Next Page