← Back to library

Turn leave requests into a clean summary your manager approves by email

Avkash Kakdiya's n8n template takes a leave form, has a model write a professional summary of the dates, reason and handover, and emails it to the approver with approve and reject options. Approval sends the employee a confirmation; otherwise an agent finds the next free ten-minute slot to discuss it.

  • OutcomeWhen someone submits a time-off form, the manager gets a tidy email with dates, reason and task coverage, approves or rejects it in one click, and the employee hears back or gets a short meeting booked.
  • SetupUnder an hour
  • LevelIntermediate
  • CreditAvkash Kakdiya
View original
Works with
n8nChatGPT

Published Oct 22, 2026Updated Oct 22, 2026AI dry run on sample input: passed Oct 22, 2026Source verified Oct 23, 2026

When should you use it?

  • Leave requests arrive by chat or email and get lost
  • Managers want the dates, reason and coverage in one place before saying yes
  • You do not have an HR system with built-in approvals

Not for: Companies whose HR system already tracks leave balances and approvals; Medical or legally protected leave, which needs HR handling and privacy controls

What do you need, and what do you get?

You need

  • An n8n instance
  • The n8n form with name, email, dates, reason and tasks in progress
  • OpenAI, Gmail and Google Calendar credentials
  • The approver's email address and calendar

You get

  • An approval email with a formatted summary
  • An approval confirmation to the employee
  • A booked ten-minute discussion when the request is not approved

How does it work, step by step?

  1. Import and connectImport the template and connect OpenAI, Gmail and Google Calendar.
  2. Adjust the formEdit the form fields to match your policy, such as half days or leave type.
  3. Set the approverPut the manager's address in the send-and-wait step and their calendar in the booking agent.
  4. Test both pathsSubmit one single-day and one multi-day request, approve one and reject the other, and read every email.
  5. Keep a recordAdd a step that logs each decision to a sheet or HR file so you have a history.

The prompt

The original prompt by Avkash Kakdiya (itechnotion), word for word, with a link to where it was published. Below it is our adapted version with fill-in blanks, if you want it. Works in n8n and ChatGPT. Values in lime are placeholders.

Original prompt by Avkash Kakdiya (itechnotion)

Word for wordby Avkash Kakdiya (itechnotion)
Role:
You are an HR Operations Assistant.

Input:
You will receive an array of objects containing employee leave request data in the following JSON format:

[
  {
    "Employee Name": "{{ $json['Employee Name'] }}",
    "Email": "{{ $json.Email }}",
    "From": "{{ $json.From }}",
    "To": "{{ $json.To }}",
    "Reason for the Leave": "{{ $json['Reason for the Leave'] }}",
    "What Important tasks were you working on?": "{{ $json['What Important tasks were you working on?'] }}"
  }
]

Rules & Logic:
1. If the "To" field is empty or null, treat the leave as a single-day leave on the "From" date.
2. If the "To" field is present, treat it as a multi-day leave from the "From" date to the "To" date (inclusive).
3. Read all the input data and generate a **professional summary** of the leave request instead of just copying the text.
4. Include in the summary:
   - Employee Name
   - Leave duration (single-day or date range)
   - Reason for leave (summarized in professional wording)
   - Status of ongoing tasks and how they are covered or handed over
5. Keep a **polite and professional tone** suitable for sending to Manager and HR.
6. Do not add any information not present in the input.
7. Output must be valid HTML content only.
8. Allowed HTML tags: <p>, <br>, <strong>, <b>, <em>, <ul>, <ol>, <li>, <span>, <div>
9. Do NOT include <html>, <head>, or <body> tags.
10. Generate exactly **two outputs**:
   - `subject` → a concise email subject line
   - `body` → the full HTML-formatted email content

Output Example:

subject:
Leave Approval Request – {{ $json['Employee Name'] }}

body:
<div>
  <p>
    <strong>Employee:</strong> {{ $json['Employee Name'] }}
  </p>

  <p>
    <strong>Leave Duration:</strong> {% if $json.To == "" %}{{ $json.From }} (single-day leave){% else %}{{ $json.From }} to {{ $json.To }}{% endif %}
  </p>

  <p>
    <strong>Reason for Leave:</strong> A summary of the employee's reason for leave in professional wording.
  </p>

  <p>
    <strong>Task Status & Coverage:</strong> Summarize the important tasks the employee was working on and explain how they will be managed or covered during their absence.
  </p>

  <p>
    Kindly review and approve or reject the leave request.
  </p>
