Harvest
Create and list time entries in Harvest.
On this page
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.
// 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);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "harvest",
"piece_action": "get_time_entries",
"input": {},
"env": "dev"
}
}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
| Input | Type | Description |
|---|---|---|
fromoptional | text | Only return time entries with an spent_date on or after the given date. (YYYY-MM-DD) |
tooptional | text | Only return time entries with an spent_date on or before the given date. (YYYY-MM-DD) |
user_idoptional | text | Only return time entries belonging to the user with the given ID. |
client_idoptional | text | Only return time entries belonging to the client with the given ID. |
project_idoptional | text | Only return time entries belonging to the project with the given ID. |
task_idoptional | text | Only return time entries belonging to the task with the given ID. |
external_reference_idoptional | text | Only return time entries with the given external reference ID. |
is_billedoptional | text | Pass `true` to only return time entries that have been invoiced and `false` to return time entries that have not been invoiced. |
is_runningoptional | text | Pass `true` to only return running time entries and `false` to return non-running time entries. |
updated_sinceoptional | text | Only return time entries that have been updated since the given date and time. |
pageoptional | text | The page number to use in pagination. |
per_pageoptional | text | The number of records to return per page. (1-2000) |
custom_api_call
Custom API Call. Make a custom API call to a specific endpoint
| Input | Type | Description |
|---|---|---|
urlrequired | object (depends on other props) | url |
methodrequired | one of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD" | Method |
headersrequired | object | Authorization headers are injected automatically from your connection. |
queryParamsrequired | object | Query Parameters |
body_typeoptional | one of "none" | "json" | "form_data" | "raw" | Body Type |
bodyoptional | object (depends on other props) | Body |
response_is_binaryoptional | boolean | Enable for files like PDFs, images, etc. |
failsafeoptional | boolean | No Error on Failure |
timeoutoptional | number | Timeout (in seconds) |
followRedirectsoptional | boolean | Follow redirects |
get_clients
Get Clients. Fetches Clients
| Input | Type | Description |
|---|---|---|
is_activeoptional | text | Pass `true` to only return active clients and `false` to return inactive clients. |
updated_sinceoptional | text | Only return clients that have been updated since the given date and time. |
pageoptional | text | DEPRECATED: The page number to use in pagination. |
per_pageoptional | text | The number of records to return per page. (1-2000) |
get_estimates
Get Estimates. Fetches Estimates
| Input | Type | Description |
|---|---|---|
fromoptional | text | Only return estimates with an issue_date on or after the given date. (YYYY-MM-DD) |
tooptional | text | Only return estimates with an issue_date on or before the given date. (YYYY-MM-DD) |
stateoptional | text | Only return estimates with a state matching the value provided. Options: draft, open, accepted, or declined. |
updated_sinceoptional | text | Only return estimates that have been updated since the given date and time. |
client_idoptional | text | Only return estimates belonging to the client with the given ID. |
pageoptional | text | The page number to use in pagination. |
per_pageoptional | text | The number of records to return per page. (1-2000) |
get_expenses
Get Expenses. Fetches expenses
| Input | Type | Description |
|---|---|---|
fromoptional | text | Only return expenses with an spent_date on or after the given date. (YYYY-MM-DD) |
tooptional | text | Only return expenses with an spent_date on or before the given date. (YYYY-MM-DD) |
user_idoptional | text | Only return expenses belonging to the user with the given ID. |
client_idoptional | text | Only return expenses belonging to the client with the given ID. |
project_idoptional | text | Only return expenses belonging to the project with the given ID. |
is_billedoptional | text | Pass `true` to only return expenses that have been invoiced and `false` to return expenses that have not been invoiced. |
updated_sinceoptional | text | Only return expenses that have been updated since the given date and time. |
pageoptional | text | The page number to use in pagination. |
per_pageoptional | text | The number of records to return per page. (1-2000) |
get_invoices
Get Invoices. Fetches invoices
| Input | Type | Description |
|---|---|---|
fromoptional | text | Only return invoices with an issue_date on or after the given date. (YYYY-MM-DD) |
tooptional | text | Only return invoices with an issue_date on or before the given date. (YYYY-MM-DD) |
stateoptional | text | Only return invoices with a state matching the value provided. Options: draft, open, paid, or closed. |
updated_sinceoptional | text | Only return invoices that have been updated since the given date and time. |
client_idoptional | text | Only return invoices belonging to the client with the given ID. |
project_idoptional | text | Only return invoices belonging to the project with the given ID. |
pageoptional | text | The page number to use in pagination. |
per_pageoptional | text | The number of records to return per page. (1-2000) |
get_projects
Get Projects. Fetches projects
| Input | Type | Description |
|---|---|---|
is_activeoptional | text | Pass `true` to only return active projects and `false` to return inactive projects. |
updated_sinceoptional | text | Only return projects that have been updated since the given date and time. |
client_idoptional | text | Only return invoices belonging to the client with the given ID. |
pageoptional | text | DEPRECATED: The page number to use in pagination. |
per_pageoptional | text | The number of records to return per page. (1-2000) |
get_roles
Get Roles. Fetches Roles
| Input | Type | Description |
|---|---|---|
pageoptional | text | DEPRECATED: The page number to use in pagination. |
per_pageoptional | text | The number of records to return per page. (1-2000) |
get_tasks
Get Tasks. Fetches Tasks
| Input | Type | Description |
|---|---|---|
is_activeoptional | text | Pass `true` to only return active tasks and `false` to return inactive tasks. |
updated_sinceoptional | text | Only return tasks that have been updated since the given date and time. |
pageoptional | text | DEPRECATED: The page number to use in pagination. |
per_pageoptional | text | The number of records to return per page. (1-2000) |
get_users
Get Users. Fetches Users
| Input | Type | Description |
|---|---|---|
is_activeoptional | text | Pass `true` to only return active users and `false` to return inactive users. |
updated_sinceoptional | text | Only return users that have been updated since the given date and time. |
pageoptional | text | DEPRECATED: The page number to use in pagination. |
per_pageoptional | text | The number of records to return per page. (1-2000) |
reports-uninvoiced
Uninvoiced Report. Uninvoiced hours and expenses for all billable projects
| Input | Type | Description |
|---|---|---|
fromrequired | text | Only report on time entries and expenses with a spent_date on or after the given date. (YYYY-MM-DD) |
torequired | text | Only report on time entries and expenses with a spent_date on or before the given date. (YYYY-MM-DD) |
include_fixed_feeoptional | text | Whether or not to include fixed-fee projects in the response. (Default: true) |
pageoptional | text | The page number to use in pagination. |
per_pageoptional | text | The 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