Search API Connector Documentation
Import Clockify Data to Google Sheets
In this guide, we’ll walk through how to pull data from the Clockify API directly into Google Sheets, using the API Connector add-on for Sheets.
Contents
- Before You Begin
- Part 1: Get Your Clockify API Key
- Part 2: Pull Clockify API Data into Sheets
- Part 3: Handle Pagination
- Part 4: API Documentation
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Get Your Clockify API Key
- Log in to Clockify.me and click Settings in the left-hand sidebar
- Scroll down to the API section and click Generate
- You should now see your key. Keep it handy as you'll need it in a moment. Congrats! You're now ready to use the Clockify API.
Part 2: Pull Clockify API Data into Sheets
For this example, we'll get a list of our available workspaces.
- Open up Google Sheets and click Extensions > API Connector > Open > Create request.
- In the request form enter the following:
- Application:
Custom
- Method:
GET
- Request URL:
https://api.clockify.me/api/v1/workspaces
- Headers
x-api-key
:your_api_key
- Application:
- Create a new tab and click Set current to use that tab as your data destination.
- Name your request and click Run. A moment later you’ll see data populate your sheet.
Note the workspace IDs returned in column A, and the user Ids in column G. You can use those for subsequent requests, e.g. a request to https://api.clockify.me/api/v1/workspaces/workspace_id/user/user_id/time-entries?page-size=1000
will return time entries for a user.
Part 3: Handle Pagination
By default, Clockify will return 50 records at a time. To get more, set the page-size
parameter to any number up to 5000 for base endpoints, or 1000 for report endpoints.
To fetch more than 5000 (or 1000) records, use pagination handling (paid feature):
- Pagination type:
page parameter
- Page parameter:
page
- Run until:
choose when to stop fetching data
Part 4: API Documentation
Official API documentation: https://docs.clockify.me/