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)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "harvest-create-timesheet-entry",
"configured_props": {
"harvest": { "authProvisionId": "apn_xxxxxxx" },
"accountId": "Account ID",
"projectId": "Project ID"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "harvest",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "harvest-create-timesheet-entry",
arguments: {
accountId: "Account ID",
projectId: "Project ID",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| 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
- Source
- View on GitHub ↗