{
  "name": "Detect holiday conflicts & suggest meeting reschedules with Google Calendar and Slack",
  "nodes": [
    {
      "id": "b487208f-33b3-4527-8e18-bb3c2a8746d7",
      "name": "Daily Check",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -752,
        224
      ]
    },
    {
      "id": "a8f9264a-5dba-4801-9c1e-e12a59237b8b",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -528,
        224
      ]
    },
    {
      "id": "6472f288-c7e2-49da-bd32-61b91d9528b3",
      "name": "Merge and Filter Next Week Holidays",
      "type": "n8n-nodes-base.code",
      "position": [
        144,
        224
      ]
    },
    {
      "id": "524535d0-6d38-4da8-a5c9-e775f4ff4e50",
      "name": "Get Next Week Calendar Events",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        -304,
        272
      ]
    },
    {
      "id": "5ed5e1c2-726a-43bd-8f49-ed40f3eac9fa",
      "name": "Detect Holiday Conflicts",
      "type": "n8n-nodes-base.code",
      "position": [
        480,
        224
      ]
    },
    {
      "id": "32c956cf-781f-4548-96a9-9d758a7f22a3",
      "name": "Check If Conflicts Found",
      "type": "n8n-nodes-base.if",
      "position": [
        752,
        224
      ]
    },
    {
      "id": "fd84ad56-55c4-49c4-9e60-368977208c0c",
      "name": "Generate Reschedule Suggestions",
      "type": "n8n-nodes-base.code",
      "position": [
        1072,
        224
      ]
    },
    {
      "id": "4bb37c98-7400-4e4c-9519-4cafa5555067",
      "name": "Format Slack Digest",
      "type": "n8n-nodes-base.code",
      "position": [
        1376,
        224
      ]
    },
    {
      "id": "d01a7818-dc28-4490-ad5b-e5963cd22cbd",
      "name": "Post Slack Digest",
      "type": "n8n-nodes-base.slack",
      "position": [
        1680,
        224
      ]
    },
    {
      "id": "d04fe2ce-a6f3-49d5-a384-39a3a201fa37",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -304,
        80
      ]
    },
    {
      "id": "74320878-4302-440c-99ce-5aefefcb1ca2",
      "name": "Fetch Public Holidays",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -80,
        32
      ]
    },
    {
      "id": "392bf796-1880-4a89-ad6b-7838a7a19351",
      "name": "Note: Daily Check",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -816,
        64
      ],
      "parameters": {
        "width": null,
        "height": 144,
        "content": "**Purpose:** Triggers the workflow once every weekday morning.\n**Key:** Runs at 09:00 server time (adjust in node).\n**Tip:** Change to weekly if you only need Monday runs."
      }
    },
    {
      "id": "0541544f-2e8e-41a7-b899-76de44829cca",
      "name": "Note: Workflow Configuration",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        -208
      ],
      "parameters": {
        "width": 256,
        "height": 208,
        "content": "**Purpose:** Central place to define variables.\n**Fields:** `currentYear`, `nextWeekStart`, `nextWeekEnd`, `countryCodes`, `slackChannel`, `calendarId`.\n**Tip:** Edit country list and calendar/channel"
      }
    },
    {
      "id": "02931af5-a167-422c-ae32-53412ed0f4f4",
      "name": "Note: Merge and Filter Next Week Holidays",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        48
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "**Purpose:** Merges API results and filters to next week only.\n**Output:** `holidays[]` with `date`, `name`, `countryCode`."
      }
    },
    {
      "id": "79ac359f-12a3-43ba-bf75-b987f37f482e",
      "name": "Note: Get Next Week Calendar Events",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -368,
        480
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "**Purpose:** Reads all events in next week’s window from Google Calendar.\n**Config:** Uses `calendarId` and `timeMin/Max` from the Set node.\n**Note:** Re-connect your own Google credential in n8n."
      }
    },
    {
      "id": "165237d2-da5e-408f-bb46-77be9bf4c38c",
      "name": "Note: Detect Holiday Conflicts",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        384,
        48
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "**Purpose:** Compares event dates with holiday dates to find conflicts.\n**Output:** Single item `{ conflicts[], totalConflicts }` so downstream runs once."
      }
    },
    {
      "id": "3b55ac06-aa21-44de-a6e0-37051e02cfa1",
      "name": "Note: Check If Conflicts Found",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        48
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "**Purpose:** Guards the branch; continues only when conflicts exist.\n**Condition:** Array not empty."
      }
    },
    {
      "id": "fc01dc46-773b-4881-b646-2bcf21c7bc1f",
      "name": "Note: Generate Reschedule Suggestions",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        992,
        48
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "**Purpose:** Suggests next business day that is not a holiday/weekend.\n**Logic:** Looks ahead up to 30 days, preserving original start time."
      }
    },
    {
      "id": "cec6277f-583d-4ba9-8063-2e956395bff5",
      "name": "Note: Format Slack Digest",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1296,
        48
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "**Purpose:** Creates a readable Slack message.\n**Includes:** Event, date/time, affected countries, holiday, suggestion."
      }
    },
    {
      "id": "6d766a0d-bea6-4bbb-a824-127b53b9dc45",
      "name": "Note: Post Slack Digest",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        48
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "**Purpose:** Posts the digest to Slack.\n**Config:** Uses `slackChannel` from the Set node.\n**Note:** Re-connect your own Slack OAuth in n8n (left unconfigured)."
      }
    },
    {
      "id": "8461d7cc-e39d-4c86-9c6f-96a7aa55ba4f",
      "name": "Note: Loop Over Items",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -208,
        -160
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "**Purpose:** Iterates through each country code.\n**Flow:** Splits the array to call the holiday API per country, then loops back."
      }
    },
    {
      "id": "f857f854-7ed9-43c1-af05-7e596d8369dc",
      "name": "Note: Fetch Public Holidays",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        96,
        -192
      ],
      "parameters": {
        "width": 288,
        "height": 192,
        "content": "**Purpose:** Calls Nager.Date API for public holidays.\n**URL:** `https://date.nager.at/api/v3/PublicHolidays/{year}/{country}`.\n**Security:** No API key needed. Keep credentials empty."
      }
    },
    {
      "id": "48d8def6-1e2e-4e03-b963-a44f9e2c0de1",
      "name": "Template Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1632,
        -448
      ],
      "parameters": {
        "width": 688,
        "height": 752,
        "content": "## What this template does\nDetects global public-holiday conflicts in **next week’s** meetings and posts a Slack digest with suggested reschedule dates.\n\n## Who it’s for\nRemote and distributed teams t"
      }
    }
  ],
  "connections": {
    "Daily Check": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Merge and Filter Next Week Holidays",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Fetch Public Holidays",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Slack Digest": {
      "main": [
        [
          {
            "node": "Post Slack Digest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Public Holidays": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Next Week Calendar Events",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check If Conflicts Found": {
      "main": [
        [
          {
            "node": "Generate Reschedule Suggestions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Detect Holiday Conflicts": {
      "main": [
        [
          {
            "node": "Check If Conflicts Found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Reschedule Suggestions": {
      "main": [
        [
          {
            "node": "Format Slack Digest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge and Filter Next Week Holidays": {
      "main": [
        [
          {
            "node": "Detect Holiday Conflicts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}