Connect Retool to Clockify by creating a REST API Resource using your Clockify API key in the X-Api-Key header. The base URL is https://api.clockify.me/api/v1. Once configured, build queries to fetch time entries, manage projects and clients, generate custom reports, and create a team timesheet dashboard that replaces Clockify's native reports with Retool's more flexible Charts and Tables.
| Fact | Value |
|---|---|
| Tool | Clockify |
| Category | Productivity |
| Method | REST API Resource |
| Difficulty | Beginner |
| Time required | 15 minutes |
| Last updated | April 2026 |
Build a Clockify Team Timesheet Dashboard in Retool
Clockify's native reports cover standard time tracking needs — weekly summaries, project totals, client billing summaries — but teams with custom reporting requirements quickly hit the limits of Clockify's built-in dashboard. Finance teams needing to join time data with invoice data, project managers wanting cross-client utilization views, and operations teams tracking billable hours against budget targets all need more than Clockify's standard reports provide.
Clockify offers a well-documented REST API that provides access to all time tracking data: workspaces, projects, clients, users, tags, and individual time entries with full start/end timestamps. Authentication uses a simple API key passed as a request header, making Retool integration particularly easy to configure compared to OAuth-based tools.
With Retool, you can build a team timesheet dashboard showing all members' time entries for any date range, project, or client — exportable as CSV, filterable by any dimension, and joinable with data from your database or billing system. This replaces the need to manually export Clockify reports and process them in spreadsheets every week.
Integration method
Clockify connects to Retool via a REST API Resource using an API key passed in the X-Api-Key request header. You generate the key from your Clockify Profile Settings, then configure the REST API Resource with base URL https://api.clockify.me/api/v1 and the key as a custom header. All requests are proxied server-side through Retool, keeping credentials secure and eliminating CORS issues.
Prerequisites
- A Clockify account (free tier works for API access) with at least one workspace configured
- A Clockify API key (generated from Profile Settings → API → Generate in Clockify)
- Your Clockify workspace ID (visible in the URL when logged into Clockify, or returned by the /workspaces endpoint)
- A Retool account with permission to create Resources
- Basic familiarity with Retool's query editor and Table/Chart components
Step-by-step guide
Generate a Clockify API key
In Clockify, click your profile avatar (top-right corner) → Profile Settings. Scroll down to the API section. Click Generate next to the API key field. A long alphanumeric API key appears — copy it immediately. Clockify's API key is a personal token that provides access to all workspaces your account belongs to. The key does not expire automatically but can be regenerated if needed (regenerating invalidates the old key). There's one API key per Clockify account — if you need separate API access for different teams or projects, you'll need separate Clockify accounts. Note your workspace ID as well — you'll need it for most Clockify API calls. Find it by logging into Clockify and looking at the URL after /workspaces/: the alphanumeric string in the URL is your workspace ID. Alternatively, call the /workspaces endpoint after configuring the Retool resource to retrieve it programmatically. Clockify's API base URL is https://api.clockify.me/api/v1. Note that Clockify also has a separate Reports API at https://reports.api.clockify.me/v1 for detailed time entry reports with advanced filtering and aggregation — this is a separate endpoint with the same API key authentication.
Pro tip: Clockify's Reports API (https://reports.api.clockify.me/v1) provides pre-aggregated time data with more filtering options than the main API's time entry endpoints. Create a second Retool Resource pointing to the Reports API base URL for reporting queries.
Expected result: You have a Clockify API key and your workspace ID ready for configuring the Retool resource.
Create the Clockify REST API Resource in Retool
In Retool, navigate to the Resources tab and click Add Resource. Select REST API. Configure the resource: - Name: Clockify API - Base URL: https://api.clockify.me/api/v1 Clockify uses a custom header for authentication — not standard Bearer Token or Basic Auth. Select None under Authentication (or use the Custom/Header option if available in your Retool version). Instead, add the API key as a custom header: Click Add Header: - Key: X-Api-Key - Value: your Clockify API key (or {{ retoolContext.configVars.CLOCKIFY_API_KEY }} if stored in Configuration Variables) Also add: - Key: Content-Type, Value: application/json - Key: Accept, Value: application/json Click Create Resource. Test the connection by creating a query with method GET and path /workspaces. If it returns an array of workspace objects (each with an id and name), authentication is working. A 401 response indicates the X-Api-Key header is missing or the key is incorrect. Optionally create a second resource named 'Clockify Reports API' with base URL https://reports.api.clockify.me/v1 and the same X-Api-Key header — this gives you access to the pre-aggregated reporting endpoints.
Pro tip: Clockify uses X-Api-Key (not Authorization: Bearer) as its authentication header. This is a custom header you add in the Headers section of the Retool resource configuration, not in the Authentication dropdown.
Expected result: The Clockify API resource is configured with the X-Api-Key header and a test GET /workspaces returns an array of your Clockify workspaces.
Fetch workspace data: projects, clients, and team members
Create foundational queries to populate your dashboard's filter dropdowns and reference data. getWorkspaceId: GET /workspaces — returns all workspaces. Store the first workspace's ID as a Retool variable: workspaceIdVar.setValue(getWorkspaces.data[0].id). Or hardcode your workspace ID in subsequent queries if you only have one workspace. getProjects: GET /workspaces/{{ workspaceIdVar.value }}/projects with parameters: - archived: false (filter to active projects only) - page-size: 100 - page: 1 Each project has: id, name, clientId, duration (total tracked duration), estimate (budget), color, memberships, and billable flag. getClients: GET /workspaces/{{ workspaceIdVar.value }}/clients with page-size: 100. Returns all clients with id and name. getUsers: GET /workspaces/{{ workspaceIdVar.value }}/users with page-size: 100. Returns team members with id, name, email, and status (ACTIVE/PENDING/INACTIVE). getTags: GET /workspaces/{{ workspaceIdVar.value }}/tags — returns all tags used for categorizing time entries. Bind these to Select or MultiSelect components to enable filtering in the main time entry queries. Create lookup objects in transformers that map IDs to names (project ID → project name, user ID → user name) for display in Tables.
1// Transformer to build project lookup map2const projects = data || [];3// Create lookup object: { 'projectId': 'Project Name' }4const lookup = {};5projects.forEach(project => {6 lookup[project.id] = {7 name: project.name,8 client_id: project.clientId,9 color: project.color,10 billable: project.billable11 };12});13return lookup;Pro tip: Build lookup objects (ID → name mapping) for projects, clients, and users in transformers and store them as Retool state variables. These dramatically simplify time entry display by letting you show 'Project Name' instead of opaque project IDs in Tables.
Expected result: The workspace, project, client, user, and tag queries are working and their data populates Select components for filtering the main time entry dashboard.
Fetch time entries and build the timesheet Table
Create a getTimeEntries query with method GET and path /workspaces/{{ workspaceIdVar.value }}/user/{{ select_user.value }}/time-entries. This fetches time entries for a specific user. For team-wide entries, use GET /workspaces/{{ workspaceIdVar.value }}/time-entries with these parameters: - start: {{ dateRange.startDate + 'T00:00:00Z' }} - end: {{ dateRange.endDate + 'T23:59:59Z' }} - project: {{ select_project.value || '' }} - users: {{ select_users.value?.join(',') || '' }} - page-size: 200 - page: {{ pagination.page || 1 }} Note: The time range parameters use ISO 8601 format with timezone suffix. Each time entry includes: id, description, userId, projectId, taskId, tagIds (array), billable (boolean), timeInterval (start, end, duration strings in ISO 8601 duration format). The duration is in ISO 8601 duration format (e.g., 'PT2H30M' = 2 hours 30 minutes). Parse this in your transformer: extract hours and minutes using regex or the string format. Create a transformer that joins time entries with the project and user lookup maps to show human-readable names instead of IDs, and converts ISO 8601 durations to decimal hours for calculation.
1// Transformer for Clockify time entries2const entries = data || [];3const projectLookup = getProjectLookup.data || {};4const userLookup = getUserLookup.data || {};56// Parse ISO 8601 duration to decimal hours7function parseDuration(isoDuration) {8 if (!isoDuration) return 0;9 const match = isoDuration.match(/PT(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?/);10 if (!match) return 0;11 const hours = parseInt(match[1] || 0);12 const minutes = parseInt(match[2] || 0);13 const seconds = parseInt(match[3] || 0);14 return hours + minutes / 60 + seconds / 3600;15}1617return entries.map(entry => {18 const project = projectLookup[entry.projectId] || {};19 const durationHours = parseDuration(entry.timeInterval?.duration);20 return {21 id: entry.id,22 description: entry.description || '(no description)',23 user_id: entry.userId,24 user_name: userLookup[entry.userId] || entry.userId,25 project_name: project.name || '(no project)',26 billable: entry.billable ? 'Billable' : 'Non-billable',27 start: entry.timeInterval?.start28 ? new Date(entry.timeInterval.start).toLocaleString()29 : '',30 end: entry.timeInterval?.end31 ? new Date(entry.timeInterval.end).toLocaleString()32 : 'Running',33 duration_hours: durationHours.toFixed(2),34 duration_display: `${Math.floor(durationHours)}h ${Math.round((durationHours % 1) * 60)}m`35 };36});Pro tip: Clockify stores time entry durations in ISO 8601 duration format (PT2H30M). Convert to decimal hours in your transformer for arithmetic operations like summing totals and calculating billing amounts.
Expected result: The timesheet Table shows time entries with readable project names, user names, billable status, and duration in hours — sortable by any column and filterable by date range, user, and project.
Build aggregated reports and summary analytics
For aggregated time data, use Clockify's Reports API (https://reports.api.clockify.me/v1) which provides pre-aggregated summaries much more efficiently than aggregating individual time entries in a transformer. Create a second Retool Resource named 'Clockify Reports API' with base URL https://reports.api.clockify.me/v1 and the same X-Api-Key header. Create a getSummaryReport query against this resource with method POST and path /workspaces/{{ workspaceIdVar.value }}/reports/summary. The request body specifies the aggregation: This POST endpoint accepts a JSON body defining the date range, filters, and grouping. Group by PROJECT to get hours per project, or by USER for per-person summaries. The response includes a groupOne array with each group's totalTime (in milliseconds) and totalBillableTime. Create a getDetailedReport query with method POST and path /workspaces/{{ workspaceIdVar.value }}/reports/detailed for a paginated list of all time entries with full details — more powerful than the standard time entries endpoint for reporting. Bind these report queries to Retool Chart components: a Bar chart showing hours per project, a Stat panel showing total hours and billable percentage, and a Table with the per-user breakdown. For teams needing Clockify data joined with invoice or project management data from other systems, RapidDev's team can help build multi-resource Retool dashboards that combine time tracking with financial and project data.
1// Summary report request body for Clockify Reports API2{3 "dateRangeStart": "{{ dateRange.startDate }}T00:00:00.000Z",4 "dateRangeEnd": "{{ dateRange.endDate }}T23:59:59.999Z",5 "summaryFilter": {6 "groups": ["PROJECT", "USER"]7 },8 "billable": "BOTH",9 "exportType": "JSON"10}Pro tip: Use the Clockify Reports API for aggregated data and the main API for individual time entry CRUD operations — the Reports API pre-aggregates data server-side, which is far more efficient than fetching all individual entries and summing in a JavaScript transformer.
Expected result: The summary report panel shows total hours per project and per user as Chart visualizations, with Stat components showing total billable hours and revenue for the selected period.
Common use cases
Build a team weekly timesheet review dashboard
Create a Retool dashboard showing all team members' time entries for the current week grouped by project and client. Managers can see at a glance who is tracking time, which projects are consuming the most hours, and which team members are under- or over-tracked — without logging into Clockify or downloading reports.
Build a Retool team timesheet dashboard. Show a DateRange picker defaulting to the current week. Display all team members in a Table with their total hours logged this week, breakdown by project (top 3 projects), and billable hours percentage. Add a Chart showing daily hours per team member as a stacked bar chart by day of week. Include a Select to filter by project or client.
Copy this prompt to try it in Retool
Build a project budget and utilization tracker
Build a Retool project monitoring panel that tracks hours logged against each project's estimated budget. Display actual vs. budgeted hours for all active projects, highlight projects where logged hours exceed 80% of budget, and show the burn rate trend so project managers can identify budget overruns before they happen.
Build a Retool project utilization dashboard. Fetch all Clockify projects with their estimated hours. For each project, show logged hours to date, estimated hours, utilization percentage, remaining hours, and a progress bar. Color-code projects where utilization > 80% yellow and > 100% red. Add a Chart showing daily hours logged per project over the last 30 days.
Copy this prompt to try it in Retool
Build a client billing summary report
Create a Retool reporting panel that aggregates billable time entries by client for a selected billing period, calculates invoice amounts based on each team member's billing rate, and presents a billing summary ready for invoice generation. This replaces the manual process of exporting Clockify reports, joining them with rate information, and calculating totals in a spreadsheet.
Build a Retool client billing report panel. Show a DateRange picker for the billing period. Display all clients with their total billable hours, total non-billable hours, calculated invoice amount (hours × billing rate), and compared to the previous billing period. Add a Stat panel showing total billable hours, total revenue, and average hourly rate. Include a CSV export button.
Copy this prompt to try it in Retool
Troubleshooting
All API requests return 401 Unauthorized
Cause: The X-Api-Key header is missing, incorrectly named, or contains an invalid API key value.
Solution: Confirm the header name is exactly 'X-Api-Key' (case-sensitive, with hyphens). Verify the API key value matches what's shown in your Clockify Profile Settings → API section. If the key was recently regenerated, update the Retool resource header with the new key. Do not add 'Bearer' or other prefixes — Clockify expects the raw API key value in the X-Api-Key header.
Time entry queries return empty arrays even though entries exist in Clockify
Cause: The date range parameters may not be formatted correctly in ISO 8601 format, or the workspace ID is incorrect.
Solution: Clockify requires date parameters in ISO 8601 format with a timezone suffix: 'YYYY-MM-DDTHH:mm:ssZ'. If using a DateRange picker in Retool, ensure the start date appends 'T00:00:00Z' and the end date appends 'T23:59:59Z'. Verify the workspace ID by calling GET /workspaces first and comparing the returned IDs with what you're using in the time entry path.
1// Correct date format for Clockify API2const startDate = dateRange.startDate + 'T00:00:00Z';3const endDate = dateRange.endDate + 'T23:59:59Z';Duration fields show 'null' or fail to parse correctly
Cause: Clockify stores duration in ISO 8601 duration format (e.g., 'PT2H30M'). Time entries that are currently running (no end time) have a null duration.
Solution: Add null checks for the timeInterval.duration field before parsing: if (!entry.timeInterval?.duration) return 0. For running time entries (no end time), calculate the current duration on the fly: (Date.now() - new Date(entry.timeInterval.start)) / 3600000.
1// Handle null/running time entry duration2const durationHours = entry.timeInterval?.duration3 ? parseDuration(entry.timeInterval.duration)4 : entry.timeInterval?.start5 ? (Date.now() - new Date(entry.timeInterval.start)) / 36000006 : 0;Reports API returns different totals than manually summing time entries
Cause: The Reports API may use UTC dates while the main API uses the workspace's configured timezone, causing date boundary differences.
Solution: Ensure date range parameters in both APIs use the same timezone context. Check your Clockify workspace's timezone setting (Settings → Workspace) and adjust your date range to account for timezone offset if entries near midnight are showing on the wrong day.
Best practices
- Store your Clockify API key in Retool Configuration Variables marked as secret — even though it's sent in a custom header (not Authorization), it still provides full account access.
- Create a separate Retool Resource for the Clockify Reports API (https://reports.api.clockify.me/v1) alongside the main API resource — use the Reports API for aggregated data to avoid inefficient client-side aggregation of thousands of time entries.
- Always build project and user lookup maps from the workspace data queries and store them as Retool state variables — use these to join time entry IDs to human-readable names in transformers.
- Add ISO 8601 duration parsing as a reusable JavaScript function in your transformers — you'll need it for every time entry query and inconsistent parsing leads to calculation errors.
- Use Clockify's page-size: 200 parameter (the maximum) to minimize the number of API calls needed — time entry queries for busy teams with long date ranges can return thousands of records.
- Filter time entries by date range as tightly as possible — loading a year of time entries for all users is slow and unnecessary for most dashboard views. Default to the current week or month.
- When building billing reports, use the billable flag on time entries rather than assuming all time is billable — projects and individual entries can have billable overridden at the entry level.
- Implement a loading indicator in your Retool dashboard for time entry queries — large date ranges with many team members can take several seconds to fetch and process.
Alternatives
Harvest includes built-in invoicing and expense tracking alongside time tracking, while Clockify is free and focused purely on time tracking without billing features.
Toggl Track offers a similar time tracking feature set to Clockify with a comparable REST API, while Clockify's free tier has unlimited users which is advantageous for larger teams on a budget.
Everhour focuses on deep project management integrations (Asana, Trello, GitHub) for time tracking inside those tools, while Clockify is a standalone tracker that works independently of project management software.
Frequently asked questions
Does Retool have a native Clockify connector?
No, Retool does not have a dedicated native Clockify connector. You connect via a REST API Resource using Clockify's API key in the X-Api-Key request header. The setup takes about 15 minutes and provides access to all Clockify API endpoints including time entries, projects, clients, users, and the separate Reports API.
Can I add and edit time entries from Retool?
Yes. Use POST /workspaces/{workspaceId}/time-entries to create a new time entry with a description, project ID, start time, end time, and billable flag. Use PUT /workspaces/{workspaceId}/user/{userId}/time-entries/{entryId} to update an existing entry. Add a Form component in Retool with the required fields, wire the submit button to the create or update query, and refresh the time entries Table on success.
What is the difference between Clockify's main API and the Reports API?
Clockify's main API (api.clockify.me/api/v1) provides CRUD operations for individual time entries, projects, clients, users, and tags. The Reports API (reports.api.clockify.me/v1) provides pre-aggregated summary, detailed, and weekly reports with advanced filtering — it's the equivalent of Clockify's native reports interface but via API. For analytics dashboards, use the Reports API for aggregated data and the main API for creating or editing individual records.
How do I handle teams with multiple Clockify workspaces?
First call GET /workspaces to retrieve all workspaces your API key can access. Store the workspace IDs and let users select a workspace from a dropdown (Select component). All subsequent queries should use the selected workspace ID, allowing the dashboard to switch between workspaces dynamically.
Can Retool track time in Clockify directly (start/stop timer)?
Yes, but with some limitations. Clockify's API supports creating time entries with only a start time (no end time), which represents a running timer. Use POST /workspaces/{workspaceId}/time-entries with start set to the current time and no end field to start a timer. Stop it by PATCHing the entry with an end time. However, this is more complex in Retool since you need to store the running entry's ID between actions — use a Retool state variable or your own database to track running timers.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation