Skip to main content

Clockify Data Source

The Clockify connector enables you to ingest time tracking and project management data—including workspaces, users, projects, clients, tags, tasks, and time entries, as well as detailed and summary reports—from your Clockify account. Follow the instructions below to create a new data flow that ingests data from a Clockify source in Nexla.
clockify_api.png

Clockify

Create a New Data Flow

  1. To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Then, select the desired flow type from the list, and click the Create button.

  2. Select the Clockify connector tile from the list of available connectors. Then, select the credential that will be used to connect to the Clockify instance, and click Next; or, create a new Clockify credential for use in this flow.

  3. In Nexla, Clockify data sources can be created using pre-built endpoint templates, which expedite source setup for common Clockify endpoints. Each template is designed specifically for the corresponding Clockify endpoint, making source configuration easy and efficient.
    • To configure this source using a template, follow the instructions in Configure Using a Template.

    Clockify sources can also be configured manually, allowing you to ingest data from Clockify endpoints not included in the pre-built templates or apply further customizations to exactly suit your needs.
    • To configure this source manually, follow the instructions in Configure Manually.

Configure Using a Template

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Clockify endpoints. Each template is designed specifically for the corresponding Clockify endpoint, making data source setup easy and efficient.

Most Clockify endpoints operate within the context of a workspace, which is the top-level container for all projects, clients, tasks, tags, and time entries in Clockify. Many templates therefore require a Workspace ID, which you can obtain from the List Workspaces template (each workspace object includes an id field) or from the Get Current User template (the response includes the user's defaultWorkspace and activeWorkspace).

Endpoint Settings

  • Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below. Click on an endpoint to see more information about it and how to configure your data source for this endpoint.

    List Workspaces

    This endpoint returns a list of all workspaces accessible to the authenticated user. Use it as a starting point to discover the Workspace IDs required by most other Clockify endpoints.

    • This endpoint requires no additional parameters. Select the template, and Nexla will retrieve every workspace available to the API key configured in your credential.
    • The response is a JSON array, and Nexla treats each workspace object as an individual record.

    Each workspace object includes an id field. Copy this value to populate the Workspace ID parameter required by most other Clockify templates.

    Get Current User

    This endpoint retrieves the profile of the currently authenticated user, including the user's ID, default workspace, and active workspace. Use it to obtain the User ID and Workspace ID needed by other templates.

    • This endpoint requires no additional parameters. Select the template, and Nexla will return the profile associated with the API key configured in your credential.
    • The response includes the id, defaultWorkspace, and activeWorkspace fields, which are commonly used to configure the List Time Entries and Stop Timer operations.

    List Users

    This endpoint returns a list of all users in a workspace. Use it to synchronize team membership or to obtain User IDs for other operations such as listing time entries.

    • Enter the ID of the workspace whose users you want to retrieve in the Workspace ID field.
    • The endpoint is paginated, and Nexla automatically requests additional pages until all users have been retrieved.

    List User Groups

    This endpoint returns a list of all user groups in a workspace. User groups are used in Clockify to organize members and manage access to projects.

    • Enter the ID of the workspace whose user groups you want to retrieve in the Workspace ID field.
    • The endpoint is paginated, and Nexla automatically requests additional pages until all user groups have been retrieved.

    List Projects

    This endpoint returns a list of all projects in a workspace. Use it to synchronize project metadata such as names, clients, colors, and billable rates.

    • Enter the ID of the workspace containing the projects in the Workspace ID field.
    • The endpoint is paginated, and Nexla automatically requests additional pages until all projects have been retrieved.

    Each project object includes an id field. This value is required by the List Tasks template to retrieve the tasks belonging to a specific project.

    List Clients

    This endpoint returns a list of all clients in a workspace. Clients in Clockify represent the customers or organizations that projects are associated with.

    • Enter the ID of the workspace containing the clients in the Workspace ID field.
    • The endpoint is paginated, and Nexla automatically requests additional pages until all clients have been retrieved.

    List Tags

    This endpoint returns a list of all tags in a workspace. Tags are labels that can be applied to time entries to categorize work for reporting and filtering.

    • Enter the ID of the workspace containing the tags in the Workspace ID field.
    • The endpoint is paginated, and Nexla automatically requests additional pages until all tags have been retrieved.

    List Tasks

    This endpoint returns a list of all tasks for a specific project in a workspace. Tasks are sub-units of work within a project that time entries can be logged against.

    • Enter the ID of the workspace containing the project in the Workspace ID field.
    • Enter the ID of the project whose tasks you want to retrieve in the Project ID field. You can obtain Project IDs by first running the List Projects template.
    • The endpoint is paginated, and Nexla automatically requests additional pages until all tasks have been retrieved.

    List Time Entries

    This endpoint returns a list of time entries for a specific user in a workspace. Use it to ingest the individual time records logged by a team member.

    • Enter the ID of the workspace containing the time entries in the Workspace ID field.
    • Enter the ID of the user whose time entries you want to retrieve in the User ID field. You can obtain User IDs from the List Users or Get Current User templates.
    • The endpoint is paginated, and Nexla automatically requests additional pages until all time entries have been retrieved.

    To retrieve time entries across multiple users or with aggregated totals and richer filtering, use the Detailed Report or Summary Report templates instead.

    Detailed Report

    This endpoint generates a detailed time entry report for a workspace using the Clockify Reports API (hosted on reports.api.clockify.me). Use it when you need individual time entries across users, projects, or clients within a specified date range.

    • Enter the ID of the workspace to run the report against in the Workspace ID field.
    • Enter the report request body in JSON format in the Report Filters (JSON Body) field. This body specifies the date range and any filters, such as users, projects, clients, or tags. For example:

      • {"dateRangeStart":"2024-01-01T00:00:00Z","dateRangeEnd":"2024-01-31T23:59:59Z","detailedFilter":{"page":1,"pageSize":50}}

    The Detailed Report endpoint uses the HTTP POST method and the Reports API host. The dateRangeStart and dateRangeEnd values must be supplied in ISO 8601 datetime format.

    Summary Report

    This endpoint generates a summary (aggregated) time report for a workspace using the Clockify Reports API (hosted on reports.api.clockify.me). Use it when you need totals grouped by dimensions such as project, user, client, or tag rather than individual entries.

    • Enter the ID of the workspace to run the report against in the Workspace ID field.
    • Enter the report request body in JSON format in the Report Filters (JSON Body) field. This body specifies the date range and the grouping dimensions. For example:

      • {"dateRangeStart":"2024-01-01T00:00:00Z","dateRangeEnd":"2024-01-31T23:59:59Z","summaryFilter":{"groups":["PROJECT","USER"]}}

    The groups array controls how the totals are aggregated. Supported grouping values include PROJECT, USER, CLIENT, and TAG, and the order of the array determines the nesting of the aggregation.

Endpoint Testing

Once the selected endpoint template has been configured, Nexla can retrieve a sample of the data that will be fetched according to the current settings. This allows users to verify that the source is configured correctly before saving.

  • To test the current endpoint configuration, click the Test button to the right of the endpoint selection menu. Sample data will be fetched & displayed in the Endpoint Test Result panel on the right.

  • If the sample data is not as expected, review the selected endpoint and associated settings, and make any necessary adjustments. Then, click the Test button again, and check the sample data to ensure that the correct information is displayed.

Configure Manually

Clockify data sources can be manually configured to ingest data from any valid Clockify API endpoint. Manual configuration provides maximum flexibility for accessing endpoints not covered by pre-built templates or when you need custom API configurations.

With manual configuration, you can also create more complex Clockify sources, such as sources that use chained API calls to fetch data from multiple endpoints or sources that require custom request parameters.

API Method

  1. To manually configure this source, select the Advanced tab at the top of the configuration screen.

  2. Select the API method that will be used for calls to the Clockify API from the Method pulldown menu. The most common methods are:

    • GET: For retrieving data from the API, such as listing projects, users, or time entries
    • POST: For generating reports via the Clockify Reports API

API Endpoint URL

  1. Enter the URL of the Clockify API endpoint from which this source will fetch data in the Set API URL field. This should be the complete URL including the protocol (https://) and any required path parameters.

    • Standard resources use the base URL https://api.clockify.me/api/v1 — for example, https://api.clockify.me/api/v1/workspaces/{'{workspaceId}'}/projects.

    • Reports use the Reports API host https://reports.api.clockify.me/v1 — for example, https://reports.api.clockify.me/v1/workspaces/{'{workspaceId}'}/reports/detailed.

Ensure the API endpoint URL is correct and accessible with your current credentials. You can test the endpoint using the Test button after configuring the URL.

Date/Time Macros (API URL)

Optional

Optionally, the API URL can be customized using macros—all macros added to the API URL will be converted into values when Nexla executes the API call. Macros are dynamic placeholders that allow you to create flexible API endpoints that can adapt to different time periods or data requirements. This is particularly useful for Clockify endpoints that accept date range query parameters, such as time entry retrieval.

Macros are particularly useful for APIs that require date ranges, pagination parameters, or other dynamic values that change between data ingestion runs.

  1. To add a macro, type { at the appropriate position in the API URL (within the Set API URL field), and select the desired macro from the dropdown list.

    • {now} – The current datetime
    • {now-1} – The datetime one time unit before the current datetime
    • {now+1} – The datetime one time unit after the current datetime
    • custom – Datetime macros can reference any number of time units before or after the current datetime—for example, enter (now-4) to indicate the datetime four time units before the current datetime
  2. Select the format that will be applied to datetime macros from the Date Format for Date/Time Macro pulldown menu. This format will be applied to the base datetime value of the macro—i.e., the value of {now} in {now-1}.

  3. Select the datetime unit that will be used to perform mathematical operations in the included macro(s) from the Time Unit for Operations pulldown menu—for example, for the macro {now-1}, when Day is selected, {now-1} will be converted to the datetime one day before the current datetime.

Path to Data

Optional

If only a subset of the data that will be returned by the API endpoint is needed, you can designate the part(s) of the response that should be included in the Nexset(s) produced from this source by specifying the path to the relevant data within the response. This is particularly useful when API responses contain metadata, pagination information, or other data that you don't need for your analysis.

For example, the Clockify list endpoints (such as List Projects or List Users) return a top-level JSON array of records. By entering the path to the relevant data, you can configure Nexla to treat each element of the returned array as a record.

Path to Data is essential when API responses have nested structures. Without specifying the correct path, Nexla might not be able to properly parse and organize your data into usable records.

  • To specify which data should be treated as relevant in responses from this source, enter the path to the relevant data in the Set Path to Data in Response field.

    • For responses in JSON format enter the JSON path that points to the object or array that should be treated as relevant data. JSON paths use dot notation (e.g., $.data.items[*] to access an array of items within a data object).
    Path to Data Example:

    Clockify list endpoints return a top-level array, so the path to the relevant data is entered as $[*] to treat each element of the array as a record.

Autogenerate Path Suggestions

Nexla can also autogenerate data path suggestions based on the response from the API endpoint. These suggested paths can be used as-is or modified to exactly suit your needs.

  • To use this feature, click the Test button next to the Set API URL field to fetch a sample response from the API endpoint. Suggested data paths generated based on the content & format of the response will be displayed in the Suggestions box below the Set Path to Data in Response field.

  • Click on a suggestion to automatically populate the Set Path to Data in Response field with the corresponding path. The populated path can be modified directly within the field if further customization is needed.

    PathSuggestions.png

Metadata

If metadata is included in the response but is located outside of the defined path to relevant data, you can configure Nexla to include this data as common metadata in each record. This is useful when you want to preserve important contextual information that applies to all records but isn't part of the main data array.

For example, the Clockify Reports API returns aggregated totals alongside the individual report rows. If you have specified the path to the relevant data but a summary total or request context is located in a different part of the response, you can specify a path to this metadata to include it with each record in the generated Nexset(s).

Metadata paths are particularly useful for preserving API response context like totals, timestamps, or summary statistics that apply to all records in the response.

  • To specify the location of metadata that should be included with each record, enter the path to the relevant metadata in the Path to Metadata in Response field.

    • For responses in JSON format, enter the JSON path to the object or array that contains the metadata.

Request Headers

Optional
  • If Nexla should include any additional request headers in API calls to this source, enter the headers & corresponding values as comma-separated pairs in the Request Headers field (e.g., header1:value1,header2:value2). Additional headers are often required for content type specifications or custom API requirements.

    You do not need to include the X-Api-Key header here. The API key from your credential is attached automatically by Nexla.

Endpoint Testing

After configuring all settings for the selected endpoint, Nexla can retrieve a sample of the data that will be fetched according to the current configuration. This allows users to verify that the source is configured correctly before saving.

  • To test the current endpoint configuration, click the Test button to the right of the endpoint selection menu. Sample data will be fetched & displayed in the Endpoint Test Result panel on the right.

  • If the sample data is not as expected, review the selected endpoint and associated settings, and make any necessary adjustments. Then, click the Test button again, and check the sample data to ensure that the correct information is displayed.

Save & Activate the Source

  1. Once all of the relevant steps in the above sections have been completed, click the Create button in the upper right corner of the screen to save and create the new Clockify data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.