{
  "name": "Dynamically send out-of-office / vacation message using Gmail & Google Calendar",
  "nodes": [
    {
      "id": "6f15bcff-5358-4f9a-914d-dfd1e87c6e6f",
      "name": "Find Return-to-Office Date",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        860,
        0
      ]
    },
    {
      "id": "f922f416-5c9e-4053-8612-30d0aa5f92b2",
      "name": "Nicely Format Return Date",
      "type": "n8n-nodes-base.code",
      "position": [
        1120,
        0
      ]
    },
    {
      "id": "4585b157-5413-40a6-b661-5836aa1c5717",
      "name": "Send Out of Office Message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1380,
        0
      ]
    },
    {
      "id": "2a758f6b-981b-42e8-8b6d-65c28d67d3af",
      "name": "Receive an Email in Gmail",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        80,
        0
      ]
    },
    {
      "id": "8b0b39a3-2109-4d3f-adb9-016b3aac1712",
      "name": "Check Calendar for Upcoming Work Events",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        360,
        0
      ]
    },
    {
      "id": "747f8201-60ce-401d-83da-ab2d8867dbca",
      "name": "Any Upcoming Events Today?",
      "type": "n8n-nodes-base.if",
      "position": [
        600,
        0
      ]
    },
    {
      "id": "26b69ab5-7004-4c1c-b6bd-8d332ed26a34",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -600,
        -380
      ],
      "parameters": {
        "width": 580,
        "height": 580,
        "content": "## What it Does\nAutomatically checks your Google Calendar to determine if you're officially off work for the rest of today. If so, it auto-sends a personalized out‑of‑office reply via Gmail, telling s"
      }
    },
    {
      "id": "74fbf32d-f2a9-4d14-a810-2be2c89160f8",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        -380
      ],
      "parameters": {
        "width": 760,
        "height": 200,
        "content": "\n## User Setup Instructions\n- Gmail Trigger: Connect your Gmail account and add any desired filters (labels, senders).\n- Google Calendar Nodes: Connect your calendar account and select your “work” cal"
      }
    },
    {
      "id": "32209323-40fd-47a7-9fb0-2d44b19c87ed",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        -160
      ],
      "parameters": {
        "width": null,
        "height": 360,
        "content": "## Gmail Trigger\n- Monitors incoming emails every minute\n- Can be filtered (e.g., labels or VIP senders)"
      }
    },
    {
      "id": "4d571591-139a-41cf-96da-9fb92e27e2a1",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        280,
        -160
      ],
      "parameters": {
        "width": 500,
        "height": 360,
        "content": "## Calendar Check #1\n- Inspects if any events remain today"
      }
    },
    {
      "id": "222fbee1-ea2f-4399-a3ab-7146997d8033",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        -160
      ],
      "parameters": {
        "width": null,
        "height": 360,
        "content": "## Calendar Check #2\n- If no remaining events, scans next 14 days for the next event"
      }
    },
    {
      "id": "aae2c7e1-cc62-45cd-9fcc-46b03b6bdd7f",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1060,
        -160
      ],
      "parameters": {
        "width": null,
        "height": 360,
        "content": "## Function Node\n- Formats the return date as Weekday, Month D, YYYY (e.g., “Thursday, July 24, 2025”)"
      }
    },
    {
      "id": "62c57e58-5f16-48e7-a532-d8b387a8f045",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1320,
        -160
      ],
      "parameters": {
        "width": null,
        "height": 360,
        "content": "## Gmail Send\n- Sends a customized out‑of‑office email, using the formatted date\n- Optionally includes n8n attribution (editable)"
      }
    },
    {
      "id": "90c00754-61da-4326-90a0-ca90e6f6c483",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        220
      ],
      "parameters": {
        "width": 760,
        "height": null,
        "content": "\n## Customization Options\n- Edit the final email content and tone in the Send node\n- Adjust calendar lookahead in Calendar Check #2 (default is 14 days)\n- Add Gmail filters to restrict auto-replies (e"
      }
    }
  ],
  "connections": {
    "Nicely Format Return Date": {
      "main": [
        [
          {
            "node": "Send Out of Office Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive an Email in Gmail": {
      "main": [
        [
          {
            "node": "Check Calendar for Upcoming Work Events",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Any Upcoming Events Today?": {
      "main": [
        [],
        [
          {
            "node": "Find Return-to-Office Date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Return-to-Office Date": {
      "main": [
        [
          {
            "node": "Nicely Format Return Date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Calendar for Upcoming Work Events": {
      "main": [
        [
          {
            "node": "Any Upcoming Events Today?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}