{
  "name": "Automate Everhour time-off sync to Google Calendar with all-day events",
  "nodes": [
    {
      "id": "fe08e8fe-779b-4428-8060-08da88a61118",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1856,
        384
      ]
    },
    {
      "id": "8082b4f8-5ff0-4af3-ac3f-268cdd8bee97",
      "name": "Build Assignment Groups",
      "type": "n8n-nodes-base.code",
      "position": [
        -656,
        576
      ]
    },
    {
      "id": "f210fb86-0d78-4140-adff-0573566b23ac",
      "name": "Build Global Key Set",
      "type": "n8n-nodes-base.code",
      "position": [
        -656,
        768
      ]
    },
    {
      "id": "c76c87dc-876c-46f0-ac7e-a4a15ac3661c",
      "name": "Everhour - Fetch Time Off",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1568,
        384
      ]
    },
    {
      "id": "92a16e7c-bb00-439f-b819-6b7557ff5017",
      "name": "Filter Approved Time-Off",
      "type": "n8n-nodes-base.if",
      "position": [
        -1344,
        384
      ]
    },
    {
      "id": "c20edb41-1400-4f8d-a90e-c61bda0295c7",
      "name": "Build Calendar Payload",
      "type": "n8n-nodes-base.set",
      "position": [
        -896,
        384
      ]
    },
    {
      "id": "5fe3aab5-3136-4619-8857-96e53578adbd",
      "name": "Prepare Time-Off Items",
      "type": "n8n-nodes-base.code",
      "position": [
        -1120,
        384
      ]
    },
    {
      "id": "11e26f03-b016-445a-99b1-72b9e5b8c0c3",
      "name": "Find Existing Event by External Key",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -672,
        96
      ]
    },
    {
      "id": "929dc366-f019-435e-88ed-9d1807ac70da",
      "name": "Attach Found Event ID",
      "type": "n8n-nodes-base.code",
      "position": [
        -448,
        96
      ]
    },
    {
      "id": "b05c97db-3810-4847-8a24-b81a824894ab",
      "name": "Check if Event Exists",
      "type": "n8n-nodes-base.if",
      "position": [
        -224,
        96
      ]
    },
    {
      "id": "1c3a725d-775e-452b-9567-b00f2a3181b2",
      "name": "Update All-Day Event",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        0,
        0
      ]
    },
    {
      "id": "ba91bdf7-b56a-4f61-adc3-ef1a016ebde6",
      "name": "Create All-Day Event",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        0,
        192
      ]
    },
    {
      "id": "2d4aeb2e-742d-499c-9e94-8a8be2c5c9d6",
      "name": "List Assignment Events",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -432,
        576
      ]
    },
    {
      "id": "cca57225-aef9-4426-9d21-816e8a882ab9",
      "name": "Find Obsolete Events (per assignment)",
      "type": "n8n-nodes-base.code",
      "position": [
        -208,
        576
      ]
    },
    {
      "id": "acf5aa87-0784-4633-a127-0cae6a069bf8",
      "name": "Delete Calendar Event",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        16,
        672
      ]
    },
    {
      "id": "6c4c4f1e-7772-41f7-9ef9-22936167b523",
      "name": "List All Everhour Events",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -432,
        768
      ]
    },
    {
      "id": "6651bc72-0b3d-4fe3-99cd-e1ff5a092da0",
      "name": "Find Obsolete Events (global)",
      "type": "n8n-nodes-base.code",
      "position": [
        -208,
        768
      ]
    },
    {
      "id": "ac73d08e-3e0b-416f-8ec9-89b11e4c3a25",
      "name": "Config",
      "type": "n8n-nodes-base.set",
      "position": [
        -1856,
        160
      ]
    },
    {
      "id": "9bde197a-7009-41d3-ac7e-6b86ccdd2863",
      "name": "🗒️ Template Description (Read Me)",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2960,
        160
      ],
      "parameters": {
        "width": 1024,
        "height": 736,
        "content": "## Everhour time-off sync to Google Calendar\n\n### Who’s it for\nTeams using **Everhour** for time tracking and **Google Calendar** for visibility.\n\n### What it does\n- Fetches **approved time-off** from"
      }
    },
    {
      "id": "3dbeed2f-b8db-493e-ac9f-32b393008668",
      "name": "Note: Fetch Everhour",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1632,
        240
      ],
      "parameters": {
        "width": null,
        "height": 336,
        "content": "## **Fetch Everhour**\n\nFetch approved time-off from Everhour using Header Auth (no keys in node)."
      }
    },
    {
      "id": "a595b36f-b23f-4356-85ce-2da5a0758d03",
      "name": "Note: Build Keys",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1168,
        256
      ],
      "parameters": {
        "width": 416,
        "height": 336,
        "content": "## **Build Keys**\n\nGenerate per-day `externalKey` like `everhour:<id>:<date>`."
      }
    },
    {
      "id": "b028f58c-bb85-4894-a274-a099a4ea92ec",
      "name": "Note: Upsert Events",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        -112
      ],
      "parameters": {
        "width": 976,
        "height": 512,
        "content": "## **Upsert Events**\n\nSearch by key → update if found, otherwise create all-day event."
      }
    },
    {
      "id": "921f878d-1014-4018-995c-bac11224961a",
      "name": "Note: Cleanup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -704,
        432
      ],
      "parameters": {
        "width": 960,
        "height": 528,
        "content": "## **Cleanup**\n\nList events and delete those not present in current keys."
      }
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Everhour - Fetch Time Off",
            "type": "main",
            "index": 0
          },
          {
            "node": "Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Global Key Set": {
      "main": [
        [
          {
            "node": "List All Everhour Events",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Attach Found Event ID": {
      "main": [
        [
          {
            "node": "Check if Event Exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Event Exists": {
      "main": [
        [
          {
            "node": "Update All-Day Event",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create All-Day Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Calendar Payload": {
      "main": [
        [
          {
            "node": "Find Existing Event by External Key",
            "type": "main",
            "index": 0
          },
          {
            "node": "Build Assignment Groups",
            "type": "main",
            "index": 0
          },
          {
            "node": "Build Global Key Set",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List Assignment Events": {
      "main": [
        [
          {
            "node": "Find Obsolete Events (per assignment)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Time-Off Items": {
      "main": [
        [
          {
            "node": "Build Calendar Payload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Assignment Groups": {
      "main": [
        [
          {
            "node": "List Assignment Events",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Approved Time-Off": {
      "main": [
        [
          {
            "node": "Prepare Time-Off Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List All Everhour Events": {
      "main": [
        [
          {
            "node": "Find Obsolete Events (global)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Everhour - Fetch Time Off": {
      "main": [
        [
          {
            "node": "Filter Approved Time-Off",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Obsolete Events (global)": {
      "main": [
        [
          {
            "node": "Delete Calendar Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Existing Event by External Key": {
      "main": [
        [
          {
            "node": "Attach Found Event ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Obsolete Events (per assignment)": {
      "main": [
        [
          {
            "node": "Delete Calendar Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}