Harvest

Create and list time entries in Harvest.

Project managementAPI key11 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (11)
  4. get_time_entries
  5. custom_api_call
  6. get_clients
  7. get_estimates
  8. get_expenses
  9. get_invoices
  10. get_projects
  11. get_roles
  12. get_tasks
  13. get_users
  14. reports-uninvoiced
  15. Details

Connect

Auth type: API key (secret_text). Pass the provider's API key or token as the connection's credential. It is sealed at rest and only opened on the server when an action runs.

  • From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
  • Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
  • Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.

Call it from a workflow

step.ctx.integrations.invoke("harvest", action, input) resolves with the provider's answer and rejects when Harvest isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "harvest"} says whether yours can call it.

Workflow
// workflows/notify.ts: call Harvest when a booking is confirmed
import { on } from "@appbricx/workflows";

export const tellHarvest = on.transition("booking", "status", "confirmed", async (_event, step) => {
  // Recorded once: a retry doesn't send it twice. Rejects when Harvest isn't connected.
  const output = await step.run("Harvest", () =>
    step.ctx.integrations.invoke("harvest", "get_time_entries", {}),
  );
  step.ctx.log("Harvest answered", output);
});
Try it from your agent
{
  "name": "integrations",
  "arguments": {
    "project_id": "<project-id>",
    "action": "call",
    "piece": "harvest",
    "piece_action": "get_time_entries",
    "input": {},
    "env": "dev"
  }
}
From another backend (connector proxy)
curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/harvest/get_time_entries" \
  -H "Authorization: Bearer $APP_KEY" \
  -H "content-type: application/json" \
  -d '{"props":{}}'

Actions

get_time_entries

Get Time Entries. Fetches Time Entries

InputTypeDescription
fromoptionaltextOnly return time entries with an spent_date on or after the given date. (YYYY-MM-DD)
tooptionaltextOnly return time entries with an spent_date on or before the given date. (YYYY-MM-DD)
user_idoptionaltextOnly return time entries belonging to the user with the given ID.
client_idoptionaltextOnly return time entries belonging to the client with the given ID.
project_idoptionaltextOnly return time entries belonging to the project with the given ID.
task_idoptionaltextOnly return time entries belonging to the task with the given ID.
external_reference_idoptionaltextOnly return time entries with the given external reference ID.
is_billedoptionaltextPass `true` to only return time entries that have been invoiced and `false` to return time entries that have not been invoiced.
is_runningoptionaltextPass `true` to only return running time entries and `false` to return non-running time entries.
updated_sinceoptionaltextOnly return time entries that have been updated since the given date and time.
pageoptionaltextThe page number to use in pagination.
per_pageoptionaltextThe number of records to return per page. (1-2000)

custom_api_call

Custom API Call. Make a custom API call to a specific endpoint

InputTypeDescription
urlrequiredobject (depends on other props)url
methodrequiredone of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD"Method
headersrequiredobjectAuthorization headers are injected automatically from your connection.
queryParamsrequiredobjectQuery Parameters
body_typeoptionalone of "none" | "json" | "form_data" | "raw"Body Type
bodyoptionalobject (depends on other props)Body
response_is_binaryoptionalbooleanEnable for files like PDFs, images, etc.
failsafeoptionalbooleanNo Error on Failure
timeoutoptionalnumberTimeout (in seconds)
followRedirectsoptionalbooleanFollow redirects

get_clients

Get Clients. Fetches Clients

InputTypeDescription
is_activeoptionaltextPass `true` to only return active clients and `false` to return inactive clients.
updated_sinceoptionaltextOnly return clients that have been updated since the given date and time.
pageoptionaltextDEPRECATED: The page number to use in pagination.
per_pageoptionaltextThe number of records to return per page. (1-2000)

get_estimates

Get Estimates. Fetches Estimates

