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

    Nederlandse Hulpbronnen


      • Recent Topics

      • Image field in custom module

        Hi guy, Is there any hope of adding a custom image field in the custom module? We created a custom module to keep track of assets, and it would be helpful if we could attach an image to the record. Thanks Rudy
      • Cannot reorder fields in Page Layout in Expenses and Purchase Requests

        It is very inconvenient that the custom fields in Page Layout cannot be re-ordered. The only way is to remove the fields and re-create them; however, it is impractical. This would affect the reports and dashboards we are having. Not able to re-order the
      • الخصم على مستوى فاتورة المبيعات

        السلام عليكم ورحمة الله وبركاته مطلوب في إنشاء خصم على مستوى فاتورة المبيعات وليس على مستوى البند أريد معرفة الطريقة؟
      • VAT and Taxes option not available

        Dear ZOHO Team , The VAT and Taxes options in my ZOHO books account not available,I tried to find how to enable or check the way to use this option but unfortunately couldn't find it anywhere ,I'm in UAE ,kindly let me know what to do to solve this issue
      • Default Tagging on API-generated Transactions

        If one assigns tags to an Item or Customer, those tags get auto-populated in each line item of an Invoice or Sales Order when one creates those documents. However, if one creates the Sales Order or Invoice via the API (either directly coding or using
      • Direct Feed (Bank)

        Is Direct feed integration for AlRajhi and ADCB bank supported by Zoho Books in GCC/Saudi
      • Sales Order, Invoice and Payment numbers

        Hi zoho friends, it is me again, the slow learner. I'm wondering if there is a way to have it so the Sales order, invoice and payment numbers are all the same? It would be easier for me if they were the same number so there is not so many reference numbers
      • Customer Satisfaction (CSAT) Report

        From data to decisions: A deep dive into ticketing system reports The customer satisfaction (CSAT) report helps teams understand how customers feel about their support experience, identify service gaps, and continuously improve the help desk. It turns
      • Timeline Tracking Support for records updates via module import and bulk write api

        Note: This update is currently available in Early Access and will soon be rolled out across all data centers (DCs) and for all editions of Zoho CRM. The update will be available to all users within your organization, regardless of their profiles or roles.
      • Shifts in Zoho People vs Zoho Shifts?

        Hello Zoho People Team, We hope you are doing well. We are evaluating the Shifts functionality within Zoho People and comparing it to the standalone Zoho Shifts product. We’ve encountered comments and discussions suggesting that the Shifts feature inside
      • Disable fields in During action in Blueprint?

        Hi there. I've tried field disable (setReadOnly(true)) using client script and the event is onMandatoryFormLoad on detail page, assuming it'll work on blueprint fields, but it bears no result. Is this the expected behaviour? That we can't do this yet?
      • Develop and publish a Zoho Recruit extension on the marketplace

        Hi, I'd like to develop a new extension for Zoho Recruit. I've started to use Zoho Developers creating a Zoho CRM extension. But when I try to create a new extension here https://sigma.zoho.com/workspace/testtesttestest/apps/new I d'ont see the option of Zoho Recruit (only CRM, Desk, Projects...). I do see extensions for Zoho Recruit in the marketplace. How would I go about to create one if the option is not available in sigma ? Cheers, Rémi.
      • Best Email Backup Wizard in 2026

        While searching for an email backup solution, my main hesitation was reliability. As a user, I had already seen many tools that looked promising but failed when handling large mailboxes, skipped folders, or caused authentication issues during the backup
      • Subforms and automation

        If a user updates a field how do we create an automation etc. We have a field for returned parts and i want to get an email when that field is ticked. How please as Zoho tells me no automation on subforms. The Reason- Why having waited for ever for FSM
      • Allow Managers to Create Shifts for Their Departments in Zoho People

        Hello Zoho People Product Team, Greetings and hope you are doing well. This feature request is related to Zoho People - please don't move it to zoho one! We would like to submit a feature request regarding shift management permissions in Zoho People.
      • Zoho Learn and Zoho CRM integration

        I would like to see an integration between Zoho Learn and Zoho CRM. 1. To be able to add articles in a related list in all modules 2. Zia to suggest related articles in a Deal or Case or Lead 3. Ability to read / search articles during a call / follow
      • Maintain steady traffic to your domain: How Domain Aliasing helps

        Consider this scenario: An organization has its primary domain as administrator.com. Now it wants to shorten its domain to admin.com because it's simpler and easier to remember. However, changing the domain completely can cause the following problems:
      • Why Sharing Rules do Not support relative date comparison???

        I am creating a Sharing Rule and simply want to share where "Last Day of Coverage" (Date field) is Greater than TODAY (Starting Tomorrow). However, sharing rules don't have the option to compare a date field to a relative date (like today), only to Static
      • CRM x WorkDrive: File storage for new CRM signups is now powered by WorkDrive

        Availability Editions: All DCs: All Release plan: Released for new signups in all DCs. It will be enabled for existing users in a phased manner in the upcoming months. Help documentation: Documents in Zoho CRM Manage folders in Documents tab Manage files
      • Workflow rule only allows 10 workflow per module

        Apparently a Zoho professional edition only allows 10 workflow rules per module. This makes workflow allocation literally impossible while allocating potential to different members of the team. I have 15 licenses. Is there a way in which related alerts can be varied? In other words, is it possible to have different related alerts be triggered with different rule criteria. so if I say, if potential is 'x' then trigger related alert 'x' and if potential is 'y' then trigger related alert 'y' Thanks,
      • IF Statement in Zoho CRM Formula Field

        Hi, I am attempting to write a formula field that will give me one result if one statement AND another statement are true, then a different value if the first statement AND a different statement are true, else 0. Stated differently: if account = destination
      • CRM Percent custom fields: When will it show the % symbol and behave like %?

        1. Actually Percent custom fields fail to show the % symbol. 2. When in formulas Percent fields work like number: 100 x 5% = 5 ideal world 100 x 5% = 500 what happens actually 3. When importing Percent fields the % symbol has to be removed and the data
      • Free Webinar: Zoho Sign for Zoho Projects: Automate tasks and approvals with e-signatures

        Hi there! Handling multiple projects at once? Zoho Projects is your solution for automated and streamlined project management, and with the Zoho Sign extension, you can sign, send, and manage digital paperwork directly from your project workspace. Join
      • Automatically CC an address using Zoho CRM Email Templates

        Hi all - have searched but can't see a definitive answer. We have built multiple email templates in CRM. Every time we send this we want it to CC a particular address (the same address for every email sent) so that it populates the reply back into our
      • Editing the Ticket Properties column

        This is going to sound like a dumb question, but I cannot figure out how to configure/edit the sections (and their fields) in this column: For example, we have a custom "Resolution" field, which parked itself in the "Ticket Information" section of this
      • "Total Hours" on Employee Attendance Report

        I'm learning that in Zoho jargon, "total hours" does not include paid breaks. Or at least not the way that my setup is working. That seems a little weird to me, since most jurisdictions in the US don't differentiate between time spent on paid break and
      • Fixed assets in Zoho One?

        Hi, We use Zoho Books and have the fixed asset option in it. I started a trial for Zoho One and I do not see that as an option. Is the books that is part of zoho one equivalent to Zoho Books Elite subscription or is it a lesser version? Thanks, Matt
      • Integration with...

        Dear Zoho Commerce team, Please could you consider the integration within Zoho Commerce / Inventory and Qapla'? (https://www.qapla.it/en/) This app is better than Aftership in many ways: - Aftership integration require PRO plan and price start from more
      • Generate leads from instagram

        hello i have question. If connect instagram using zoho social, it is possible to get lead from instagram? example if someone send me direct message or comment on my post and then they generate to lead
      • Adding Markdown text using Zoho Desk API into the Knowledge Base

        Hi Zoho Community members, We currently maintain the documentation of out company in its website. This documentation is written in markdown text format and we would like to add it in Zoho Knowledge Base. Do you know if there is REST API functionality
      • Create case via email

        Good Afternoon, I have just registered and am taking a look around the system. Is it possible to create a case via email.  I.e. an employee/client/supplier emails a certain address and that auto generates the case which then prompts a member of staff
      • Need a Universal Search Option in Zohobooks

        Hello Zoho, Need a Universal Search Option in Zohobooks to search across all transactions in our books of accounts. Please do the needful Thanks
      • Locked Notebook

        Hi, I hadn't used my Notebook in some time and was refamiliarizing myself with it. I clicked a lock icon and now I can't unlock. When I hit the information or unlock icons I'm taken to a page with the notebook icon and a keyboard. When I type, nothing
      • Unable to produce monthly P&L reports for previous years

        My company just migrated to Books this year. We have 5+ years financial data and need to generate a monthly P&L for 2019 and a monthly P&L YTD for 2020. The latter is easy, but I'm VERY surprised to learn that default reports in Zoho Books cannot create
      • Hide fields only for creation

        Hello, I'd like to hide some fields only during the creation of a contact in Zoho CRM. In fact I have some fields that are automatically calculated thanks to an automation, so when my users create a contact I don't want them to fill those fields. I know
      • Issues with Zoho Sheet in Mac

        I have downloaded the Zoho App from App Store but It is failing to Save As, Open & Download Operations. App Store
      • Weekly Sales Summary

        Is it possible to generate a weekly report in Zoho Books to show -$$ amount of estimates generated -# of estimates generated by Salesperson -$$ amount of Sales Orders created -$$ amount of Invoices generated
      • Can I write a check in Zoho Books with no associated bill?

        This currently does not seem possible, and I have a client that desperately needs this function if I am able to convert them with Quickbooks. Thank you in advance for your reply. 
      • OpenAPI Specs are just plain wrong

        The provided yml files for generating the OpenAPI specs are absolutely riddled with errors and inconsistencies. From missing fields on the objects, to just incorrectly named resource objects. I'm having to go through and manually changing the spec to
      • Custom Footer – Zoho Writer Document

        Hello everyone, I’m having an issue adding a custom footer in a Zoho Writer document. I would like to insert my company information (including a logo + address) in the footer. The problem is that when I add these elements, the main content of my pages
      • Next Page