Written by Mateus Alexandre, DevOps Engineer and Leandro Mota, DevOps Engineer

TrackIt relies on the Clockify app to register work hours, allowing for effective tracking of time spent on various tasks by each team member. However, a challenge arose as managers lacked quick and easy access to this information. Manually retrieving data for every Clockify user proved to be time-consuming and inefficient. To address this, a solution was developed to integrate Clockify with Slack, providing managers with timely notifications about team members’ work hours and days off.

The Problem

The primary issue was the inaccessibility of real-time work hour data for managers. Although the information was available in Clockify, extracting it for every user on a weekly basis was laborious. Managers needed an efficient way to monitor the number of hours each team member worked each week and identify any days off. Another issue related to holidays required a system that could automatically recognize and apply days off whenever a holiday occurred, as manual updates were often overlooked.

Our Solution

To resolve this, an automated integration was developed using the Clockify API. This solution retrieves time entry data for all users from the past week and notifies managers if users logged fewer than 25 hours or took a day off or holiday. Notifications are sent using the Slack API, ensuring that both the user and their manager receive the update in a designated Slack channel.

Clockify Slack Integration Implementation Details

  1. API Integration

The Clockify API was utilized to fetch user time entries. The API allowed programmatic access to detailed information about each team member’s logged hours and activities over the past week.

  1. Data Processing

The retrieved data was processed to calculate the total hours each user worked in the week. Additionally, any days off and holidays during the week were identified.

  1. Scheduled Automation

The integration is scheduled to run every week at the start of Monday during the first working hour, ensuring that managers receive timely updates at the beginning of the workweek.

  1. Notification System

Using the Slack API, a notification system was set up to send alerts to a specified Slack channel group. Before sending the message, a Slack channel group is created, including the user with the related work hours and the managers. If any user logs fewer than 25 hours or takes a day off, a notification is triggered, informing both the user and their manager.

Deployment

  1. Containerization

The code is containerized using Docker, enabling easy deployment and scaling. The application is written in Python and utilizes several libraries to interact with the Clockify and Slack APIs.

  1. AWS Resources

Sensitive data, such as API keys and tokens, are securely stored using AWS Secrets Manager. This ensures that sensitive information is protected and can be accessed securely by the application.

  1. Scheduling with GitHub Actions

The scheduling of the automation is managed using GitHub Actions. The GitHub Actions workflow is configured to run the Docker container at the beginning of the week, on Monday. Although GitHub Actions is used, any other CI/CD pipeline, such as Jenkins, GitLab CI, or AWS CodePipeline, can be employed to achieve the same result.

image 2

Benefits

This integration provided several key benefits:

  • Efficiency: Managers no longer need to manually extract and compile data from Clockify, saving significant time and effort.
  • Real-time Updates: The automated system ensures managers receive timely notifications, enabling them to address any issues promptly.
  • Transparency: Both managers and team members are kept informed, promoting accountability and open communication within the team.

Closing Thoughts

The Clockify and Slack integration has significantly improved the way work hours are tracked and managed. By automating the data retrieval and notification process, managers are empowered with the tools needed to monitor team performance effectively. 

Next Steps

The next feature will introduce a system that empowers non-technical users to manage user thresholds beyond the 25-hour limit, maintain an exception list for users who won’t receive any messages, and check the current week’s total time entries for any user. This system will include a front-end built with React and a supporting API, ensuring an intuitive and user-friendly experience for managing these settings.very, production efficiency, and audience engagement.

About TrackIt

TrackIt is an international AWS cloud consulting, systems integration, and software development firm headquartered in Marina del Rey, CA.

We have built our reputation on helping media companies architect and implement cost-effective, reliable, and scalable Media & Entertainment workflows in the cloud. These include streaming and on-demand video solutions, media asset management, and archiving, incorporating the latest AI technology to build bespoke media solutions tailored to customer requirements.

Cloud-native software development is at the foundation of what we do. We specialize in Application Modernization, Containerization, Infrastructure as Code and event-driven serverless architectures by leveraging the latest AWS services. Along with our Managed Services offerings which provide 24/7 cloud infrastructure maintenance and support, we are able to provide complete solutions for the media industry.