Dynamic Out-of-Office Responder using Calendar Availability - n8n Workflow

Use this powerful n8n workflow to dynamically set your Gmail out-of-office message based on real-time Google Calendar availability, ensuring accurate replies only when you're truly unavailable.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Freelancers and consultants who need automated responses aligned with flexible working hours.
Teams using n8n to manage sophisticated, conditional communication.


  • Anyone wanting a dynamic vacation responder that uses real-time calendar data, instead of a static setting.

Overview

This sophisticated n8n workflow solves the common problem of static out-of-office replies. Traditional responders are either always on or require manual updates. This n8n workflow, however, uses the current time and your Google Calendar schedule to make a real-time decision: are you done working for the day?

If the system determines you have no remaining events for the day, it automatically searches the next two weeks for your first upcoming event (your 'return date'). It then crafts a custom Gmail reply, incorporating that specific date. This is an essential n8n templates solution for maintaining professional communication without constant manual oversight. Every part of this n8n node sequence is designed for efficiency and accuracy.

How it Works

This n8n workflow executes a series of conditional checks and data manipulations:


  1. Incoming Email: The process starts with the n8n trigger, specifically the Gmail Trigger node, which constantly monitors for new emails.

  2. Current Availability Check: The n8n node connects to Google Calendar to check if there are any scheduled events remaining for the current day. This determines if the user is currently working.

  3. Conditional Split: An If n8n node analyzes the result. If any event is found, the workflow terminates, as the user is considered busy. If no events are found, the flow proceeds.

  4. Find Return Date: A second Google Calendar n8n node executes, searching up to two weeks ahead to find the very next scheduled event. The start time of this event is treated as the return-to-office date.

  5. Format Date: A Code n8n node processes the technical date/time stamp into a clean, human-readable format (e.g., 'Thursday, July 24, 2025').

  6. Send Reply: The final Gmail n8n node sends the customized out-of-office response back to the original sender, injecting the nicely formatted return date into the email body. This automated process ensures every response is accurate and timely.

Installation Guide

To install and configure this n8n templates solution:


  1. Import: Copy the provided JSON and import it directly into your n8n instance.

  2. Credentials: You will need two sets of credentials:

Gmail OAuth2: Used for the Gmail Trigger and the final Gmail Send n8n node.
Google Calendar OAuth2: Used for both Google Calendar n8n node operations.

  1. Gmail Trigger Setup: Ensure your Gmail Trigger n8n node is connected and configured to poll emails (default is every minute). Add any desired filters (e.g., specific labels or excluding certain senders).

  2. Google Calendar Setup: In both Google Calendar n8n nodes ('Check Calendar for Upcoming Work Events' and 'Find Return-to-Office Date'), select the specific calendar that defines your work schedule.

  3. Activation: Once credentials are set up and calendars selected, activate the n8n workflow.

Node Details

This n8n workflow utilizes several key n8n node types to achieve its dynamic functionality:

Receive an Email in Gmail (Gmail Trigger):
Function: Serves as the primary n8n trigger, initiating the workflow upon receiving a new email.
Key Configuration: Polls for new emails every minute.

Check Calendar for Upcoming Work Events (Google Calendar):
Function: Checks the user's calendar from the present moment until the end of the day to see if any events are remaining.
Key Configuration: operation: getAll, timeMax: ={{ $now.plus(1, 'days') }}.

Any Upcoming Events Today? (If):
Function: Determines if the previous Google Calendar n8n node returned any data, effectively checking if the user is still working.
Key Configuration: Checks if {{ $json.summary }} exists. Only continues if false (no events found).

Find Return-to-Office Date (Google Calendar):
Function: If the user is determined to be 'out of office', this n8n node searches for the next scheduled event within the next two weeks to find the return date.
Key Configuration: operation: getAll, timeMax: ={{ $now.plus({ week: 2 }) }}.

Nicely Format Return Date (Code):
Function: Custom code converts the ISO date format from Google Calendar into a user-friendly date string (e.g., 'Friday, November 15, 2024').
Key Configuration: Uses Intl.DateTimeFormat for localization and detailed formatting.

Send Out of Office Message (Gmail):
Function: Composes and sends the automated reply to the original sender.
Key Configuration: sendTo: ={{ $('Receive an Email in Gmail').item.json.From }}, subject: Out of Office / Vacation Responder, message body uses expression {{ $json.returnDate }}.

Related n8n Workflows

Free

Nodes: 6 Nodes
Updated: December 26 2025
View all
Created by
Rosh Ragel
Rosh Ragel

Featured*