HR & People package

Leave request

Employees request leave from a form; the balance, leave-type rules and an approval policy decide auto-approval, manager or HR review, then the leave is booked.

Starts from a formStarter~10 min setupv1.0.0

About this package

What it does

Leave request handles annual, sick, parental, bereavement and unpaid leave from one form. The employee enters the leave type, dates, number of working days and an optional reason.

The workflow reads the current balance from your HR system, looks up the leave type in the Leave types table (paid, certificate, notice, automatic limit) and works out the balance after the request and whether enough notice was given. The Leave approval decision table then approves short requests automatically, or sends them to the manager, and brings HR in for parental leave, unpaid leave or requests beyond the balance.

The manager can approve, decline or ask for a change; changed requests go back to the employee and are re-checked against the policy. Approved leave is booked in the HR system, added to the team calendar and confirmed by email. Adapt the leave types, notice periods and approval rules to your policy.

Starts from a form

Starts from a form: the employee fills in the leave request (Run dialog in the app, or your intranet posting it to the start API).

Someone fills in a form to start it: the workflow inputs are the start form (Run dialog in the app, or your own portal posting to the API), and people complete User Task forms along the way.

The flow

Step by step

  1. 1

    Leave requested

    The employee enters the leave type, start and end dates, working days and an optional reason.

  2. 2

    Check balance and rules

    The HR system returns the current balance; the Leave types row gives the notice period, automatic limit and whether the balance is reduced.

  3. 3

    Apply the policy

    The Leave approval decision table approves short requests automatically and decides when a manager and HR review.

  4. 4

    Manager decides

    The manager approves, declines or asks for a change. Changed requests return to the employee and are checked again.

  5. 5

    HR when needed

    For parental leave, unpaid leave or requests beyond the balance, HR confirms the pay arrangement.

  6. 6

    Book and confirm

    The leave is booked in the HR system, added to the team calendar and the employee is emailed.

Leave request — An employee requests leave; the balance, leave-type rules and approval policy decide whether it is approved automatically or goes to the manager (and HR), then the booking is made in the HR system. The same canvas you get in the designer after installing.

Forms

The start form and the task forms

The workflow inputs are the start form: the Run dialog renders them, and your own portal can post the same fields. User Tasks show their fields and outcome buttons to the assignee.

Start form

Leave request

Filled in by whoever starts the process

Employee number * employee_id · textEmployee number in the HR system (E-1001…)
Leave type * leave_type · select
annualsickparentalbereavementunpaid
Type of leave (see the Leave types table)
Start date * start_date · dateYYYY-MM-DDFirst day of leave
End date * end_date · dateYYYY-MM-DDLast day of leave
Working days * days · number0Working days of leave (half days allowed, e.g. 2.5)
Reason reason · textOptional: anything your manager should know
Manager (user id) manager_id · textOptional: user id of the approving manager (overrides the install-time default)
Employee (user id) employee_user_id · textOptional: user id of the employee, for change requests
HR partner (user id) hr_owner_id · textOptional: user id of the HR partner for HR reviews

User Task

Approve leave

Approve leave for {{employee_name}}: {{leave_type}}, {{start_date}} to {{end_date}} ({{days}} days)

Cover arranged cover_arranged · boolean
Comment for the employee comment · text
ApproveDeclineAsk for change

User Task

Confirm leave arrangements

HR: confirm {{leave_type}} leave for {{employee_name}} ({{start_date}} to {{end_date}})

Pay arrangement * pay_arrangement · choice
Full payStatutory payLeave in advanceUnpaid
Certificate received certificate_received · boolean
Comment comment · text
ConfirmDecline

User Task

Change leave request

Change your leave request ({{start_date}} to {{end_date}})

Start date * start_date · datePrefilled: {{start_date}}
End date * end_date · datePrefilled: {{end_date}}
Working days * days · numberPrefilled: {{days}}
ResubmitWithdraw

From your code

Start a run over the API

Every workflow can be started over REST, MCP or the CLI, whatever its trigger, with the sample input below. Runs start straight away on the published version; replace <workflow id> with the id the install created.

REST

shell
curl -X POST "$USERTASKS_URL/api/v1/workflows/start" \
  -H "Authorization: Bearer $USERTASKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"workflow_id":"<workflow id>","variables":{"employee_id":"E-1001","leave_type":"annual","start_date":"2026-12-14","end_date":"2026-12-18","days":5,"reason":"Family trip before the holidays"}}'

CLI

shell
usertasks workflows inputs <workflow id>          # the start form: keys, types, required
usertasks workflows run <workflow id> --input employee_id=E-1001 --input leave_type=annual --input start_date=2026-12-14 --input end_date=2026-12-18 … --wait

Inbound webhook

