Knowledge Base

Build Leave Request Approval Workflow

Duration: ~20 min · Level: Beginner · Template: #242 Leave Request + Manager Approval · Deployment: Cloud

Prerequisites: Your First Workflow. Read Approvals Explained for where managers decide requests.

Build an HR leave request workflow from template #242: log the request, send it to a manager for approval, and notify the employee of the outcome.

What this template does

  1. Submit Leave Request — manual trigger (or replace with a form/webhook).
  2. Log Leave Request — creates an HR task with dates and reason.
  3. Manager Approval — routes to [email protected] by default.
  4. Wait → Check → Switch — approved vs rejected branches.
  5. Notification — success or warning message to the employee.

Step 1 — Load the template

  1. Studio → Templates → search Leave Request or category HR.
  2. Load template #242 — Leave Request + Manager Approval.

Step 2 — Provide test payload

Use Dry Run or Manual trigger with fields the template references:

{
  "employeeName": "Jordan Lee",
  "leaveType": "Annual",
  "startDate": "2026-07-20",
  "endDate": "2026-07-24",
  "days": 5,
  "reason": "Family vacation"
}

Step 3 — Set the approver

  1. Open Manager Approval in the Inspector.
  2. Set Approver to the employee's manager email, or {{managerEmail}} from upstream data.
  3. Adjust Expires in hours (default 72) to match your HR policy.

Step 4 — Run the approval cycle

  1. Activate the workflow and start a Manual run with the JSON above.
  2. Open Jobs → Approvals. Approve or reject the leave request.
  3. After the delay/check nodes run, confirm the correct Approved or Rejected notification branch fired.

Step 5 — Production tweaks

  • Replace Manual trigger with Form Input or a webhook from your HR portal.
  • Store manager mapping in Global Variables or a lookup table.
  • Add a calendar sync node (Google/Microsoft) on the approved branch if needed.

What you learned

  • Minimal HR approval flow: task log → approval → branch → notify.
  • Testing business approvals from the Jobs panel.

Related tutorials

Nodlyn Assistant
Ask me anything about Nodlyn
Hi! 👋 I'm the Nodlyn assistant. Ask me about the product, workflow components, connectors, agent runtime, agent capabilities, deployment, and more. If I don't know an answer, I'll point you to our contact form.