View as Markdown
Clockify icon

Clockify ACTION

Create Invoice

Creates a new invoice for a client in a Clockify workspace. Set Import From and Import To to bill tracked time: the invoice is created and the time entries logged in that period are imported as line items. Leave both blank to create an empty invoice. The invoice is created first and the tracked time is imported in a second request, so if the import fails the invoice still exists and can be removed with Delete Invoice or retried. Chain Update Invoice afterwards to set the subject, note or status. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Clockify account once, then configure and run Create Invoice from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "clockify-create-invoice",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    clockify: { authProvisionId: "apn_xxxxxxx" },
    workspaceId: "Workspace",
    clientId: "Client",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Create Invoice inputs
Property Type Description
workspaceId Workspace string
Identifier of a workspace
Required Dynamic
clientId Client string
Identifier of a client
Required Dynamic
number Number string
Invoice number. Example: INV-001
Required
issuedDate Issue Date string
Issue date of the invoice, in ISO 8601 format. Example: 2026-08-05T00:00:00Z
Required
dueDate Due Date string
Due date of the invoice, in ISO 8601 format. Example: 2026-09-05T00:00:00Z
Required
currency Currency string
Currency of the invoice. Example: USD
Required
timeViewMode Time View Mode string
How tracked time is presented on the invoice. TIME_SENSITIVE_VIEW lists entries individually, AGGREGATED_TIME_VIEW rolls them up
Optional
importFrom Import From string
Start of the period to bill tracked time from, in ISO 8601 format. Set this and Import To to import the time entries logged in that period as line items. Example: 2026-08-01T00:00:00Z
Optional
importTo Import To string
End of the period to bill tracked time from, in ISO 8601 format. Example: 2026-08-31T23:59:59Z
Optional
projectIds Project IDs string[]
Only bill time tracked against these projects. Leave blank to bill every project in the period. Use the List Projects action to find the IDs.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
clockify-create-invoice
Version
0.0.2
App
Clockify
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes