Productivity · n8n

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.

difficulty Intermediatesetup 45 minresult Every completed ClickUp task automatically generates a Harvest time entry with the task name and a default duration, keeping your billing records accurate without any manual work.
  1. 1

    Set up the ClickUp Trigger node

    Add a ClickUp Trigger node and connect your ClickUp account via OAuth2. Set the Events field to taskStatusUpdated. This node listens for any task status change in your ClickUp workspace and fires the workflow each time one occurs.

  2. 2

    Filter for completed tasks only

    Add an IF node connected to the ClickUp Trigger. In the Condition section, set Value 1 to the expression {{$json["status"]["status"]}} and Value 2 to the text complete (use whatever status label you use in ClickUp, such as done or completed). Only tasks matching this status will continue through the workflow.

  3. 3

    Map task data to clean fields

    Add a Set node after the IF node's true branch. Create three fields: taskName mapped to {{$json["name"]}}, taskId mapped to {{$json["id"]}}, and hoursLogged set to a fixed number like 1 (you can adjust this default). This keeps downstream data clean and easy to read.

  4. 4

    Create a time entry in Harvest

    Add an HTTP Request node connected to the Set node. Set Method to POST and URL to https://api.harvestapp.com/v2/time_entries. Under Headers, add Harvest-Account-Id with your Harvest Account ID, and Authorization with Bearer YOUR_HARVEST_API_TOKEN. Set Body Content Type to JSON and add a Body with fields: project_id (your Harvest project ID as a number), task_id (your Harvest task ID as a number), spent_date set to {{new Date().toISOString().split('T')[0]}}, hours set to {{$json["hoursLogged"]}}, and notes set 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.

About this recipe. Recipes on FlowRecipesHub are written for business owners, not developers, and are tested before publishing — how recipes get made. Some ingredient links are affiliate links that cost you nothing — full disclosure.