{
  "id": "eNSDJ8jr409wC22w",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Calendly Booking & Cancellation Automation Hub",
  "tags": [],
  "nodes": [
    {
      "id": "3bc7cca4-28bb-4ed6-b123-b7ee7236437c",
      "name": "\ud83d\udccb WORKFLOW OVERVIEW",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1216,
        320
      ],
      "parameters": {
        "width": 600,
        "height": 1060,
        "content": "## Calendly Booking & Cancellation Automation\n\n### How it works\n1. Listens for Calendly booking confirmations\n2. Listens for Calendly cancellations\n3. Routes events to appropriate processing\n4. Logs all events to Google Sheets\n5. Sends smart Slack notifications\n\n### Calendly Webhook API Reference\n\n**Base URL:** `https://api.calendly.com`\n\n**Webhook Events:**\n- `invitee.created` - Fired when booking confirmed\n- `invitee.canceled` - Fired when booking cancelled\n\n**Authentication:**\n- OAuth2 (Recommended - API keys deprecated May 2025)\n\n**Webhook Payload Contains:**\n- `event` - Event type (invitee.created/canceled)\n- `payload.email` - Invitee email\n- `payload.name` - Invitee name\n- `payload.scheduled_event` - Event details\n- `payload.reschedule_url` - Reschedule link\n- `payload.cancel_url` - Cancel link\n\n**Docs:** https://developer.calendly.com\n\n\n### Setup Steps\n\n**1. Calendly Configuration:**\n- Go to developer.calendly.com\n- Create OAuth2 application and add credentials in n8n\n\n**2. Google Sheets:**\n- Create spreadsheet with tabs:\n  - `Bookings` (for new events)\n  - `Cancellations` (for cancelled)\n\n**3. Slack:**\n- Create Slack app at api.slack.com\n- Add Bot Token Scopes\n- Install to workspace\n- Add OAuth2 credentials"
      },
      "typeVersion": 1
    },
    {
      "id": "32e6c322-ac8a-4d82-90e7-acf50ce7c6b9",
      "name": "Route Event Type",
      "type": "n8n-nodes-base.switch",
      "notes": "Routes to booking or cancellation processing",
      "position": [
        -320,
        736
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "cond-booking",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.event }}",
                    "rightValue": "invitee.created"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "cond-cancel",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.event }}",
                    "rightValue": "invitee.canceled"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "cond-other",
                    "operator": {
                      "type": "string",
                      "operation": "exists"
                    },
                    "leftValue": "={{ $json.event }}"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "5109fd7a-4c18-4a50-92a2-085007374b4c",
      "name": "Transform Booking Data",
      "type": "n8n-nodes-base.set",
      "notes": "Extracts and formats all booking data with computed fields",
      "position": [
        112,
        496
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a1",
              "name": "event_id",
              "type": "string",
              "value": "={{ $json.payload.uri.split('/').pop() }}"
            },
            {
              "id": "a2",
              "name": "invitee_email",
              "type": "string",
              "value": "={{ $json.payload.email }}"
            },
            {
              "id": "a3",
              "name": "invitee_name",
              "type": "string",
              "value": "={{ $json.payload.name || $json.payload.first_name + ' ' + ($json.payload.last_name || '') }}"
            },
            {
              "id": "a4",
              "name": "first_name",
              "type": "string",
              "value": "={{ $json.payload.first_name || ($json.payload.name ? $json.payload.name.split(' ')[0] : 'Guest') }}"
            },
            {
              "id": "a5",
              "name": "event_name",
              "type": "string",
              "value": "={{ $json.payload.scheduled_event.name }}"
            },
            {
              "id": "a6",
              "name": "event_start_iso",
              "type": "string",
              "value": "={{ $json.payload.scheduled_event.start_time }}"
            },
            {
              "id": "a7",
              "name": "event_end_iso",
              "type": "string",
              "value": "={{ $json.payload.scheduled_event.end_time }}"
            },
            {
              "id": "a8",
              "name": "timezone",
              "type": "string",
              "value": "={{ $json.payload.timezone }}"
            },
            {
              "id": "a9",
              "name": "formatted_date",
              "type": "string",
              "value": "={{ new Date($json.payload.scheduled_event.start_time).toLocaleDateString('en-US', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric', timeZone: $json.payload.timezone }) }}"
            },
            {
              "id": "a10",
              "name": "formatted_time",
              "type": "string",
              "value": "={{ new Date($json.payload.scheduled_event.start_time).toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit', timeZone: $json.payload.timezone }) }}"
            },
            {
              "id": "a11",
              "name": "duration_minutes",
              "type": "number",
              "value": "={{ Math.round((new Date($json.payload.scheduled_event.end_time) - new Date($json.payload.scheduled_event.start_time)) / 60000) }}"
            },
            {
              "id": "a12",
              "name": "meeting_url",
              "type": "string",
              "value": "={{ $json.payload.scheduled_event.location?.join_url || 'In-person / TBD' }}"
            },
            {
              "id": "a13",
              "name": "reschedule_url",
              "type": "string",
              "value": "={{ $json.payload.reschedule_url }}"
            },
            {
              "id": "a14",
              "name": "cancel_url",
              "type": "string",
              "value": "={{ $json.payload.cancel_url }}"
            },
            {
              "id": "a15",
              "name": "location_type",
              "type": "string",
              "value": "={{ $json.payload.scheduled_event.location?.type || 'unknown' }}"
            },
            {
              "id": "a16",
              "name": "guests_count",
              "type": "number",
              "value": "={{ ($json.payload.scheduled_event.event_guests || []).length }}"
            },
            {
              "id": "a17",
              "name": "guests_emails",
              "type": "string",
              "value": "={{ ($json.payload.scheduled_event.event_guests || []).map(g => g.email).join(', ') }}"
            },
            {
              "id": "a18",
              "name": "questions_json",
              "type": "string",
              "value": "={{ JSON.stringify($json.payload.questions_and_answers || []) }}"
            },
            {
              "id": "a19",
              "name": "days_until_event",
              "type": "number",
              "value": "={{ Math.ceil((new Date($json.payload.scheduled_event.start_time) - new Date()) / (1000 * 60 * 60 * 24)) }}"
            },
            {
              "id": "a20",
              "name": "is_same_day",
              "type": "boolean",
              "value": "={{ new Date($json.payload.scheduled_event.start_time).toDateString() === new Date().toDateString() }}"
            },
            {
              "id": "a21",
              "name": "event_type",
              "type": "string",
              "value": "new_booking"
            },
            {
              "id": "a22",
              "name": "processed_at",
              "type": "string",
              "value": "={{ new Date().toISOString() }}"
            },
            {
              "id": "a23",
              "name": "status",
              "type": "string",
              "value": "confirmed"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "5c12340d-bc41-47d7-93e7-b7cbef728600",
      "name": "Check Urgency",
      "type": "n8n-nodes-base.if",
      "notes": "Identifies urgent same-day or next-day bookings",
      "position": [
        336,
        496
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "cond-same-day",
              "operator": {
                "type": "boolean",
                "operation": "equals",
                "rightType": "boolean"
              },
              "leftValue": "={{ $json.is_same_day }}",
              "rightValue": true
            },
            {
              "id": "cond-tomorrow",
              "operator": {
                "type": "number",
                "operation": "lte"
              },
              "leftValue": "={{ $json.days_until_event }}",
              "rightValue": 1
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "43098d6a-4caf-4eb9-8cf8-9ea7ff6dcd3f",
      "name": "Mark as Urgent",
      "type": "n8n-nodes-base.set",
      "notes": "Flags urgent bookings for priority handling",
      "position": [
        560,
        400
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "urgent1",
              "name": "is_urgent",
              "type": "boolean",
              "value": true
            },
            {
              "id": "urgent2",
              "name": "urgency_label",
              "type": "string",
              "value": "\ud83d\udea8 URGENT"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "0f5300e3-cb1f-413d-b20a-a0eb480d31d4",
      "name": "Mark as Normal",
      "type": "n8n-nodes-base.set",
      "notes": "Standard booking flag",
      "position": [
        560,
        592
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "normal1",
              "name": "is_urgent",
              "type": "boolean",
              "value": false
            },
            {
              "id": "normal2",
              "name": "urgency_label",
              "type": "string",
              "value": "\ud83d\udcc5 Scheduled"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "7011053e-7f3a-4682-bd35-62f0caced2f5",
      "name": "Merge Booking Data",
      "type": "n8n-nodes-base.merge",
      "notes": "Combines urgent and normal bookings",
      "position": [
        784,
        496
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "035cd0f1-d0a0-471c-9176-54fcd935ae5d",
      "name": "Slack Booking Notification",
      "type": "n8n-nodes-base.slack",
      "notes": "Sends booking notification to Slack",
      "onError": "continueRegularOutput",
      "position": [
        1232,
        496
      ],
      "parameters": {
        "text": "={{ $json.urgency_label }} *New Booking Confirmed*\n\n*{{ $json.event_name }}*\n\ud83d\udc64 {{ $json.invitee_name }} ({{ $json.invitee_email }})\n\ud83d\udcc5 {{ $json.formatted_date }} at {{ $json.formatted_time }}\n\u23f1\ufe0f {{ $json.duration_minutes }} minutes\n\ud83c\udf0d {{ $json.timezone }}\n\ud83d\udccd {{ $json.location_type }}\n{{ $json.guests_count > 0 ? '\ud83d\udc65 Guests: ' + $json.guests_emails : '' }}\n\n\ud83d\udd17 <{{ $json.meeting_url }}|Join Meeting>\n\ud83d\udd04 <{{ $json.reschedule_url }}|Reschedule> | \u274c <{{ $json.cancel_url }}|Cancel>",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "name",
          "value": "general"
        },
        "otherOptions": {
          "mrkdwn": true,
          "unfurl_links": false,
          "unfurl_media": false
        }
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "c3dc94c2-c658-4460-aa79-3e6b84a356ba",
      "name": "Transform Cancellation Data",
      "type": "n8n-nodes-base.set",
      "notes": "Extracts cancellation details with timing analysis",
      "position": [
        112,
        1040
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "c1",
              "name": "event_id",
              "type": "string",
              "value": "={{ $json.payload.uri.split('/').pop() }}"
            },
            {
              "id": "c2",
              "name": "invitee_email",
              "type": "string",
              "value": "={{ $json.payload.email }}"
            },
            {
              "id": "c3",
              "name": "invitee_name",
              "type": "string",
              "value": "={{ $json.payload.name || 'Unknown' }}"
            },
            {
              "id": "c4",
              "name": "event_name",
              "type": "string",
              "value": "={{ $json.payload.scheduled_event.name }}"
            },
            {
              "id": "c5",
              "name": "original_date",
              "type": "string",
              "value": "={{ new Date($json.payload.scheduled_event.start_time).toLocaleDateString('en-US', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric', timeZone: $json.payload.timezone }) }}"
            },
            {
              "id": "c6",
              "name": "original_time",
              "type": "string",
              "value": "={{ new Date($json.payload.scheduled_event.start_time).toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit', timeZone: $json.payload.timezone }) }}"
            },
            {
              "id": "c7",
              "name": "cancellation_reason",
              "type": "string",
              "value": "={{ $json.payload.cancellation?.reason || 'No reason provided' }}"
            },
            {
              "id": "c8",
              "name": "canceled_by",
              "type": "string",
              "value": "={{ $json.payload.cancellation?.canceled_by || 'invitee' }}"
            },
            {
              "id": "c9",
              "name": "canceler_type",
              "type": "string",
              "value": "={{ $json.payload.cancellation?.canceler_type || 'invitee' }}"
            },
            {
              "id": "c10",
              "name": "was_upcoming",
              "type": "boolean",
              "value": "={{ new Date($json.payload.scheduled_event.start_time) > new Date() }}"
            },
            {
              "id": "c11",
              "name": "hours_before_event",
              "type": "number",
              "value": "={{ Math.round((new Date($json.payload.scheduled_event.start_time) - new Date()) / (1000 * 60 * 60)) }}"
            },
            {
              "id": "c12",
              "name": "is_last_minute",
              "type": "boolean",
              "value": "={{ Math.round((new Date($json.payload.scheduled_event.start_time) - new Date()) / (1000 * 60 * 60)) < 24 && new Date($json.payload.scheduled_event.start_time) > new Date() }}"
            },
            {
              "id": "c13",
              "name": "event_type",
              "type": "string",
              "value": "cancellation"
            },
            {
              "id": "c14",
              "name": "canceled_at",
              "type": "string",
              "value": "={{ new Date().toISOString() }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "5bcbb5a5-7dd0-4530-a262-2606ea4aa7df",
      "name": "Categorize Cancellation",
      "type": "n8n-nodes-base.switch",
      "notes": "Routes based on cancellation timing",
      "position": [
        336,
        1024
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "last-min",
                    "operator": {
                      "type": "boolean",
                      "operation": "equals",
                      "rightType": "boolean"
                    },
                    "leftValue": "={{ $json.is_last_minute }}",
                    "rightValue": true
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "standard",
                    "operator": {
                      "type": "boolean",
                      "operation": "equals",
                      "rightType": "boolean"
                    },
                    "leftValue": "={{ $json.was_upcoming }}",
                    "rightValue": true
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "past",
                    "operator": {
                      "type": "string",
                      "operation": "exists"
                    },
                    "leftValue": "={{ $json.event_id }}"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "ead424cd-5a50-477c-a2db-0f4938e23f37",
      "name": "Label: Last Minute",
      "type": "n8n-nodes-base.set",
      "position": [
        560,
        848
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "lm1",
              "name": "cancel_category",
              "type": "string",
              "value": "last_minute"
            },
            {
              "id": "lm2",
              "name": "cancel_label",
              "type": "string",
              "value": "\ud83d\udea8 LAST MINUTE"
            },
            {
              "id": "lm3",
              "name": "follow_up_priority",
              "type": "string",
              "value": "high"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "f48fd7ce-000e-4471-b643-32285b758878",
      "name": "Label: Standard",
      "type": "n8n-nodes-base.set",
      "position": [
        560,
        1040
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "s1",
              "name": "cancel_category",
              "type": "string",
              "value": "standard"
            },
            {
              "id": "s2",
              "name": "cancel_label",
              "type": "string",
              "value": "\u274c Cancelled"
            },
            {
              "id": "s3",
              "name": "follow_up_priority",
              "type": "string",
              "value": "normal"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "f0d0de5d-338a-43f2-b9af-8a85277a268f",
      "name": "Label: Past Event",
      "type": "n8n-nodes-base.set",
      "position": [
        560,
        1232
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "p1",
              "name": "cancel_category",
              "type": "string",
              "value": "past_event"
            },
            {
              "id": "p2",
              "name": "cancel_label",
              "type": "string",
              "value": "\ud83d\udccb Past Event Cancelled"
            },
            {
              "id": "p3",
              "name": "follow_up_priority",
              "type": "string",
              "value": "low"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "d51ddc2e-907e-4431-a86c-3488ef87b0b1",
      "name": "Merge Cancellation Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        784,
        944
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "00ca0121-c089-4e78-afa9-be3da4ac7d6c",
      "name": "Log to Cancellations Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        1008,
        944
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 272696534,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/18gXcSrZuh-59Uv5N323vwZ3pZivaxeP9tnQ6XJqjRjc/edit#gid=272696534",
          "cachedResultName": "Cancellations"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "18gXcSrZuh-59Uv5N323vwZ3pZivaxeP9tnQ6XJqjRjc",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/18gXcSrZuh-59Uv5N323vwZ3pZivaxeP9tnQ6XJqjRjc/edit?usp=drivesdk",
          "cachedResultName": "n8n Template -Calendly Booking"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "02bbdd96-41a2-4f3f-85c7-2e160b2e967e",
      "name": "Slack Cancellation Alert",
      "type": "n8n-nodes-base.slack",
      "onError": "continueRegularOutput",
      "position": [
        1232,
        944
      ],
      "parameters": {
        "text": "={{ $json.cancel_label }} *Meeting Cancelled*\n\n*{{ $json.event_name }}*\n\ud83d\udc64 {{ $json.invitee_name }} ({{ $json.invitee_email }})\n\ud83d\udcc5 Was scheduled: {{ $json.original_date }} at {{ $json.original_time }}\n\n*Reason:* {{ $json.cancellation_reason }}\n*Cancelled by:* {{ $json.canceled_by }}\n*Notice:* {{ $json.hours_before_event > 0 ? $json.hours_before_event + ' hours before event' : 'After scheduled time' }}\n\n\ud83d\udcca Follow-up priority: {{ $json.follow_up_priority }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "name",
          "value": "general"
        },
        "otherOptions": {
          "mrkdwn": true,
          "unfurl_links": false,
          "unfurl_media": false
        }
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "12bc7c10-80b3-40a4-af71-65bb9c4224da",
      "name": "Calendly Webhook Trigger1",
      "type": "n8n-nodes-base.calendlyTrigger",
      "notes": "Triggers on booking confirmations and cancellations",
      "position": [
        -560,
        752
      ],
      "parameters": {
        "scope": "organization",
        "events": [
          "invitee.created",
          "invitee.canceled"
        ],
        "authentication": "oAuth2"
      },
      "credentials": {
        "calendlyOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ebc60756-ba57-413d-9959-fa4d1b15e35b",
      "name": "Log to Bookings Sheet1",
      "type": "n8n-nodes-base.googleSheets",
      "notes": "Logs booking to tracking spreadsheet",
      "onError": "continueRegularOutput",
      "position": [
        1008,
        496
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "event_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "event_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "invitee_email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "invitee_email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "invitee_name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "invitee_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "first_name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "first_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "event_name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "event_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "event_start_iso",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "event_start_iso",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "event_end_iso",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "event_end_iso",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "timezone",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "timezone",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "formatted_date",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "formatted_date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "formatted_time",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "formatted_time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "duration_minutes",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "duration_minutes",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "meeting_url",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "meeting_url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "reschedule_url",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "reschedule_url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "cancel_url",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "cancel_url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "location_type",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "location_type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "guests_count",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "guests_count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "guests_emails",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "guests_emails",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "questions_json",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "questions_json",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "days_until_event",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "days_until_event",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "is_same_day",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "is_same_day",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "event_type",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "event_type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "processed_at",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "processed_at",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "is_urgent",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "is_urgent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "urgency_label",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "urgency_label",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/18gXcSrZuh-59Uv5N323vwZ3pZivaxeP9tnQ6XJqjRjc/edit#gid=0",
          "cachedResultName": "Bookings"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "18gXcSrZuh-59Uv5N323vwZ3pZivaxeP9tnQ6XJqjRjc",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/18gXcSrZuh-59Uv5N323vwZ3pZivaxeP9tnQ6XJqjRjc/edit?usp=drivesdk",
          "cachedResultName": "n8n Template -Calendly Booking"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "b49bdc6b-0b48-4ad6-bd6d-752be8a01b2b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        32,
        352
      ],
      "parameters": {
        "color": 7,
        "width": 896,
        "height": 400,
        "content": "## Capture the Booked Appointments "
      },
      "typeVersion": 1
    },
    {
      "id": "96f4f70d-172f-4440-9fbb-53b1b4bc27b2",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        32,
        816
      ],
      "parameters": {
        "color": 7,
        "width": 896,
        "height": 576,
        "content": "## Capture the Cancelled Appointments "
      },
      "typeVersion": 1
    },
    {
      "id": "ee981a5f-092f-4f8d-a534-432f55a1a7a9",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        352
      ],
      "parameters": {
        "color": 7,
        "width": 480,
        "height": 400,
        "content": "## Log the Booked Appointments "
      },
      "typeVersion": 1
    },
    {
      "id": "be157663-ee61-4413-b4de-a9c0d23f9eaa",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        816
      ],
      "parameters": {
        "color": 7,
        "width": 480,
        "height": 576,
        "content": "## Log the Cancelled Appointments "
      },
      "typeVersion": 1
    },
    {
      "id": "a3f5d522-bd4e-46dd-af23-c486a5f17e7d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -416,
        608
      ],
      "parameters": {
        "color": 7,
        "width": 320,
        "height": 384,
        "content": "## Detect the Event Type "
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "d67cd095-2aca-4b53-87fc-9a4d54fc539d",
  "connections": {
    "Check Urgency": {
      "main": [
        [
          {
            "node": "Mark as Urgent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Mark as Normal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark as Normal": {
      "main": [
        [
          {
            "node": "Merge Booking Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Mark as Urgent": {
      "main": [
        [
          {
            "node": "Merge Booking Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Label: Standard": {
      "main": [
        [
          {
            "node": "Merge Cancellation Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Route Event Type": {
      "main": [
        [
          {
            "node": "Transform Booking Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Transform Cancellation Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Label: Last Minute": {
      "main": [
        [
          {
            "node": "Merge Cancellation Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Booking Data": {
      "main": [
        [
          {
            "node": "Log to Bookings Sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log to Bookings Sheet1": {
      "main": [
        [
          {
            "node": "Slack Booking Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transform Booking Data": {
      "main": [
        [
          {
            "node": "Check Urgency",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Categorize Cancellation": {
      "main": [
        [
          {
            "node": "Label: Last Minute",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Label: Standard",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Label: Past Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Cancellation Data": {
      "main": [
        [
          {
            "node": "Log to Cancellations Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calendly Webhook Trigger1": {
      "main": [
        [
          {
            "node": "Route Event Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log to Cancellations Sheet": {
      "main": [
        [
          {
            "node": "Slack Cancellation Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transform Cancellation Data": {
      "main": [
        [
          {
            "node": "Categorize Cancellation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}