View as Markdown
Harvest icon

Harvest ACTION

Create Timesheet Entry

Create a new time entry. Two ways to log time, matching the account's Company setting: on duration-based accounts (wants_timestamp_timers is false — the common case) set Hours to log a completed entry directly. On timestamp-based accounts (wants_timestamp_timers is true) leave Hours blank and use Started Time/Ended Time instead — leave both time fields blank too to start a running timer now, or set both to log a completed entry with explicit start/end times. Passing Started/Ended Time on a duration-based account is silently ignored by Harvest (it starts a running timer instead) — if that happens, switch to Hours. Use Get Projects to find a Project ID, List Tasks to find a Task ID, and List Users to find a User ID. Example (duration-based): call with projectId, taskId, spentDate="2026-09-17", hours=3.5. Example (timestamp-based): the same call with hours omitted and startedTime/endedTime set instead. See the documentation and start/end time variant.
  • Action
  • Writes data
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Harvest account once, then configure and run Create Timesheet Entry 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: "harvest-create-timesheet-entry",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    harvest: { authProvisionId: "apn_xxxxxxx" },
    accountId: "Account ID",
    projectId: "Project ID",
  },
})

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 Timesheet Entry inputs
Property Type Description
accountId Account ID string
Your Harvest account ID, e.g. 1234567. Run List Account ID Options to find it.
Required
projectId Project ID string
Free-form project ID, e.g. 14308069. Run Get Projects first to find valid IDs.
Required
taskId Task ID string
Free-form task ID, e.g. 1467097. Run List Tasks first to find valid IDs.
Required
spentDate Spent date (YYYY-MM-DD) string
The ISO 8601 formatted date on which the time entry was spent, e.g. 2019-07-26.
Required
userId User ID string
Free-form user ID, e.g. 1782959. Run List Users first to find valid IDs.
Optional
hours Hours string
Duration in hours, e.g. 3.5. Use this on duration-based accounts (the common case) to log a completed entry in one call. Leave blank if using Started Time/Ended Time instead.
Optional
startedTime Started time (H:MM am/pm) string
Timestamp-based accounts only. The time the entry started, e.g. 8:00am. Leave this and Ended Time blank to start a running timer now instead of logging a completed entry.
Optional
endedTime Ended time (H:MM am/pm) string
Timestamp-based accounts only. The time the entry ended, e.g. 5:00pm. Only used when Started Time is also set.
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
harvest-create-timesheet-entry
Version
1.0.0
App
Harvest
Authentication
OAuth
Read-only
No
Destructive
No
Open world
Yes