Skip to main content

Automate employee leave approvals with GPT, Gmail & Calendar integration

Workflow preview

Workflow preview
100%
Automate employee leave approvals with GPT, Gmail & Calendar integration preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

How it works This workflow automates the complete employee leave approval process from submission to final resolution. Employees submit leave requests through a form, which are summarized professio...

Best for

  • HR automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.formtrigger, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.gmail, n8n-nodes-base.if, n8n-nodes-base.googlecalendartool, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Avkash Kakdiya.

Original n8n.io source

1.1 Workflow description

Title
Automate employee leave approvals with GPT, Gmail & Calendar integration
Workflow name
Automate employee leave approvals with GPT, Gmail & Calendar integration

How it works

This workflow automates the complete employee leave approval process from submission to final resolution. Employees submit leave requests through a form, which are summarized professionally using AI and sent for approval via email. The workflow waits for the approver’s response and then either sends an approval confirmation or schedules a clarification discussion automatically. All communication is handled consistently with no manual follow-ups required.

Step-by-step

  • Step 1: Capture leave request, generate summary, and request approval

    • On form submission – Captures employee details, leave dates, reason, and task handover information.
    • AI Agent – Generates a professional, manager-ready summary of the leave request.
      • OpenAI Chat Model – Provides the language model used to generate the summary.
      • Structured Output Parser – Extracts the email subject and HTML body from the AI response.
    • Send message and wait for response – Emails the summary to the approver and pauses the workflow until approval or rejection.
    • If – Routes the workflow based on the approval decision.
  • Step 2: Notify employee or schedule discussion automatically

    • Approved path
      • Send a message – Sends an official leave approval email to the employee.
    • Clarification or rejection path
      • Booking Agent – Determines the next business day and finds the first available 10-minute slot.
        • OpenAI – Applies scheduling logic to select the earliest valid slot.
        • Get Events – Fetches existing calendar events to avoid conflicts.
        • Check Availability – Confirms free time within working hours.
        • Output Parser – Extracts the final meeting start time.
      • Send a message1 – Emails the employee with the scheduled discussion details.

Why use this?

  • Eliminate manual approval follow-ups and email back-and-forth
  • Ensure consistent, professional communication for every leave request
  • Automatically handle both approvals and clarification scenarios
  • Reduce manager effort with AI-generated summaries
  • Schedule discussions without manual calendar coordination

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - On form submission

Type / Role
n8n-nodes-base.formTrigger - formTrigger
Config choices
Version 2.3

Block 2 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3

Block 3 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 4 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 5 - Send message and wait for response

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.2

Block 6 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 7 - Send a message

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.2

Block 8 - Check Availability

Type / Role
n8n-nodes-base.googleCalendarTool - googleCalendarTool
Config choices
Version 1.3

Block 9 - Get Events

Type / Role
n8n-nodes-base.googleCalendarTool - googleCalendarTool
Config choices
Version 1.3

Block 10 - OpenAI

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 11 - Booking Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 12 - Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 13 - Send a message1

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.2

Block 14 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Automate employee leave approvals with GPT, Gmail & Calendar integration
Complexity advanced
Nodes 16
Categories HR, AI Chatbot
Author Avkash Kakdiya
Published 23 Dec 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12070/12070.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automate employee leave approvals with GPT, Gmail & Calendar integration do?

How it works This workflow automates the complete employee leave approval process from submission to final resolution. Employees submit leave requests through a form, which are summarized professio...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your HR, AI Chatbot use case.