</div>

Exactly as published by Avkash Kakdiya (itechnotion) in Automate employee leave approvals with GPT, Gmail & Calendar integration.

Our adapted version (optional)

Fill in the blanks (optional; the copied prompt uses your values)

Adapted prompt6 variables
Write a leave approval email for {manager_name} from this request. Return a subject line and an HTML body using only p, ul, li and strong tags.
Employee: {employee_name}
Start date: {start_date}
End date (blank means a single day): {end_date}
Reason given: {reason}
Work in progress and who covers it: {handover}

In the body, state the dates (say single day when there is no end date), give the reason in one neutral sentence without health or family detail beyond what is needed, and list each task with who covers it. If coverage is missing for a task, say so plainly. End by asking the manager to approve or decline. Use only the information above.

What can go wrong?

  • People put health details in the reason field; tell staff what to write and keep the summary general.
  • The sample email in the prompt uses a template tag that n8n does not process; it reaches the model as text, so test that single-day requests read correctly.
  • The workflow does not check leave balances or overlapping absences; managers still need to.
  • A rejection books a meeting automatically; let employees know so it does not feel like a summons.

Our take

A practical template for small teams that run leave on email and goodwill. The prompt is tight: it sets a single-day rule when the end date is blank, asks for a professional rewrite rather than a copy, limits the HTML to a few safe tags and says not to add anything the form did not contain. We ran it word for word on two synthetic requests, one single-day medical appointment and one eleven-day family trip with a payroll handover. Both summaries had the right dates, a neutral reason and a clear coverage line, used only the allowed tags and added nothing new. One quirk worth knowing: the example email in the prompt uses an if-tag that n8n does not process, so the model receives it as plain text. It still handled the single-day case correctly, but test yours. We would also keep health details out of the reason field and log every decision somewhere you can find later.

Where the time goes back: Managers stop chasing details over chat and decide from one email, and employees get an answer without having to ask twice.

FAQ

What does the manager see?
An email with the employee's name, the leave dates, a short professional reason and how their work will be covered, plus approve and reject options.
What happens on rejection?
An agent checks the approver's calendar for the first free ten-minute slot on the next business day and emails the time to the employee.
Does it track how much leave is left?
No, it handles the request and decision only; you would need to add a balance lookup.

Source and credit

The original prompt on this page is by Avkash Kakdiya (itechnotion), shown word for word with a link to where it was published. The summary, notes and adapted version are ours.

Original
Automate employee leave approvals with GPT, Gmail & Calendar integration
Creator
Avkash Kakdiya
Published on
n8n workflow templates
Original date
Dec 23, 2025
License
Not openly licensed; the original prompt is shown word for word with credit and a link to the original
Originally for
n8n
AI dry run
Oct 22, 2026: passed. Dry-run tested by our AI test agent on sample input. Noted the non-n8n template tag in pitfalls.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails.
Verified
Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.

Are you the creator? Claim or correct this page.

More in HR & Recruiting

All 16 HR & Recruiting playbooks →

Related playbooks

HR & RecruitingPrompt✓ AI dry run

Set approval rules before AI touches your hiring workflow

Decide, task by task, what AI may only draft, what it may suggest for review, what it may apply on its own and what it must never do, then run every recruiting task through a prompt that respects those limits.

Credit: Ryan Borths

Under an hour
HR & RecruitingWorkflow✓ AI dry run

Run an agency recruitment desk with a relay of agents

Split an agency search into stages, from client intake through sourcing, outreach, shortlists, offers and weekly reporting, give each stage to its own agent with a shared folder per role, let each agent pass the role to the next when its part is done, and keep every candidate and client message as a draft that a recruiter sends.

Credit: Bastiaan Vermeulen

An afternoon+
HR & RecruitingWorkflow✓ AI dry run

Run interviews grounded on the applicant CV

First-round interviews that probe what each candidate claims on their resume, with structured notes for the recruiter.

Credit: u/Salaar_khan_ on r/AiAutomations

An afternoon+
HR & RecruitingPrompt✓ AI dry run

Draft a job description from your notes

Turn responsibilities, skills and team context into a complete, appealing job description.

Credit: OpenAI Academy

Minutes
HR & RecruitingWorkflow✓ AI dry run

Turn a hiring intake call into brief, interview kit and JD

One intake meeting produces three outputs: a sourcing brief in a new Slack channel, an interviewer screening kit, and a revised job description that flags what changed.

Credit: Diane Rocher (@Diane_Rocher)

Under an hour