Automatically Log Time in Harvest When a ClickUp Task Is Completed
When a task is marked complete in ClickUp, this workflow instantly creates a time entry in Harvest so freelancers never forget to log billable hours. It eliminates manual double-entry between your project management and invoicing tools.
- 1
Set up the ClickUp Trigger node
Add a
ClickUp Triggernode and connect your ClickUp account via OAuth2. Set theEventsfield totaskStatusUpdated. This node listens for any task status change in your ClickUp workspace and fires the workflow each time one occurs. - 2
Filter for completed tasks only
Add an
IFnode connected to the ClickUp Trigger. In theConditionsection, setValue 1to the expression{{$json["status"]["status"]}}andValue 2to the textcomplete(use whatever status label you use in ClickUp, such asdoneorcompleted). Only tasks matching this status will continue through the workflow. - 3
Map task data to clean fields
Add a
Setnode after theIFnode'struebranch. Create three fields:taskNamemapped to{{$json["name"]}},taskIdmapped to{{$json["id"]}}, andhoursLoggedset to a fixed number like1(you can adjust this default). This keeps downstream data clean and easy to read. - 4
Create a time entry in Harvest
Add an
HTTP Requestnode connected to theSetnode. SetMethodtoPOSTandURLtohttps://api.harvestapp.com/v2/time_entries. UnderHeaders, addHarvest-Account-Idwith your Harvest Account ID, andAuthorizationwithBearer YOUR_HARVEST_API_TOKEN. SetBody Content TypetoJSONand add aBodywith fields:project_id(your Harvest project ID as a number),task_id(your Harvest task ID as a number),spent_dateset to{{new Date().toISOString().split('T')[0]}},hoursset to{{$json["hoursLogged"]}}, andnotesset to{{$json["taskName"]}}. Store your API token safely in n8n credentials or environment variables.
Frequently asked questions
What ClickUp status name should I use in the IF node?
Use the exact status label from your ClickUp space. Go to your ClickUp space settings, check your statuses, and copy the label exactly as written — it is case-sensitive. Common values are 'complete', 'done', or 'closed'.
How do I find my Harvest Account ID and API token?
Log in to Harvest, click your profile icon in the top right, and select 'Developers'. You will see your Account ID and can create a Personal Access Token on that page. Copy both values and paste them into the HTTP Request node headers.
Can I log the actual time spent instead of a fixed default?
Yes. ClickUp's task webhook payload includes a `time_spent` field in milliseconds. In the Set node, add a field that converts it: `{{($json["time_spent"] / 3600000).toFixed(2)}}` to get hours, then use that field as the `hours` value in the Harvest request instead of the fixed default.