Zapier Webhook Payloads for Leave Requests
Each Zapier trigger sends one enriched leave request as a JSON object. Core request data is always included, while resolved employee, leave type, and approver details are added when the related lookup succeeds.
Sample payload
Use the sample below as the shape for an approved request. It shows how identifiers, dates, day counts, and resolved names sit together in one object. Map Zapier fields from this object rather than assuming separate lookups are needed for employee, leave type, or approver.
Core fields
These values are present in every delivery and form the reliable base for mapping: id (string, unique leave request ID); companyId (string); userId (string, employee who owns the request); leaveTypeId (string); startDate and endDate (string, YYYY-MM-DD); isPartDay (boolean); status (string: OPEN, APPROVED, DENIED, CANCELLED, EXPIRED, or DELETED); workingDays and calendarDays (number); daysList (array of day, leaveHours, and workingHoursInDay); totalThisYear and totalNextYear (number, with totalNextYear covering cross-year leaves); created (string, ISO 8601 timestamp); teamId (string, employee team/department); locationId (string); leavePolicyId (string, compound locationId#leaveTypeId).
Enrichment fields
Resolved details are added from related records: userName and userEmail for the employee, userEmployeeId when set, leaveTypeName such as Paid Time Off, and approverName, approverEmail, and approverEmployeeId when applicable. If a lookup fails, that field is omitted instead of causing the webhook to fail, so downstream steps should treat enrichment fields as optional.
wasApprovedBeforeAction logic
Check wasApprovedBeforeAction to learn the state before the current event. For LEAVE_REQUEST_CANCELLED, true means the request had been approved before cancellation and false means it was still pending. For other events, true means it had been approved before the action, for example an approved request being edited, and false means it had not previously been approved. Typical values: LEAVE_REQUEST_CREATED false, LEAVE_REQUEST_ADDED false, LEAVE_REQUEST_APPROVED false, LEAVE_REQUEST_DENIED false, LEAVE_REQUEST_UPDATED true, LEAVE_REQUEST_CANCELLED true, LEAVE_REQUEST_DELETED false. Treat these as typical, not as a substitute for reading the field on each delivery.
Per-event field differences
LEAVE_REQUEST_CREATED: no approverId, approverName, or approverEmail, and no autoApproved, because approval workflow has not started. LEAVE_REQUEST_ADDED: no approver fields, but includes autoApproved: true. LEAVE_REQUEST_DELETED: no approver fields. All other events: include the full field set, including approver information. Build Zapier steps so approver fields are only referenced where the event supplies them.
Stripped fields
The following internal fields are never sent: reason (may contain sensitive information such as medical details), statusReason (internal manager note), cancelledBeforeReview (internal flag consumed to compute wasApprovedBeforeAction), originalVersion (internal previous-state snapshot), errors (internal error tracking), isResent (internal resend flag), resentLeaveRequestId (internal reference), hasWorkingHoursSchedule (internal scheduling flag), leaveDaysList (deprecated, superseded by daysList), partDayStartHour and partDayEndHour (internal hour values), and isEdited (internal edit tracking flag). Do not map these fields in Zapier.
Implementation checklist
Before publishing a Zap, test each event type separately, confirm which enrichment fields appear, and verify that approver-dependent actions are not used for created, added, or deleted events. Use wasApprovedBeforeAction to distinguish a cancellation of an approved request from a cancellation of a pending one.
| Field | Type | Description |
|---|---|---|
| id | string | Unique leave request ID |
| companyId | string | Company ID |
| userId | string | ID of the employee who owns the leave request |
| leaveTypeId | string | ID of the leave type |
| startDate | string | Start date in YYYY-MM-DD format |
| endDate | string | End date in YYYY-MM-DD format |
| isPartDay | boolean | Whether this is a partial day leave |
| status | string | Current status: OPEN , APPROVED , DENIED , CANCELLED , EXPIRED , or DELETED |
| workingDays | number | Number of working days consumed |
| calendarDays | number | Total calendar days of the leave |
| daysList | array | Breakdown of each day with day , leaveHours , and workingHoursInDay |
| totalThisYear | number | Days consumed in the current year |
| totalNextYear | number | Days consumed in the next year (for cross-year leaves) |
| created | string | ISO 8601 timestamp when the request was created |
| teamId | string | ID of the employee's team/department |
| locationId | string | ID of the employee's location |
| leavePolicyId | string | Compound ID of the leave policy ( locationId#leaveTypeId ) |
Always present
| Field | Type | Description |
|---|---|---|
| userName | string | Full name of the employee |
| userEmail | string | Email address of the employee |
| userEmployeeId | string | Employee ID (if set) |
| leaveTypeName | string | Name of the leave type (e.g., "Paid Time Off") |
| approverName | string | Full name of the approver (when applicable) |
| approverEmail | string | Email address of the approver (when applicable) |
| approverEmployeeId | string | Employee ID of the approver (when applicable) |
| wasApprovedBeforeAction | boolean | Whether the request was in an approved state before this event occurred |
Omitted if related lookup fails
| Event | Typical value |
|---|---|
| LEAVE_REQUEST_CREATED | false |
| LEAVE_REQUEST_ADDED | false |
| LEAVE_REQUEST_APPROVED | false |
| LEAVE_REQUEST_DENIED | false |
| LEAVE_REQUEST_UPDATED | true |
| LEAVE_REQUEST_CANCELLED | true |
| LEAVE_REQUEST_DELETED | false |
Typical values for wasApprovedBeforeAction
| Field | Reason |
|---|---|
| reason | May contain sensitive information (e.g., medical details) |
| statusReason | Internal manager note |
| cancelledBeforeReview | Internal flag (consumed to compute wasApprovedBeforeAction ) |
| originalVersion | Internal previous-state snapshot |
| errors | Internal error tracking |
| isResent | Internal resend flag |
| resentLeaveRequestId | Internal reference |
| hasWorkingHoursSchedule | Internal scheduling flag |
| leaveDaysList | Deprecated (superseded by daysList ) |
| partDayStartHour | Internal hour value |
| partDayEndHour | Internal hour value |
| isEdited | Internal edit tracking flag |
Never included in webhook payloads
Frequently asked questions
Zapier Integration [SVG icon] — what related developer pages are available? Answer: Triggers, Webhook Payloads, and Setup Guide.
Zapier Integration Triggers Webhook Payloads Setup Guide
{
"id": "leaveRequest-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"companyId": "company-1234-5678-abcd",
"userId": "user-abcd-1234-5678",
"leaveTypeId": "leaveType-c3d4e5f6-a7b8-9012-cdef-123456789012",
"startDate": "2026-03-20",
"endDate": "2026-03-20",
"isPartDay": false,
"status": "APPROVED",
"workingDays": 1,
"calendarDays": 1,
"daysList": [
{
"day": "2026-03-20",
"leaveHours": 8,
"workingHoursInDay": 8
}
],
"totalThisYear": 1,
"totalNextYear": 0,
"created": "2026-03-20T12:00:00.000Z",
"teamId": "team-d4e5f6a7-b8c9-0123-defa-234567890123",
"locationId": "location-e5f6a7b8-c9d0-1234-efab-345678901234",
"leavePolicyId": "location-e5f6a7b8-c9d0-1234-efab-345678901234#leaveType-c3d4e5f6-a7b8-9012-cdef-123456789012",
"wasApprovedBeforeAction": false,
"autoApproved": false,
"approverId": "email-f6a7b8c9-d0e1-2345-fabc-456789012345",
"approverName": "John Manager",
"approverEmail": "[email protected]",
"userName": "Jane Doe",
"userEmail": "[email protected]",
"leaveTypeName": "Paid Time Off"
}