InputTypeDescription
fromoptionaltextOnly return estimates with an issue_date on or after the given date. (YYYY-MM-DD)
tooptionaltextOnly return estimates with an issue_date on or before the given date. (YYYY-MM-DD)
stateoptionaltextOnly return estimates with a state matching the value provided. Options: draft, open, accepted, or declined.
updated_sinceoptionaltextOnly return estimates that have been updated since the given date and time.
client_idoptionaltextOnly return estimates belonging to the client with the given ID.
pageoptionaltextThe page number to use in pagination.
per_pageoptionaltextThe number of records to return per page. (1-2000)

get_expenses

Get Expenses. Fetches expenses

InputTypeDescription
fromoptionaltextOnly return expenses with an spent_date on or after the given date. (YYYY-MM-DD)
tooptionaltextOnly return expenses with an spent_date on or before the given date. (YYYY-MM-DD)
user_idoptionaltextOnly return expenses belonging to the user with the given ID.
client_idoptionaltextOnly return expenses belonging to the client with the given ID.
project_idoptionaltextOnly return expenses belonging to the project with the given ID.
is_billedoptionaltextPass `true` to only return expenses that have been invoiced and `false` to return expenses that have not been invoiced.
updated_sinceoptionaltextOnly return expenses that have been updated since the given date and time.
pageoptionaltextThe page number to use in pagination.
per_pageoptionaltextThe number of records to return per page. (1-2000)

get_invoices

Get Invoices. Fetches invoices

InputTypeDescription
fromoptionaltextOnly return invoices with an issue_date on or after the given date. (YYYY-MM-DD)
tooptionaltextOnly return invoices with an issue_date on or before the given date. (YYYY-MM-DD)
stateoptionaltextOnly return invoices with a state matching the value provided. Options: draft, open, paid, or closed.
updated_sinceoptionaltextOnly return invoices that have been updated since the given date and time.
client_idoptionaltextOnly return invoices belonging to the client with the given ID.
project_idoptionaltextOnly return invoices belonging to the project with the given ID.
pageoptionaltextThe page number to use in pagination.
per_pageoptionaltextThe number of records to return per page. (1-2000)

get_projects

Get Projects. Fetches projects

InputTypeDescription
is_activeoptionaltextPass `true` to only return active projects and `false` to return inactive projects.
updated_sinceoptionaltextOnly return projects that have been updated since the given date and time.
client_idoptionaltextOnly return invoices belonging to the client with the given ID.
pageoptionaltextDEPRECATED: The page number to use in pagination.
per_pageoptionaltextThe number of records to return per page. (1-2000)

get_roles

Get Roles. Fetches Roles

InputTypeDescription
pageoptionaltextDEPRECATED: The page number to use in pagination.
per_pageoptionaltextThe number of records to return per page. (1-2000)

get_tasks

Get Tasks. Fetches Tasks

InputTypeDescription
is_activeoptionaltextPass `true` to only return active tasks and `false` to return inactive tasks.
updated_sinceoptionaltextOnly return tasks that have been updated since the given date and time.
pageoptionaltextDEPRECATED: The page number to use in pagination.
per_pageoptionaltextThe number of records to return per page. (1-2000)

get_users

Get Users. Fetches Users

InputTypeDescription
is_activeoptionaltextPass `true` to only return active users and `false` to return inactive users.
updated_sinceoptionaltextOnly return users that have been updated since the given date and time.
pageoptionaltextDEPRECATED: The page number to use in pagination.
per_pageoptionaltextThe number of records to return per page. (1-2000)

reports-uninvoiced

Uninvoiced Report. Uninvoiced hours and expenses for all billable projects

InputTypeDescription
fromrequiredtextOnly report on time entries and expenses with a spent_date on or after the given date. (YYYY-MM-DD)
torequiredtextOnly report on time entries and expenses with a spent_date on or before the given date. (YYYY-MM-DD)
include_fixed_feeoptionaltextWhether or not to include fixed-fee projects in the response. (Default: true)
pageoptionaltextThe page number to use in pagination.
per_pageoptionaltextThe number of records to return per page. (1-2000)

Details

Id
harvest
Category
Project management
Tags
time-tracking, invoicing, timesheets
Package
@activepieces/piece-harvest@0.1.4
Runs
Through the integration runner