Search API Connector Documentation

Print

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

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Get Your Clockify API Key

  1. Log in to Clockify.me and click Settings in the left-hand sidebar
    clockify-settings
  2. Scroll down to the API section and click Generate
    clockify-generate
  3. 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.

  1. Open up Google Sheets and click Extensions > API Connector > Open > Create request.
  2. In the request form enter the following:
    • ApplicationCustom
    • MethodGET
    • Request URLhttps://api.clockify.me/api/v1/workspaces
    • Headers
      • x-api-key: your_api_key
  3. Create a new tab and click Set current to use that tab as your data destination.
  4. Name your request and click Run. A moment later you’ll see data populate your sheet.
    clockify-response-workspaces

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.
clockify-response-timentries

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
    clockify-pagination

Part 4: API Documentation

Official API documentation: https://docs.clockify.me/

Leave a Comment

Jump To...