shell
usertasks webhooks create <workflow id>          # prints the hook slug and secret once
curl -X POST "$USERTASKS_URL/api/webhooks/inbound?hook=<slug>" \
  -H "Authorization: Bearer <webhook secret>" -H "Content-Type: application/json" \
  -d '{"employee_id":"E-1001","leave_type":"annual","start_date":"2026-12-14","end_date":"2026-12-18","days":5,"reason":"Family trip before the holidays"}'

What's included

9 assets, ready to adapt

TypeNameDetails
Email templateLeave approvedSent to the employee when the leave is approved and booked.
Email templateLeave declinedSent to the employee when the manager or HR declines the request.
Data tableLeave typesLeave types and their rules: paid or not, whether a certificate is needed, the notice expected and how many days are approved automatically.
IntegrationHR system
API referenceAdd team calendar entryPOST /team-calendar/entries — Optional: add an "away" entry to the team calendar for the approved dates.
API referenceCreate leave bookingPOST /leave-bookings — Book the approved leave in the HR system so it reduces the balance and shows in payroll.
API referenceGet leave balanceGET /leave-balances/{{employee_id}} — The employee's current balance for one leave type, with their name, email and manager.
Decision tableLeave approval7 rules — Whether a leave request is approved automatically, who approves it and whether HR is involved. First matching rule wins.
WorkflowLeave request25 steps — An employee requests leave; the balance, leave-type rules and approval policy decide whether it is approved automatically or goes to the manager (and HR), then the booking is made in the HR system.

Leave types · 5 sample rows

Leave typePaidCertificate requiredNotice (days)Auto-approve up to (days)Deducts balancePolicy notes

Requirements

What you connect it to

Credentials never travel in a package. The install wizard asks for what your environment must provide, or installs it incomplete until you finish setup.

Needs

  • REST API — A REST API integration: set its base URL and credentials on install.
  • Assignees — People in your workspace to receive the User Tasks (picked on install).
  • Email — Email delivery configured for the instance (EMAIL_PROVIDER), used for notifications.

After installing

  1. HR system integration: set the base URL and API token. The references expect GET /leave-balances/{employee_id}?leave_type=…, POST /leave-bookings and (optional) POST /team-calendar/entries; adjust them to your HR system.
  2. Assignees: pick the default approving manager, the HR partner and the employee contact for change requests. Runs can pass manager_id, hr_owner_id and employee_user_id.
  3. Edit the Leave types rows (notice, automatic limit, certificates) and the Leave approval rules to your leave policy.
  4. Email: configure EMAIL_PROVIDER on the instance so the approved and declined emails are delivered (the steps continue on error).

Asked for on install

  • Integration “HR system”Required

    • Tokenconfig.auth_config.token
    • Base urlconfig.base_urldefault https://hris.example.com/api· optional
  • Workflow “Leave request” assigneesRequired

    • User for step “Approve leave”nodes.12.config.assignee_id
    • User for step “Confirm leave arrangements”nodes.15.config.assignee_id
    • User for step “Change leave request”nodes.16.config.assignee_id

Install

Install it in your workspace

Works on UserTasks cloud and on any self-hosted instance. Installing creates the assets above; nothing runs until you complete setup and start it.

In the app

  1. Download leave-request-1.0.0.utpkg.
  2. Open Automations → Packages and drag the file onto the page (or choose Import package). Browse gallery there lists every gallery package without downloading by hand.
  3. Pick the file. The wizard verifies the checksum, every file hash and the signature, and shows the readme.
  4. Review the changes (what is created) and the data rows.
  5. Fill in the requirements, or tick Keep incomplete and finish later with Complete setup.
  6. Done: the workflow is published and active once setup is complete.

With the CLI

shell
curl -fLO https://usertasks.com/gallery/leave-request-1.0.0.utpkg
usertasks packages inspect leave-request-1.0.0.utpkg       # offline: checksum, hashes, signature
usertasks packages install leave-request-1.0.0.utpkg --dry-run
usertasks packages install leave-request-1.0.0.utpkg       # prompts for each requirement
usertasks packages install leave-request-1.0.0.utpkg --keep-incomplete --yes   # in CI; finish with:
usertasks packages complete leave-request -f values.yaml

Verify the download

File SHA-256
9dcbc1556008d0eed269d2b8fb4e218983b8a3e1cda9fb97c41d18562fe8d6c2
Package checksum (what is signed)
sha256:eeca54539d2dc481be1c6071825e53344ed090d01818bd0736dda469a57da7e3
Signer
Unsigned preview build — compare the SHA-256 above

shasum -a 256 leave-request-1.0.0.utpkg should print the file SHA-256. How gallery packages are signed.

Versions

Version 1.0.0

  1. v1.0.02026-10-26First release.

Installing a newer version upgrades in place: local credentials and requirement values are kept, and changes you made are flagged first. How packages work

More packages

Related

Browse the whole gallery