View as Markdown
BambooHR icon

BambooHR ACTION

Create Time Off Request

Create a time off request for an employee. Use List Time Off Types to find a valid time off type ID and Get Employees Directory for the employee ID. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's BambooHR account once, then configure and run Create Time Off Request 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: "bamboohr-create-time-off-request",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    bamboohr: { authProvisionId: "apn_xxxxxxx" },
    employeeId: "Employee ID",
    status: "Status",
  },
})

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 Time Off Request inputs
Property Type Description
employeeId Employee ID string
The employee ID (digits only), e.g. 100. Run Get Employees Directory to discover IDs.
Required
status Status string
Initial request status. One of approved, denied, declined, requested.
Required
start Start string
Start date in YYYY-MM-DD format.
Required
end End string
End date in YYYY-MM-DD format.
Required
timeOffTypeId Time Off Type ID string
The time off type ID, e.g. 5. Run List Time Off Types to discover IDs.
Required
amount Amount string
Required unless dates is supplied instead. Total amount of time off for the whole date range, measured in the time off type's own unit — run List Time Off Types to check whether this type is days or hours before choosing a value. For a days type this is a day-fraction (e.g. 1 for one full day, 3 for a 3-day range), NOT hours; for an hours type it's the literal hour count (e.g. 8). A value outside what the date range can hold (e.g. 8 for a 1-day days-type request) is rejected by the API.
Optional
previousRequest Previous Request string
The ID of a prior time off request to supersede, e.g. 12345. Run List Time Off Requests to find a valid ID. Supersedes the prior request: it's cancelled, its approval workflow is removed, and any related notifications are deleted.
Optional
notes Notes string
JSON array of note objects, e.g. [{"from":"employee","note":"Vacation"}].
Optional
dates Dates string
Optional per-day breakdown; when supplied, amount is ignored and the sum of these daily amounts is used instead. JSON array of per-day objects, each amount in the time off type's own unit (a days-type request typically uses 1 per full day, not hours) — e.g. [{"ymd":"2026-07-01","amount":1}] for a days-type, or [{"ymd":"2026-07-01","amount":8}] for an hours-type.
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
bamboohr-create-time-off-request
Version
0.0.1
App
BambooHR
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes