{
  "connections": {
    "Build Sync Actions": {
      "main": [
        [
          {
            "index": 0,
            "node": "Route Action",
            "type": "main"
          }
        ]
      ]
    },
    "Combine Calendars": {
      "main": [
        [
          {
            "index": 0,
            "node": "Build Sync Actions",
            "type": "main"
          }
        ]
      ]
    },
    "Hourly Reconcile": {
      "main": [
        [
          {
            "index": 0,
            "node": "List Personal Events",
            "type": "main"
          },
          {
            "index": 0,
            "node": "List Work Calendar A Events",
            "type": "main"
          },
          {
            "index": 0,
            "node": "List Work Calendar B Events",
            "type": "main"
          }
        ]
      ]
    },
    "List Personal Events": {
      "main": [
        [
          {
            "index": 0,
            "node": "Mark Personal Events",
            "type": "main"
          }
        ]
      ]
    },
    "List Work Calendar A Events": {
      "main": [
        [
          {
            "index": 0,
            "node": "Mark Work Calendar A Events",
            "type": "main"
          }
        ]
      ]
    },
    "List Work Calendar B Events": {
      "main": [
        [
          {
            "index": 0,
            "node": "Mark Work Calendar B Events",
            "type": "main"
          }
        ]
      ]
    },
    "Mark Personal Events": {
      "main": [
        [
          {
            "index": 0,
            "node": "Combine Calendars",
            "type": "main"
          }
        ]
      ]
    },
    "Mark Work Calendar A Events": {
      "main": [
        [
          {
            "index": 1,
            "node": "Combine Calendars",
            "type": "main"
          }
        ]
      ]
    },
    "Mark Work Calendar B Events": {
      "main": [
        [
          {
            "index": 2,
            "node": "Combine Calendars",
            "type": "main"
          }
        ]
      ]
    },
    "Route Action": {
      "main": [
        [
          {
            "index": 0,
            "node": "Create Work Calendar A Block",
            "type": "main"
          }
        ],
        [
          {
            "index": 0,
            "node": "Update Work Calendar A Block",
            "type": "main"
          }
        ],
        [
          {
            "index": 0,
            "node": "Delete Work Calendar A Block",
            "type": "main"
          }
        ],
        [
          {
            "index": 0,
            "node": "Create Work Calendar B Block",
            "type": "main"
          }
        ],
        [
          {
            "index": 0,
            "node": "Update Work Calendar B Block",
            "type": "main"
          }
        ],
        [
          {
            "index": 0,
            "node": "Delete Work Calendar B Block",
            "type": "main"
          }
        ]
      ]
    }
  },
  "name": "Calendar Sync across Accounts",
  "nodes": [
    {
      "name": "Hourly Reconcile",
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "triggerAtMinute": 13
            }
          ]
        }
      },
      "position": [
        -720,
        0
      ],
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3
    },
    {
      "alwaysOutputData": true,
      "name": "List Personal Events",
      "parameters": {
        "calendar": "public-calendar-placeholder",
        "operation": "getAll",
        "options": {
          "orderBy": "startTime",
          "singleEvents": true,
          "timeMax": "={{ DateTime.now().startOf('day').plus({ days: 15 }).toISO() }}",
          "timeMin": "={{ DateTime.now().startOf('day').toISO() }}"
        },
        "returnAll": true
      },
      "position": [
        -480,
        -240
      ],
      "type": "n8n-nodes-base.googleCalendar",
      "typeVersion": 1
    },
    {
      "alwaysOutputData": true,
      "name": "List Work Calendar A Events",
      "parameters": {
        "calendar": "public-calendar-placeholder",
        "operation": "getAll",
        "options": {},
        "returnAll": true,
        "timeMax": "={{ DateTime.now().startOf('day').plus({ days: 15 }).toISO() }}",
        "timeMin": "={{ DateTime.now().startOf('day').toISO() }}"
      },
      "position": [
        -480,
        0
      ],
      "type": "n8n-nodes-base.googleCalendar",
      "typeVersion": 1.3
    },
    {
      "alwaysOutputData": true,
      "name": "List Work Calendar B Events",
      "parameters": {
        "calendar": "public-calendar-placeholder",
        "operation": "getAll",
        "options": {},
        "returnAll": true,
        "timeMax": "={{ DateTime.now().startOf('day').plus({ days: 15 }).toISO() }}",
        "timeMin": "={{ DateTime.now().startOf('day').toISO() }}"
      },
      "position": [
        -480,
        240
      ],
      "type": "n8n-nodes-base.googleCalendar",
      "typeVersion": 1.3
    },
    {
      "name": "Mark Personal Events",
      "parameters": {
        "jsCode": "return $input.all().filter(item => item.json.id).map(item => ({ json: { ...item.json, _calendarId: 'user@example.invalid' } }));"
      },
      "position": [
        -240,
        -240
      ],
      "type": "n8n-nodes-base.code",
      "typeVersion": 2
    },
    {
      "name": "Mark Work Calendar A Events",
      "parameters": {
        "jsCode": "return $input.all().filter(item => item.json.id).map(item => ({ json: { ...item.json, _calendarId: 'user@example.invalid' } }));"
      },
      "position": [
        -240,
        0
      ],
      "type": "n8n-nodes-base.code",
      "typeVersion": 2
    },
    {
      "name": "Mark Work Calendar B Events",
      "parameters": {
        "jsCode": "return $input.all().filter(item => item.json.id).map(item => ({ json: { ...item.json, _calendarId: 'user@example.invalid' } }));"
      },
      "position": [
        -240,
        240
      ],
      "type": "n8n-nodes-base.code",
      "typeVersion": 2
    },
    {
      "alwaysOutputData": true,
      "name": "Combine Calendars",
      "parameters": {
        "numberInputs": 3
      },
      "position": [
        0,
        0
      ],
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2
    },
    {
      "name": "Build Sync Actions",
      "parameters": {
        "jsCode": "const WORKFLOW_ID = 'Z57OBF7ctGcsLiJc';\nconst SYNC_MARKER = 'n8n-ed-calendar-sync';\nconst MARKER_VERSION = '2';\nconst TIME_ZONE = 'America/Chicago';\nconst WORKDAY_START_HOUR = 7;\nconst WORKDAY_END_HOUR = 19;\nconst MAX_ACTIONS_PER_RUN = 10;\n\nconst CALENDARS = {\n  personal: 'user@example.invalid',\n  \"Work Calendar A\": 'user@example.invalid',\n  \"Work Calendar B\": 'user@example.invalid',\n};\n\nconst CALENDAR_REFS = {\n  [CALENDARS.personal]: '00000000-0000-4000-8000-000000000000',\n  [CALENDARS[\"Work Calendar A\"]]: '00000000-0000-4000-8000-000000000000',\n  [CALENDARS[\"Work Calendar B\"]]: '00000000-0000-4000-8000-000000000000',\n};\n\nconst CALENDAR_IDS_BY_REF = Object.fromEntries(\n  Object.entries(CALENDAR_REFS).map(([calendarId, ref]) => [ref, calendarId]),\n);\n\nconst DESTINATIONS = [\n  {\n    alias: 'Work Calendar A',\n    calendarId: CALENDARS[\"Work Calendar A\"],\n    sourceCalendarIds: [CALENDARS.personal, CALENDARS[\"Work Calendar B\"]],\n  },\n  {\n    alias: 'Work Calendar B',\n    calendarId: CALENDARS[\"Work Calendar B\"],\n    sourceCalendarIds: [CALENDARS.personal, CALENDARS[\"Work Calendar A\"]],\n  },\n];\n\nfunction asDateTime(value, dateOnly = false) {\n  if (!value) return null;\n  if (dateOnly) return DateTime.fromISO(value, { zone: TIME_ZONE }).startOf('day');\n  return DateTime.fromISO(value, { zone: TIME_ZONE });\n}\n\nfunction eventStart(event) {\n  return asDateTime(event.start?.dateTime, false) || asDateTime(event.start?.date, true);\n}\n\nfunction eventEnd(event) {\n  return asDateTime(event.end?.dateTime, false) || asDateTime(event.end?.date, true);\n}\n\nfunction legacySourceBaseKey(event) {\n  const originalStart = event.originalStartTime?.dateTime || event.originalStartTime?.date || event.start?.dateTime || event.start?.date || '';\n  return [event.recurringEventId || event.id, originalStart].filter(Boolean).join('@');\n}\n\nfunction sourceBaseKey(event) {\n  return [event._calendarId, legacySourceBaseKey(event)].filter(Boolean).join(':');\n}\n\nfunction markerPayload(desired) {\n  return {\n    workflowId: WORKFLOW_ID,\n    markerVersion: MARKER_VERSION,\n    sourceCalendarId: desired.sourceCalendarId,\n    sourceEventId: desired.sourceEventId,\n    sourceKey: desired.sourceKey,\n    destinationCalendarId: desired.destinationCalendarId,\n  };\n}\n\nfunction markerFor(desired) {\n  return `<!-- ${SYNC_MARKER} ${JSON.stringify({\n    workflowId: WORKFLOW_ID,\n    markerVersion: MARKER_VERSION,\n    managed: true,\n    sourceCalendarRef: CALENDAR_REFS[desired.sourceCalendarId] || 'unknown',\n    destinationCalendarRef: CALENDAR_REFS[desired.destinationCalendarId] || 'unknown',\n  })} -->`;\n}\n\nfunction isAllDay(event) {\n  return Boolean(event.start?.date || event.end?.date) && !event.start?.dateTime;\n}\n\nfunction parseMarker(event) {\n  const ext = event.extendedProperties?.private || {};\n  if (ext.workflowId === WORKFLOW_ID && ext.sourceKey) {\n    return {\n      workflowId: WORKFLOW_ID,\n      markerVersion: String(ext.markerVersion || '1'),\n      sourceCalendarId: ext.sourceCalendarId || CALENDARS.personal,\n      sourceEventId: ext.sourceEventId || '',\n      sourceKey: ext.sourceKey,\n      destinationCalendarId: ext.destinationCalendarId || event._calendarId || CALENDARS[\"Work Calendar A\"],\n    };\n  }\n\n  const description = event.description || '';\n  const match = description.match(/<!--\\s*n8n-ed-calendar-sync\\s+({.+?})\\s*-->/);\n  if (!match) return null;\n\n  try {\n    const parsed = JSON.parse(match[1]);\n    if (parsed.workflowId !== WORKFLOW_ID) return null;\n    const sourceCalendarId = parsed.sourceCalendarId || CALENDAR_IDS_BY_REF[parsed.sourceCalendarRef] || CALENDARS.personal;\n    const destinationCalendarId = parsed.destinationCalendarId || CALENDAR_IDS_BY_REF[parsed.destinationCalendarRef] || event._calendarId || CALENDARS[\"Work Calendar A\"];\n    return {\n      workflowId: WORKFLOW_ID,\n      markerVersion: String(parsed.markerVersion || '1'),\n      managedOnly: !parsed.sourceKey,\n      sourceCalendarId,\n      sourceEventId: parsed.sourceEventId || '',\n      sourceKey: parsed.sourceKey || '',\n      destinationCalendarId,\n    };\n  } catch {\n    return null;\n  }\n}\n\nfunction isManagedEvent(event) {\n  return Boolean(parseMarker(event));\n}\n\nfunction mappingKey(destinationCalendarId, sourceCalendarId, sourceKey) {\n  return [destinationCalendarId, sourceCalendarId, sourceKey].join('>');\n}\n\nfunction blockSummary(desired) {\n  if (desired.destinationCalendarId !== CALENDARS[\"Work Calendar B\"]) return 'Unavailable';\n  if (desired.sourceCalendarId === CALENDARS[\"Work Calendar A\"]) return 'Unavailable (Work Calendar A)';\n  if (desired.sourceCalendarId === CALENDARS.personal) return 'Unavailable (Personal)';\n  return 'Unavailable';\n}\n\nfunction blockVisibility(desired) {\n  return desired.destinationCalendarId === CALENDARS[\"Work Calendar B\"] ? 'default' : 'private';\n}\n\nfunction buildBody(desired) {\n  return {\n    summary: blockSummary(desired),\n    description: [\n      markerFor(desired),\n      `Source event ID: ${desired.sourceEventId}`,\n      `Source calendar: ${CALENDAR_REFS[desired.sourceCalendarId] || 'unknown'}`,\n    ].join('\\n'),\n    start: {\n      dateTime: desired.start,\n      timeZone: TIME_ZONE,\n    },\n    end: {\n      dateTime: desired.end,\n      timeZone: TIME_ZONE,\n    },\n    visibility: blockVisibility(desired),\n    transparency: 'opaque',\n    reminders: {\n      useDefault: false,\n    },\n    extendedProperties: {\n      private: markerPayload(desired),\n    },\n  };\n}\n\nfunction sameInstant(a, b) {\n  const left = DateTime.fromISO(a, { zone: TIME_ZONE });\n  const right = DateTime.fromISO(b, { zone: TIME_ZONE });\n  return left.isValid && right.isValid && left.toMillis() === right.toMillis();\n}\n\nfunction effectiveTransparency(event) {\n  return event.transparency || 'opaque';\n}\n\nfunction effectiveVisibility(event) {\n  return event.visibility || 'default';\n}\n\nfunction destinationMatches(destination, desired, body) {\n  const start = destination.start?.dateTime;\n  const end = destination.end?.dateTime;\n  const ext = destination.extendedProperties?.private || {};\n  return (\n    destination.summary === body.summary &&\n    destination.description === body.description &&\n    effectiveVisibility(destination) === body.visibility &&\n    effectiveTransparency(destination) === body.transparency &&\n    ext.workflowId === WORKFLOW_ID &&\n    String(ext.markerVersion) === MARKER_VERSION &&\n    ext.sourceCalendarId === desired.sourceCalendarId &&\n    ext.sourceKey === desired.sourceKey &&\n    ext.sourceEventId === desired.sourceEventId &&\n    ext.destinationCalendarId === desired.destinationCalendarId &&\n    start &&\n    end &&\n    sameInstant(start, desired.start) &&\n    sameInstant(end, desired.end)\n  );\n}\n\nfunction desiredSegments(event, destination) {\n  if (isManagedEvent(event)) return [];\n  if (event.status === 'cancelled') return [];\n  if (isAllDay(event)) return [];\n  if (event.transparency === 'transparent') return [];\n  if (!event._calendarId || event._calendarId === destination.calendarId) return [];\n  if (!destination.sourceCalendarIds.includes(event._calendarId)) return [];\n\n  const start = eventStart(event);\n  const end = eventEnd(event);\n  if (!start?.isValid || !end?.isValid || end <= start) return [];\n\n  const segments = [];\n  const baseKey = sourceBaseKey(event);\n  const legacyBaseKey = legacySourceBaseKey(event);\n  let day = start.setZone(TIME_ZONE).startOf('day');\n  const lastDay = end.setZone(TIME_ZONE).minus({ milliseconds: 1 }).startOf('day');\n\n  while (day <= lastDay) {\n    const windowStart = day.plus({ hours: WORKDAY_START_HOUR });\n    const windowEnd = day.plus({ hours: WORKDAY_END_HOUR });\n    const clippedStart = start > windowStart ? start : windowStart;\n    const clippedEnd = end < windowEnd ? end : windowEnd;\n    const isWeekday = day.weekday >= 1 && day.weekday <= 5;\n\n    if (isWeekday && clippedStart < clippedEnd) {\n      const dayKey = day.toISODate();\n      const legacySourceKey = `${legacyBaseKey}#${dayKey}`;\n      segments.push({\n        destinationAlias: destination.alias,\n        destinationCalendarId: destination.calendarId,\n        sourceCalendarId: event._calendarId,\n        sourceKey: `${baseKey}#${dayKey}`,\n        legacySourceKey: event._calendarId === CALENDARS.personal && destination.calendarId === CALENDARS[\"Work Calendar A\"] ? legacySourceKey : null,\n        sourceEventId: event.id,\n        start: clippedStart.toISO(),\n        end: clippedEnd.toISO(),\n      });\n    }\n\n    day = day.plus({ days: 1 });\n  }\n\n  return segments;\n}\n\nconst allEvents = $input.all().map(item => item.json).filter(event => event.id && event._calendarId);\nconst actions = [];\n\nfor (const destination of DESTINATIONS) {\n  const desiredByKey = new Map();\n  for (const event of allEvents) {\n    for (const segment of desiredSegments(event, destination)) {\n      desiredByKey.set(mappingKey(segment.destinationCalendarId, segment.sourceCalendarId, segment.sourceKey), segment);\n    }\n  }\n\n  const destinationByKey = new Map();\n  const duplicateDestinations = [];\n  for (const event of allEvents.filter(candidate => candidate._calendarId === destination.calendarId)) {\n    const marker = parseMarker(event);\n    if (!marker || marker.managedOnly || marker.destinationCalendarId !== destination.calendarId) continue;\n\n    const key = mappingKey(marker.destinationCalendarId, marker.sourceCalendarId, marker.sourceKey);\n    if (destinationByKey.has(key)) {\n      duplicateDestinations.push(event);\n    } else {\n      destinationByKey.set(key, event);\n    }\n  }\n\n  const matchedDestinationIds = new Set();\n\n  for (const [desiredKey, desired] of desiredByKey) {\n    const legacyKey = desired.legacySourceKey\n      ? mappingKey(desired.destinationCalendarId, desired.sourceCalendarId, desired.legacySourceKey)\n      : null;\n    const destinationEvent = destinationByKey.get(desiredKey) || (legacyKey ? destinationByKey.get(legacyKey) : null);\n    const body = buildBody(desired);\n\n    if (!destinationEvent) {\n      actions.push({\n        action: 'create',\n        route: `create:${destination.alias}`,\n        destinationCalendarId: destination.calendarId,\n        sourceKey: desired.sourceKey,\n        body,\n      });\n      continue;\n    }\n\n    matchedDestinationIds.add(destinationEvent.id);\n    if (!destinationMatches(destinationEvent, desired, body)) {\n      actions.push({\n        action: 'update',\n        route: `update:${destination.alias}`,\n        destinationCalendarId: destination.calendarId,\n        sourceKey: desired.sourceKey,\n        destinationEventId: destinationEvent.id,\n        body,\n      });\n    }\n  }\n\n  for (const [sourceKey, destinationEvent] of destinationByKey) {\n    if (!matchedDestinationIds.has(destinationEvent.id)) {\n      actions.push({\n        action: 'delete',\n        route: `delete:${destination.alias}`,\n        destinationCalendarId: destination.calendarId,\n        sourceKey,\n        destinationEventId: destinationEvent.id,\n        reason: 'source event no longer exists or no longer overlaps the work window',\n      });\n    }\n  }\n\n  for (const destinationEvent of duplicateDestinations) {\n    actions.push({\n      action: 'delete',\n      route: `delete:${destination.alias}`,\n      destinationCalendarId: destination.calendarId,\n      sourceKey: parseMarker(destinationEvent)?.sourceKey,\n      destinationEventId: destinationEvent.id,\n      reason: 'duplicate destination event for source mapping',\n    });\n  }\n}\n\nreturn actions.slice(0, MAX_ACTIONS_PER_RUN).map(action => ({ json: action }));\n"
      },
      "position": [
        240,
        0
      ],
      "type": "n8n-nodes-base.code",
      "typeVersion": 2
    },
    {
      "name": "Route Action",
      "parameters": {
        "options": {},
        "rules": {
          "values": [
            {
              "conditions": {
                "combinator": "and",
                "conditions": [
                  {
                    "leftValue": "={{ $json.route }}",
                    "operator": {
                      "name": "filter.operator.equals",
                      "operation": "equals",
                      "type": "string"
                    },
                    "rightValue": "create:Work Calendar A"
                  }
                ],
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                }
              },
              "outputKey": "Create Work Calendar A",
              "renameOutput": true
            },
            {
              "conditions": {
                "combinator": "and",
                "conditions": [
                  {
                    "leftValue": "={{ $json.route }}",
                    "operator": {
                      "name": "filter.operator.equals",
                      "operation": "equals",
                      "type": "string"
                    },
                    "rightValue": "update:Work Calendar A"
                  }
                ],
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                }
              },
              "outputKey": "Update Work Calendar A",
              "renameOutput": true
            },
            {
              "conditions": {
                "combinator": "and",
                "conditions": [
                  {
                    "leftValue": "={{ $json.route }}",
                    "operator": {
                      "name": "filter.operator.equals",
                      "operation": "equals",
                      "type": "string"
                    },
                    "rightValue": "delete:Work Calendar A"
                  }
                ],
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                }
              },
              "outputKey": "Delete Work Calendar A",
              "renameOutput": true
            },
            {
              "conditions": {
                "combinator": "and",
                "conditions": [
                  {
                    "leftValue": "={{ $json.route }}",
                    "operator": {
                      "name": "filter.operator.equals",
                      "operation": "equals",
                      "type": "string"
                    },
                    "rightValue": "create:Work Calendar B"
                  }
                ],
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                }
              },
              "outputKey": "Create Work Calendar B",
              "renameOutput": true
            },
            {
              "conditions": {
                "combinator": "and",
                "conditions": [
                  {
                    "leftValue": "={{ $json.route }}",
                    "operator": {
                      "name": "filter.operator.equals",
                      "operation": "equals",
                      "type": "string"
                    },
                    "rightValue": "update:Work Calendar B"
                  }
                ],
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                }
              },
              "outputKey": "Update Work Calendar B",
              "renameOutput": true
            },
            {
              "conditions": {
                "combinator": "and",
                "conditions": [
                  {
                    "leftValue": "={{ $json.route }}",
                    "operator": {
                      "name": "filter.operator.equals",
                      "operation": "equals",
                      "type": "string"
                    },
                    "rightValue": "delete:Work Calendar B"
                  }
                ],
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                }
              },
              "outputKey": "Delete Work Calendar B",
              "renameOutput": true
            }
          ]
        }
      },
      "position": [
        480,
        0
      ],
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.4
    },
    {
      "name": "Create Work Calendar A Block",
      "parameters": {
        "authentication": "predefinedCredentialType",
        "jsonBody": "={{ $json.body }}",
        "method": "POST",
        "nodeCredentialType": "REDACTED",
        "options": {},
        "sendBody": true,
        "specifyBody": "json",
        "url": "https://example.invalid/redacted"
      },
      "position": [
        736,
        -400
      ],
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3
    },
    {
      "name": "Update Work Calendar A Block",
      "parameters": {
        "authentication": "predefinedCredentialType",
        "jsonBody": "={{ $json.body }}",
        "method": "PATCH",
        "nodeCredentialType": "REDACTED",
        "options": {},
        "sendBody": true,
        "specifyBody": "json",
        "url": "https://example.invalid/redacted"
      },
      "position": [
        736,
        -240
      ],
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3
    },
    {
      "name": "Delete Work Calendar A Block",
      "parameters": {
        "authentication": "predefinedCredentialType",
        "method": "DELETE",
        "nodeCredentialType": "REDACTED",
        "options": {},
        "url": "https://example.invalid/redacted"
      },
      "position": [
        736,
        -80
      ],
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3
    },
    {
      "name": "Create Work Calendar B Block",
      "parameters": {
        "authentication": "predefinedCredentialType",
        "jsonBody": "={{ $json.body }}",
        "method": "POST",
        "nodeCredentialType": "REDACTED",
        "options": {},
        "sendBody": true,
        "specifyBody": "json",
        "url": "https://example.invalid/redacted"
      },
      "position": [
        736,
        96
      ],
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3
    },
    {
      "name": "Update Work Calendar B Block",
      "parameters": {
        "authentication": "predefinedCredentialType",
        "jsonBody": "={{ $json.body }}",
        "method": "PATCH",
        "nodeCredentialType": "REDACTED",
        "options": {},
        "sendBody": true,
        "specifyBody": "json",
        "url": "https://example.invalid/redacted"
      },
      "position": [
        736,
        256
      ],
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3
    },
    {
      "name": "Delete Work Calendar B Block",
      "parameters": {
        "authentication": "predefinedCredentialType",
        "method": "DELETE",
        "nodeCredentialType": "REDACTED",
        "options": {},
        "url": "https://example.invalid/redacted"
      },
      "position": [
        736,
        416
      ],
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3
    }
  ],
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  },
  "tags": [
    {
      "createdAt": "2026-04-06T17:02:21.457Z",
      "name": "managed-as-code",
      "updatedAt": "2026-04-06T17:02:21.457Z"
    },
    {
      "createdAt": "2025-12-09T17:27:40.765Z",
      "name": "Personal",
      "updatedAt": "2025-12-09T17:27:40.765Z"
    }
  ]
}
