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)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": "bamboohr-create-time-off-request",
"configured_props": {
"bamboohr": { "authProvisionId": "apn_xxxxxxx" },
"employeeId": "Employee ID",
"status": "Status"
}
}'// 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": "bamboohr",
},
},
},
)
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: "bamboohr-create-time-off-request",
arguments: {
employeeId: "Employee ID",
status: "Status",
},
})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 |
|---|---|---|
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
- Source
- View on GitHub ↗