Clockify

Learn how to use Clockify with Composio

Overview

SLUG: CLOCKIFY

Description

Clockify is a free time tracking software that allows individuals and teams to track work hours across projects.

Authentication Details

client_id
stringRequired
client_secret
stringRequired
oauth_redirect_uri
stringDefaults to https://backend.composio.dev/api/v1/auth-apps/add
scopes
string
bearer_token
string
subdomain
stringRequired
generic_api_key
stringRequired

Connecting to Clockify

Create an auth config

Use the dashboard to create an auth config for the Clockify toolkit. This allows you to connect multiple Clockify accounts to Composio for agents to use.

1

Select App

Navigate to the Clockify toolkit page and click “Setup Integration”.

2

Configure Auth Config Settings

Select among the supported auth schemes of and configure them here.

3

Create and Get auth config ID

Click “Create Integration”. After creation, copy the displayed ID starting with ac_. This is your auth config ID. This is not a sensitive ID — you can save it in environment variables or a database. This ID will be used to create connections to the toolkit for a given user.

Connect Your Account

Using OAuth2

1from composio import Composio
2from composio.types import auth_scheme
3
4# Replace these with your actual values
5clockify_auth_config_id = "ac_YOUR_CLOCKIFY_CONFIG_ID" # Auth config ID created above
6user_id = "0000-0000-0000" # UUID from database/application
7
8composio = Composio()
9
10
11def authenticate_toolkit(user_id: str, auth_config_id: str):
12 connection_request = composio.connected_accounts.initiate(
13 user_id=user_id,
14 auth_config_id=auth_config_id,
15 )
16
17 print(
18 f"Visit this URL to authenticate Clockify: {connection_request.redirect_url}"
19 )
20
21 # This will wait for the auth flow to be completed
22 connection_request.wait_for_connection(timeout=15)
23 return connection_request.id
24
25
26connection_id = authenticate_toolkit(user_id, clockify_auth_config_id)
27
28# You can also verify the connection status using:
29connected_account = composio.connected_accounts.get(connection_id)
30print(f"Connected account: {connected_account}")

Using API Key

1from composio import Composio
2from composio.types import auth_scheme
3
4# Replace these with your actual values
5clockify_auth_config_id = "ac_YOUR_CLOCKIFY_CONFIG_ID" # Auth config ID created above
6user_id = "0000-0000-0000" # UUID from database/app
7
8composio = Composio()
9
10def authenticate_toolkit(user_id: str, auth_config_id: str):
11 # Replace this with a method to retrieve an API key from the user.
12 # Or supply your own.
13 user_api_key = input("[!] Enter API key")
14
15 connection_request = composio.connected_accounts.initiate(
16 user_id=user_id,
17 auth_config_id=auth_config_id,
18 config={"auth_scheme": "API_KEY", "val": user_api_key}
19 )
20
21 # API Key authentication is immediate - no redirect needed
22 print(f"Successfully connected Clockify for user {user_id}")
23 print(f"Connection status: {connection_request.status}")
24
25 return connection_request.id
26
27
28connection_id = authenticate_toolkit(user_id, clockify_auth_config_id)
29
30# You can verify the connection using:
31connected_account = composio.connected_accounts.get(connection_id)
32print(f"Connected account: {connected_account}")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the Clockify toolkit’s playground

Python
1from composio import Composio
2from openai import OpenAI
3import json
4
5openai = OpenAI()
6composio = Composio()
7
8# User ID must be a valid UUID format
9user_id = "0000-0000-0000" # Replace with actual user UUID from your database
10
11tools = composio.tools.get(user_id=user_id, toolkits=["CLOCKIFY"])
12
13print("[!] Tools:")
14print(json.dumps(tools))
15
16def invoke_llm(task = "What can you do?"):
17 completion = openai.chat.completions.create(
18 model="gpt-4o",
19 messages=[
20 {
21 "role": "user",
22 "content": task, # Your task here!
23 },
24 ],
25 tools=tools,
26 )
27
28 # Handle Result from tool call
29 result = composio.provider.handle_tool_calls(user_id=user_id, response=completion)
30 print(f"[!] Completion: {completion}")
31 print(f"[!] Tool call result: {result}")
32
33invoke_llm()

Tool List

Tool Name: Create Client

Description

Tool to add a new client to a workspace. use when you need to create a client in a specific workspace.

Action Parameters

address
string
email
string
name
string
note
string
workspaceId
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Webhook

Description

Tool to create a new webhook in a workspace. use when you want to subscribe to workspace events by registering a callback url.

Action Parameters

name
stringRequired
triggerSource
arrayRequired
triggerSourceType
stringRequired
url
stringRequired
webhookEvent
stringRequired
workspaceId
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Client

Description

Tool to delete a client from a workspace. use after archiving the client and confirming no associated data exists.

Action Parameters

id
stringRequired
workspaceId
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Webhook

Description

Tool to delete a webhook from a workspace. use when you need to remove an existing webhook by its id.

Action Parameters

webhookId
stringRequired
workspaceId
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Filter Workspace Users

Description

Tool to filter users in a workspace by advanced criteria. use when you need a paginated, sortable list of workspace users matching multiple filters.

Action Parameters

accountStatuses
array
email
string
includeRoles
boolean
memberships
stringDefaults to NONE
name
string
page
integerDefaults to 1
pageSize
integerDefaults to 50
projectId
string
roles
array
sortColumn
stringDefaults to EMAIL
sortOrder
stringDefaults to ASCENDING
status
stringDefaults to ALL
userGroups
array
workspaceId
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Find All Users On Workspace

Description

Tool to list all users in a workspace. use when you need to retrieve workspace members after confirming the workspace id. example: "find all users on workspace 64a687e29ae1f428e7ebe303."

Action Parameters

email
string
name
string
page
integer
page-size
integer
workspaceId
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Find User’s Team Managers

Description

Tool to get managers of a user in a workspace. use after confirming workspace and user ids are correct.

Action Parameters

page
integerDefaults to 1
page-size
integerDefaults to 50
sort-column
stringDefaults to ID
sort-order
stringDefaults to ASCENDING
userId
stringRequired
workspaceId
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Generate New Webhook Token

Description

Tool to generate a new webhook token. use after confirming workspace and webhook ids.

Action Parameters

webhook_id
stringRequired
workspace_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get All Addon Webhooks

Description

Tool to list all webhooks for an addon in a workspace. use after confirming workspace and addon ids.

Action Parameters

addonId
stringRequired
workspaceId
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get All My Workspaces

Description

Tool to list all workspaces the user belongs to. use when you need an overview of accessible workspaces after authentication.

Action Parameters

roles
array

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get All Webhooks

Description

Tool to list all webhooks in a workspace. use when you need to retrieve defined webhooks after confirming the workspace id.

Action Parameters

workspaceId
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Clients

Description

Tool to list clients in a workspace. use after obtaining a workspace id.

Action Parameters

name
string
page
integer
page-size
integer
workspaceId
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Client By ID

Description

Tool to get details of a client by id. use after confirming workspace and client ids.

Action Parameters

id
stringRequired
workspaceId
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Currently Logged In User Info

Description

Tool to retrieve info about the authenticated user. use when verifying credentials and needing current user context after authentication.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Holidays

Description

Tool to retrieve all holidays for a workspace. use when you need to list or filter workspace holidays after confirming the workspace id.

Action Parameters

end
string
start
string
workspaceId
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Holidays In Period

Description

Tool to retrieve holidays in a specific period. use when you need holidays assigned to a user between two dates after confirming the workspace id.

Action Parameters

assigned-to
stringRequired
end
stringRequired
start
stringRequired
workspaceId
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get member’s profile

Description

Tool to get a member's profile in a workspace. use when you need detailed profile info after identifying the workspace and user.

Action Parameters

userId
stringRequired
workspaceId
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Webhook By ID

Description

Tool to get details of a specific webhook. use after confirming workspace and webhook id.

Action Parameters

webhookId
stringRequired
workspaceId
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Workspace Info

Description

Tool to get details of a specific workspace. use after obtaining the workspace id.

Action Parameters

workspaceId
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired