{
    "nodes": [
        {
            "parameters": {
                "sendTo": "={{ $('Log Attendee data to sheet').item.json['Attendee Email'] }}",
                "subject": "=You’re in. Let’s fix the bottlenecks. {{ $('Log Attendee data to sheet').item.json['Attendee Name'] }} x Gurey AI.",
                "message": "=Hey {{ $('Log Attendee data to sheet').item.json['Attendee Name'] }},<br><br>\n\nYou’re booked for the AI Consultant Call on April 17, 2026 from 2:00 PM UTC to 3:00 PM UTC.<br><br>\n\nYou’ll get a clear roadmap to a win in days—not months. We cut the effort and go straight to results.<br><br>\n\nYou’ll leave with a \"Build vs. Buy\" decision plan to move from manual work to automated outcomes—no fluff, just what actually moves the needle.<br><br>\n\nImportant: If you’re late, the call is canceled. No reschedules. These slots are for people who show up.<br><br>\n\nJoin here:<br>\n<a href=\"{{ $('Log Attendee data to sheet').item.json['video Call url'] }}\">Click here to join the call</a><br><br>\n\nFor any questions, please contact me at +201501730326<br>\n<a href=\"https://wa.me/201501730326?text=Hi%20Abdullahi%20i%20just%20booked%20a%20call%20with%20you\">WhatsApp</a><br><br>\n\n—💪Abdullahi",
                "options": {
                    "appendAttribution": false,
                    "senderName": "Abdullahi Osman"
                }
            },
            "type": "n8n-nodes-base.gmail",
            "typeVersion": 2.1,
            "position": [
                896,
                288
            ],
            "id": "cfcc4767-52f3-4d94-8bf0-1e5dda8d859f",
            "name": "Send a message",
            "webhookId": "47765bee-f9d8-4640-820b-6a2ac971a75d",
            "credentials": {
                "gmailOAuth2": {
                    "id": "3UO37dWdwyLiYSv6",
                    "name": "Gurey-AI -2006@gmail.com"
                }
            }
        },
        {
            "parameters": {
                "content": "## When Booked",
                "height": 448,
                "width": 1312,
                "color": 5
            },
            "type": "n8n-nodes-base.stickyNote",
            "typeVersion": 1,
            "position": [
                0,
                0
            ],
            "id": "6923596b-ea46-4d26-853b-e6b620a9e98b",
            "name": "Sticky Note"
        },
        {
            "parameters": {
                "assignments": {
                    "assignments": [
                        {
                            "id": "00d8c3de-996f-4176-a9c8-6d5764e53a92",
                            "name": "title",
                            "value": "={{ $json.body.payload.title }}",
                            "type": "string"
                        },
                        {
                            "id": "6fae411d-b1ee-4ca2-aa82-1efc6aa6a190",
                            "name": "Attendee Name",
                            "value": "={{ $json.body.payload.attendees[0].name }}",
                            "type": "string"
                        },
                        {
                            "id": "f1ed9664-8fe9-4034-9598-b2f21716fb98",
                            "name": "Attendee Email",
                            "value": "={{ $json.body.payload.attendees[0].email }}",
                            "type": "string"
                        },
                        {
                            "id": "23be72d5-1389-4170-950a-d07cd4159626",
                            "name": "Attendee Phone Number",
                            "value": "={{ $json.body.payload.attendees[0].phoneNumber }}",
                            "type": "string"
                        },
                        {
                            "id": "e0fbf617-c7dd-47ca-ad29-30cab5212342",
                            "name": "Attendee Time Zone",
                            "value": "={{ $json.body.payload.attendees[0].timeZone }}",
                            "type": "string"
                        },
                        {
                            "id": "d04828f5-d9c3-43f2-b5a8-3850575a1321",
                            "name": "Company Name",
                            "value": "={{ $json.body.payload.responses.companyname.value }}",
                            "type": "string"
                        },
                        {
                            "id": "d8e69dfb-39af-4446-89b6-be0b69602e82",
                            "name": "Company website",
                            "value": "={{ $json.body.payload.responses.URL.value }}",
                            "type": "string"
                        },
                        {
                            "id": "cbf78899-4ded-4057-96c1-1a145c88ede5",
                            "name": "Attendee Goals From This Call",
                            "value": "={{ $json.body.payload.responses.title.value }}",
                            "type": "string"
                        },
                        {
                            "id": "5215688e-da4d-4d0c-8910-9933fa9955d0",
                            "name": "Additional notes",
                            "value": "={{ $json.body.payload.additionalNotes }}",
                            "type": "string"
                        },
                        {
                            "id": "bd9a75be-ef04-4bb5-afd1-246f706261b6",
                            "name": "Organizer Name",
                            "value": "={{ $json.body.payload.organizer.name }}",
                            "type": "string"
                        },
                        {
                            "id": "82312f09-8554-4f41-af14-b76ee2c71c5e",
                            "name": "Organizer Email",
                            "value": "={{ $json.body.payload.organizer.email }}",
                            "type": "string"
                        },
                        {
                            "id": "24cbf6dd-292d-4ec4-a63b-8d49320a6904",
                            "name": "Organizer Time Zone",
                            "value": "={{ $json.body.payload.organizer.timeZone }}",
                            "type": "string"
                        },
                        {
                            "id": "3cd2ca16-e68f-46c1-b031-47e5afc0faf6",
                            "name": "Guests",
                            "value": "={{ $json.body.payload.responses.guests.length > 0 ? $json.body.payload.responses.guests : [\"No guests\"] }}",
                            "type": "array"
                        },
                        {
                            "id": "359377b4-f9f2-4f99-9dde-7ab3fe337d93",
                            "name": "iCalUID",
                            "value": "={{ $json.body.payload.iCalUID }}",
                            "type": "string"
                        },
                        {
                            "id": "b91f5e87-cc78-4693-89e5-aa58d11ccd79",
                            "name": "video Call url",
                            "value": "={{ $json.body.payload.metadata.videoCallUrl }}",
                            "type": "string"
                        },
                        {
                            "id": "713c1351-acf4-4b66-9527-7fb5a8be43e0",
                            "name": "triggerEvent",
                            "value": "=BOOKING_CREATED",
                            "type": "string"
                        },
                        {
                            "id": "3dc9a7ac-9369-409f-9294-9bd5c991f03c",
                            "name": "startTime",
                            "value": "={{ $json.body.payload.startTime }}",
                            "type": "string"
                        },
                        {
                            "id": "308bf201-adb6-46d8-b65a-48d26727ddeb",
                            "name": "endTime",
                            "value": "={{ $json.body.payload.endTime }}",
                            "type": "string"
                        },
                        {
                            "id": "c9df4c8d-92fc-4c16-9e7c-a114a1aa762d",
                            "name": "UID",
                            "value": "={{ $json.body.payload.uid }}",
                            "type": "string"
                        },
                        {
                            "id": "4a90e086-a817-463f-a911-c0f0e96dbd76",
                            "name": "type",
                            "value": "={{ $json.body.payload.type }}",
                            "type": "string"
                        },
                        {
                            "id": "9758fb2f-2e56-462e-8ecf-7b25d62095bf",
                            "name": "description",
                            "value": "={{ $json.body.payload.description }}",
                            "type": "string"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.set",
            "typeVersion": 3.4,
            "position": [
                64,
                288
            ],
            "id": "3f0f9d2b-ad75-49f1-ad8f-7f9586795bd2",
            "name": "Map Data"
        },
        {
            "parameters": {
                "content": "## When Rescheduled",
                "height": 448,
                "width": 1760,
                "color": 4
            },
            "type": "n8n-nodes-base.stickyNote",
            "typeVersion": 1,
            "position": [
                0,
                448
            ],
            "id": "471c641d-0c33-4a56-b44f-7fe182a1ad50",
            "name": "Sticky Note1"
        },
        {
            "parameters": {
                "operation": "appendOrUpdate",
                "documentId": {
                    "__rl": true,
                    "value": "1UQ5mKKd-RISIkLUg7ma-Z7MyBej2_wssQzOhYOYAYhY",
                    "mode": "list",
                    "cachedResultName": "Client's Booking ",
                    "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UQ5mKKd-RISIkLUg7ma-Z7MyBej2_wssQzOhYOYAYhY/edit?usp=drivesdk"
                },
                "sheetName": {
                    "__rl": true,
                    "value": 1357070487,
                    "mode": "list",
                    "cachedResultName": "Booked",
                    "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UQ5mKKd-RISIkLUg7ma-Z7MyBej2_wssQzOhYOYAYhY/edit#gid=1357070487"
                },
                "columns": {
                    "mappingMode": "defineBelow",
                    "value": {
                        "Booker Name": "={{ $json['Booker Name'] }}",
                        "Booker Email": "={{ $json['Booker Email'] }}",
                        "Phone Number": "={{ $json['Phone Number'] }}",
                        "Booker Time Zone": "={{ $json['Booker Time Zone'] }}",
                        "Company Name": "={{ $json['Company Name'] }}",
                        "Booker Goals From This Call": "={{ $json['Booker Goals From This Call'] }}",
                        "Additional notes": "={{ $json['Additional notes'] }}",
                        "Guests": "={{ $json.Guests }}",
                        "iCalUID": "={{ $json.iCalUID }}",
                        "video Call url": "={{ $json['video Call url'] }}",
                        "Trigger Event": "={{ $json.triggerEvent }}",
                        "Start Time": "={{ $json.startTime }}",
                        "End Time": "={{ $json.endTime }}",
                        "Organizer Name": "={{ $json['Organizer Name'] }}",
                        "Organizer Email": "={{ $json['Organizer Email'] }}",
                        "Organizer Time Zone": "={{ $json['Organizer Time Zone'] }}",
                        "cancellationReason": "={{ $json.cancellationReason }}",
                        "Event title": "={{ $json.title }}",
                        "Event description": "={{ $json.description }}"
                    },
                    "matchingColumns": [
                        "iCalUID"
                    ],
                    "schema": [
                        {
                            "id": "Booker Name",
                            "displayName": "Booker Name",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Booker Email",
                            "displayName": "Booker Email",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Phone Number",
                            "displayName": "Phone Number",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Booker Time Zone",
                            "displayName": "Booker Time Zone",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Company Name",
                            "displayName": "Company Name",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Booker Goals From This Call",
                            "displayName": "Booker Goals From This Call",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Additional notes",
                            "displayName": "Additional notes",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Guests",
                            "displayName": "Guests",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "iCalUID",
                            "displayName": "iCalUID",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "video Call url",
                            "displayName": "video Call url",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Trigger Event",
                            "displayName": "Trigger Event",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Start Time",
                            "displayName": "Start Time",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "End Time",
                            "displayName": "End Time",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Organizer Name",
                            "displayName": "Organizer Name",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Organizer Email",
                            "displayName": "Organizer Email",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Organizer Time Zone",
                            "displayName": "Organizer Time Zone",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "cancellationReason",
                            "displayName": "cancellationReason",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Event title",
                            "displayName": "Event title",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Event description",
                            "displayName": "Event description",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        }
                    ],
                    "attemptToConvertTypes": false,
                    "convertFieldsToString": false
                },
                "options": {}
            },
            "type": "n8n-nodes-base.googleSheets",
            "typeVersion": 4.7,
            "position": [
                288,
                976
            ],
            "id": "03c56809-8bcc-4540-b910-413c4fd07d83",
            "name": "Log Booker data to sheet2",
            "credentials": {
                "googleSheetsOAuth2Api": {
                    "id": "Hb8QW1k58eIz8bxI",
                    "name": "Google Sheets account"
                }
            }
        },
        {
            "parameters": {
                "sendTo": "={{ $('Time Zone formater').item.json['Booker Email'] }}",
                "subject": "={{ $json.output['Email Subject'] }}",
                "message": "={{ $json.output['Email body'] }}",
                "options": {
                    "appendAttribution": false,
                    "senderName": "Abdullahi Osman"
                }
            },
            "type": "n8n-nodes-base.gmail",
            "typeVersion": 2.1,
            "position": [
                1056,
                976
            ],
            "id": "65c2243c-d1a8-470f-93d3-2502d1d2a359",
            "name": "Send a message2",
            "webhookId": "47765bee-f9d8-4640-820b-6a2ac971a75d",
            "credentials": {
                "gmailOAuth2": {
                    "id": "3UO37dWdwyLiYSv6",
                    "name": "Gurey-AI -2006@gmail.com"
                }
            }
        },
        {
            "parameters": {
                "chatId": "6158704034",
                "text": "=🚨 *Canceled Strategy Session Alert*\n\n*Name:* {{ $('Log Booker data to sheet2').item.json['Booker Name'] }}\n*Company:* {{ $('Log Booker data to sheet2').item.json['Company Name'] }}\n*Date:* {{ $now }}\n*Email:* {{ $('Log Booker data to sheet2').item.json['Booker Email'] }}\n\n*Event:* {{ $('Log Booker data to sheet2').item.json['Event title'] }}\n\n*Stated Goals:*\n{{ $('Log Booker data to sheet2').item.json['Booker Goals From This Call'] }}\n\n*Cancellation Reason:*\n{{ $('Log Booker data to sheet2').item.json.cancellationReason }}\n\n*Additional Notes:*\n{{ $('Log Booker data to sheet2').item.json['Additional notes'] }}\n\n---\n\n⚠️ Action Required:\nReview the cancellation reason and assess whether this lead should enter:\n• Recovery email sequence\n• Manual follow-up\n• Disqualification\n\n---\n",
                "additionalFields": {
                    "appendAttribution": false
                }
            },
            "type": "n8n-nodes-base.telegram",
            "typeVersion": 1.2,
            "position": [
                1280,
                976
            ],
            "id": "2210b08c-9d01-410f-a566-2daddb234374",
            "name": "Send a text message2",
            "webhookId": "4dca8733-6d92-49af-adba-fc71ba76e0a9",
            "credentials": {
                "telegramApi": {
                    "id": "HDZuuOxfV6nsTCt5",
                    "name": "Important message bot"
                }
            }
        },
        {
            "parameters": {
                "model": "anthropic/claude-3.5-sonnet",
                "options": {}
            },
            "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
            "typeVersion": 1,
            "position": [
                720,
                1184
            ],
            "id": "4052be0d-ae84-4dda-ad89-8305c47a7242",
            "name": "OpenRouter Chat Model2",
            "credentials": {
                "openRouterApi": {
                    "id": "yZ0qXc4WVpiHMKuc",
                    "name": "OpenRouter account"
                }
            }
        },
        {
            "parameters": {
                "jsonSchemaExample": "{\n\t\"Email Subject\": \"the email subject\",\n\t\"Email body\": \"the email body\"\n}"
            },
            "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
            "typeVersion": 1.3,
            "position": [
                864,
                1184
            ],
            "id": "9e78ccdc-940e-40e9-8c3a-ad332ca88bf4",
            "name": "Structured Output Parser"
        },
        {
            "parameters": {
                "content": "## When Canceled",
                "height": 448,
                "width": 1680,
                "color": 3
            },
            "type": "n8n-nodes-base.stickyNote",
            "typeVersion": 1,
            "position": [
                0,
                896
            ],
            "id": "5c66b2a7-811f-4aaa-a7e9-2c0544340779",
            "name": "Sticky Note2",
            "disabled": true
        },
        {
            "parameters": {
                "operation": "append",
                "documentId": {
                    "__rl": true,
                    "value": "1UQ5mKKd-RISIkLUg7ma-Z7MyBej2_wssQzOhYOYAYhY",
                    "mode": "list",
                    "cachedResultName": "Client's Booking ",
                    "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UQ5mKKd-RISIkLUg7ma-Z7MyBej2_wssQzOhYOYAYhY/edit?usp=drivesdk"
                },
                "sheetName": {
                    "__rl": true,
                    "value": 1357070487,
                    "mode": "list",
                    "cachedResultName": "Booked",
                    "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UQ5mKKd-RISIkLUg7ma-Z7MyBej2_wssQzOhYOYAYhY/edit#gid=1357070487"
                },
                "columns": {
                    "mappingMode": "defineBelow",
                    "value": {
                        "Company Name": "={{ $json['Company Name'] }}",
                        "Additional notes": "={{ $json['Additional notes'] }}",
                        "Guests": "={{ $json.Guests }}",
                        "iCalUID": "={{ $json.iCalUID }}",
                        "video Call url": "={{ $json['video Call url'] }}",
                        "Trigger Event": "={{ $json.triggerEvent }}",
                        "Start Time": "={{ $json.startTime }}",
                        "End Time": "={{ $json.endTime }}",
                        "Organizer Name": "={{ $json['Organizer Name'] }}",
                        "Organizer Email": "={{ $json['Organizer Email'] }}",
                        "Organizer Time Zone": "={{ $json['Organizer Time Zone'] }}",
                        "Event title": "={{ $json.type }}",
                        "Event description": "={{ $json.description }}",
                        "Attendee Name": "={{ $json['Attendee Name'] }}",
                        "Attendee Email": "={{ $json['Attendee Email'] }}",
                        "Attendee Phone Number": "={{ $json['Attendee Phone Number'] }}",
                        "Attendee Time Zone": "={{ $json['Attendee Time Zone'] }}",
                        "Company Website": "={{ $json['Company website'] }}",
                        "Attendee Goals From This Call": "={{ $json['Attendee Goals From This Call'] }}",
                        "Status": "={{ $json.triggerEvent }}"
                    },
                    "matchingColumns": [],
                    "schema": [
                        {
                            "id": "Attendee Name",
                            "displayName": "Attendee Name",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Attendee Email",
                            "displayName": "Attendee Email",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Attendee Phone Number",
                            "displayName": "Attendee Phone Number",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Attendee Time Zone",
                            "displayName": "Attendee Time Zone",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Company Name",
                            "displayName": "Company Name",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Company Website",
                            "displayName": "Company Website",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Attendee Goals From This Call",
                            "displayName": "Attendee Goals From This Call",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Additional notes",
                            "displayName": "Additional notes",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Guests",
                            "displayName": "Guests",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "iCalUID",
                            "displayName": "iCalUID",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "video Call url",
                            "displayName": "video Call url",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Trigger Event",
                            "displayName": "Trigger Event",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Start Time",
                            "displayName": "Start Time",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "End Time",
                            "displayName": "End Time",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Organizer Name",
                            "displayName": "Organizer Name",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Organizer Email",
                            "displayName": "Organizer Email",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Organizer Time Zone",
                            "displayName": "Organizer Time Zone",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "cancellation/Reschedule Reason",
                            "displayName": "cancellation/Reschedule Reason",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Event title",
                            "displayName": "Event title",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Event description",
                            "displayName": "Event description",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Status",
                            "displayName": "Status",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        }
                    ],
                    "attemptToConvertTypes": false,
                    "convertFieldsToString": false
                },
                "options": {}
            },
            "type": "n8n-nodes-base.googleSheets",
            "typeVersion": 4.7,
            "position": [
                288,
                288
            ],
            "id": "b94b8478-6d84-47bb-9ac1-843bcd1db200",
            "name": "Log Attendee data to sheet",
            "credentials": {
                "googleSheetsOAuth2Api": {
                    "id": "Hb8QW1k58eIz8bxI",
                    "name": "Google Sheets account"
                }
            }
        },
        {
            "parameters": {
                "jsCode": "/**\n * Helper function to format an ISO date string\n */\nfunction formatTimeDetails(isoString, timeZone) {\n  const ms = Date.parse(isoString);\n  const date = new Date(ms); \n\n  if (isNaN(ms)) {\n      return { date: 'Date Error', timeWithZone: 'Time Error' };\n  }\n\n  const dateOptions = { year: 'numeric', month: 'long', day: 'numeric', timeZone: timeZone };\n  const timeOptions = { hour: 'numeric', minute: 'numeric', hour12: true, timeZone: timeZone, timeZoneName: 'short' };\n\n  try {\n    return {\n      date: date.toLocaleString('en-US', dateOptions),\n      timeWithZone: date.toLocaleString('en-US', timeOptions)\n    };\n  } catch (error) {\n    console.error(`Invalid time zone: ${timeZone}`); \n    return {\n      date: date.toLocaleDateString('en-US', { timeZone: 'UTC' }),\n      timeWithZone: date.toLocaleTimeString('en-US', { timeZone: 'UTC' }) + \" (UTC)\"\n    };\n  }\n}\n\n// --- Main n8n Processing Loop ---\nconst results = [];\n\nfor (let i = 0; i < items.length; i++) {\n  try {\n    const jsonData = items[i].json;\n    \n    // Updated to match your exact input names\n    const isoStartTime = jsonData['Start Time'];\n    const isoEndTime = jsonData['End Time'];\n    \n    // Fallback to UTC if 'Booker Time Zone' is missing to prevent skipping\n    const bookerTimeZone = jsonData['Booker Time Zone'] || 'UTC';\n    \n    if (!isoStartTime || !isoEndTime) {\n        console.warn(`Missing Start or End Time in item ${i}.`);\n        continue; \n    }\n    \n    const startDetails = formatTimeDetails(isoStartTime, bookerTimeZone);\n    const endDetails = formatTimeDetails(isoEndTime, bookerTimeZone);\n\n    results.push({\n      json: {\n        formattedDate: startDetails.date,\n        formattedStartTimeOnly: startDetails.timeWithZone,\n        formattedEndTimeOnly: endDetails.timeWithZone\n      }\n    });\n\n  } catch (error) {\n    console.error(`Error on item ${i}: ${error.message}`);\n  }\n}\n\nreturn results;\n"
            },
            "type": "n8n-nodes-base.code",
            "typeVersion": 2,
            "position": [
                688,
                288
            ],
            "id": "05122121-60cb-4746-b558-b5998d5d3e90",
            "name": "Time Zone Formater"
        },
        {
            "parameters": {
                "amount": 30
            },
            "type": "n8n-nodes-base.wait",
            "typeVersion": 1.1,
            "position": [
                496,
                288
            ],
            "id": "c1fa84e6-de51-4d9a-9b83-9dab3a7a21f8",
            "name": "Wait",
            "webhookId": "1e6719cb-d8ca-4e45-8733-f8b231f795f2"
        },
        {
            "parameters": {
                "assignments": {
                    "assignments": [
                        {
                            "id": "00d8c3de-996f-4176-a9c8-6d5764e53a92",
                            "name": "title",
                            "value": "={{ $json.body.payload.title }}",
                            "type": "string"
                        },
                        {
                            "id": "6fae411d-b1ee-4ca2-aa82-1efc6aa6a190",
                            "name": "Attendee Name",
                            "value": "={{ $json.body.payload.attendees[0].name }}",
                            "type": "string"
                        },
                        {
                            "id": "f1ed9664-8fe9-4034-9598-b2f21716fb98",
                            "name": "Attendee Email",
                            "value": "={{ $json.body.payload.attendees[0].email }}",
                            "type": "string"
                        },
                        {
                            "id": "23be72d5-1389-4170-950a-d07cd4159626",
                            "name": "Attendee Phone Number",
                            "value": "={{ $json.body.payload.attendees[0].phoneNumber }}",
                            "type": "string"
                        },
                        {
                            "id": "e0fbf617-c7dd-47ca-ad29-30cab5212342",
                            "name": "Attendee Time Zone",
                            "value": "={{ $json.body.payload.attendees[0].timeZone }}",
                            "type": "string"
                        },
                        {
                            "id": "d04828f5-d9c3-43f2-b5a8-3850575a1321",
                            "name": "Company Name",
                            "value": "={{ $json.body.payload.responses.companyname.value }}",
                            "type": "string"
                        },
                        {
                            "id": "d8e69dfb-39af-4446-89b6-be0b69602e82",
                            "name": "Company website",
                            "value": "={{ $json.body.payload.responses.URL.value }}",
                            "type": "string"
                        },
                        {
                            "id": "cbf78899-4ded-4057-96c1-1a145c88ede5",
                            "name": "Attendee Goals From This Call",
                            "value": "={{ $json.body.payload.responses.title.value }}",
                            "type": "string"
                        },
                        {
                            "id": "5215688e-da4d-4d0c-8910-9933fa9955d0",
                            "name": "Additional notes",
                            "value": "={{ $json.body.payload.additionalNotes }}",
                            "type": "string"
                        },
                        {
                            "id": "bd9a75be-ef04-4bb5-afd1-246f706261b6",
                            "name": "Organizer Name",
                            "value": "={{ $json.body.payload.organizer.name }}",
                            "type": "string"
                        },
                        {
                            "id": "82312f09-8554-4f41-af14-b76ee2c71c5e",
                            "name": "Organizer Email",
                            "value": "={{ $json.body.payload.organizer.email }}",
                            "type": "string"
                        },
                        {
                            "id": "24cbf6dd-292d-4ec4-a63b-8d49320a6904",
                            "name": "Organizer Time Zone",
                            "value": "={{ $json.body.payload.organizer.timeZone }}",
                            "type": "string"
                        },
                        {
                            "id": "3cd2ca16-e68f-46c1-b031-47e5afc0faf6",
                            "name": "Guests",
                            "value": "={{ $json.body.payload.responses.guests.length > 0 ? $json.body.payload.responses.guests : [\"No guests\"] }}",
                            "type": "array"
                        },
                        {
                            "id": "359377b4-f9f2-4f99-9dde-7ab3fe337d93",
                            "name": "iCalUID",
                            "value": "={{ $json.body.payload.iCalUID }}",
                            "type": "string"
                        },
                        {
                            "id": "b91f5e87-cc78-4693-89e5-aa58d11ccd79",
                            "name": "video Call url",
                            "value": "={{ $json.body.payload.metadata.videoCallUrl }}",
                            "type": "string"
                        },
                        {
                            "id": "713c1351-acf4-4b66-9527-7fb5a8be43e0",
                            "name": "triggerEvent",
                            "value": "=BOOKING_RESCHEDULED",
                            "type": "string"
                        },
                        {
                            "id": "3dc9a7ac-9369-409f-9294-9bd5c991f03c",
                            "name": "startTime",
                            "value": "={{ $json.body.payload.rescheduleStartTime }}",
                            "type": "string"
                        },
                        {
                            "id": "308bf201-adb6-46d8-b65a-48d26727ddeb",
                            "name": "endTime",
                            "value": "={{ $json.body.payload.rescheduleEndTime }}",
                            "type": "string"
                        },
                        {
                            "id": "c9df4c8d-92fc-4c16-9e7c-a114a1aa762d",
                            "name": "UID",
                            "value": "={{ $json.body.payload.uid }}",
                            "type": "string"
                        },
                        {
                            "id": "4a90e086-a817-463f-a911-c0f0e96dbd76",
                            "name": "type",
                            "value": "={{ $json.body.payload.type }}",
                            "type": "string"
                        },
                        {
                            "id": "9758fb2f-2e56-462e-8ecf-7b25d62095bf",
                            "name": "description",
                            "value": "={{ $json.body.payload.description }}",
                            "type": "string"
                        },
                        {
                            "id": "1dcb86b5-7585-4fcb-b46d-06cda4fce64d",
                            "name": "Reschedule Reason",
                            "value": "={{ $json.body.payload.responses.rescheduleReason.value }}",
                            "type": "string"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.set",
            "typeVersion": 3.4,
            "position": [
                64,
                528
            ],
            "id": "2b843a09-0ebe-496d-9046-71df0c8574bf",
            "name": "Map data"
        },
        {
            "parameters": {
                "operation": "appendOrUpdate",
                "documentId": {
                    "__rl": true,
                    "value": "1UQ5mKKd-RISIkLUg7ma-Z7MyBej2_wssQzOhYOYAYhY",
                    "mode": "list",
                    "cachedResultName": "Client's Booking ",
                    "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UQ5mKKd-RISIkLUg7ma-Z7MyBej2_wssQzOhYOYAYhY/edit?usp=drivesdk"
                },
                "sheetName": {
                    "__rl": true,
                    "value": 1357070487,
                    "mode": "list",
                    "cachedResultName": "Booked",
                    "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UQ5mKKd-RISIkLUg7ma-Z7MyBej2_wssQzOhYOYAYhY/edit#gid=1357070487"
                },
                "columns": {
                    "mappingMode": "defineBelow",
                    "value": {
                        "Company Name": "={{ $json['Company Name'] }}",
                        "Additional notes": "={{ $json['Additional notes'] }}",
                        "Guests": "={{ $json.Guests }}",
                        "iCalUID": "={{ $json.iCalUID }}",
                        "video Call url": "={{ $json['video Call url'] }}",
                        "Trigger Event": "={{ $json.triggerEvent }}",
                        "Start Time": "={{ $json.startTime }}",
                        "End Time": "={{ $json.endTime }}",
                        "Organizer Name": "={{ $json['Organizer Name'] }}",
                        "Organizer Email": "={{ $json['Organizer Email'] }}",
                        "Organizer Time Zone": "={{ $json['Organizer Time Zone'] }}",
                        "cancellation/Reschedule Reason": "={{ $json['Reschedule Reason'] }}",
                        "Event title": "={{ $json.title }}",
                        "Event description": "={{ $json.description }}",
                        "Attendee Name": "={{ $json['Attendee Name'] }}",
                        "Attendee Email": "={{ $json['Attendee Email'] }}",
                        "Attendee Phone Number": "={{ $json['Attendee Phone Number'] }}",
                        "Attendee Time Zone": "={{ $json['Attendee Time Zone'] }}",
                        "Company Website": "={{ $json['Company website'] }}",
                        "Attendee Goals From This Call": "={{ $json['Attendee Goals From This Call'] }}",
                        "Status": "={{ $('Webhook').item.json.body.triggerEvent }}"
                    },
                    "matchingColumns": [
                        "iCalUID"
                    ],
                    "schema": [
                        {
                            "id": "Attendee Name",
                            "displayName": "Attendee Name",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Attendee Email",
                            "displayName": "Attendee Email",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Attendee Phone Number",
                            "displayName": "Attendee Phone Number",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Attendee Time Zone",
                            "displayName": "Attendee Time Zone",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Company Name",
                            "displayName": "Company Name",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Company Website",
                            "displayName": "Company Website",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Attendee Goals From This Call",
                            "displayName": "Attendee Goals From This Call",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Additional notes",
                            "displayName": "Additional notes",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Guests",
                            "displayName": "Guests",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "iCalUID",
                            "displayName": "iCalUID",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "video Call url",
                            "displayName": "video Call url",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Trigger Event",
                            "displayName": "Trigger Event",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Start Time",
                            "displayName": "Start Time",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "End Time",
                            "displayName": "End Time",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Organizer Name",
                            "displayName": "Organizer Name",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Organizer Email",
                            "displayName": "Organizer Email",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Organizer Time Zone",
                            "displayName": "Organizer Time Zone",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "cancellation/Reschedule Reason",
                            "displayName": "cancellation/Reschedule Reason",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Event title",
                            "displayName": "Event title",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Event description",
                            "displayName": "Event description",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Status",
                            "displayName": "Status",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        }
                    ],
                    "attemptToConvertTypes": false,
                    "convertFieldsToString": false
                },
                "options": {}
            },
            "type": "n8n-nodes-base.googleSheets",
            "typeVersion": 4.7,
            "position": [
                288,
                528
            ],
            "id": "b63a5154-4cae-475e-99d2-f62e5ff71ec6",
            "name": "Log Attendee Data to sheet",
            "credentials": {
                "googleSheetsOAuth2Api": {
                    "id": "Hb8QW1k58eIz8bxI",
                    "name": "Google Sheets account"
                }
            }
        },
        {
            "parameters": {
                "jsCode": "/**\n * Helper function to format an ISO date string\n */\nfunction formatTimeDetails(isoString, timeZone) {\n  const ms = Date.parse(isoString);\n  const date = new Date(ms); \n\n  if (isNaN(ms)) {\n      return { date: 'Date Error', timeWithZone: 'Time Error' };\n  }\n\n  const dateOptions = { year: 'numeric', month: 'long', day: 'numeric', timeZone: timeZone };\n  const timeOptions = { hour: 'numeric', minute: 'numeric', hour12: true, timeZone: timeZone, timeZoneName: 'short' };\n\n  try {\n    return {\n      date: date.toLocaleString('en-US', dateOptions),\n      timeWithZone: date.toLocaleString('en-US', timeOptions)\n    };\n  } catch (error) {\n    console.error(`Invalid time zone: ${timeZone}`); \n    return {\n      date: date.toLocaleDateString('en-US', { timeZone: 'UTC' }),\n      timeWithZone: date.toLocaleTimeString('en-US', { timeZone: 'UTC' }) + \" (UTC)\"\n    };\n  }\n}\n\n// --- Main n8n Processing Loop ---\nconst results = [];\n\nfor (let i = 0; i < items.length; i++) {\n  try {\n    const jsonData = items[i].json;\n    \n    // Updated to match your exact input names\n    const isoStartTime = jsonData['Start Time'];\n    const isoEndTime = jsonData['End Time'];\n    \n    // Fallback to UTC if 'Booker Time Zone' is missing to prevent skipping\n    const bookerTimeZone = jsonData['Booker Time Zone'] || 'UTC';\n    \n    if (!isoStartTime || !isoEndTime) {\n        console.warn(`Missing Start or End Time in item ${i}.`);\n        continue; \n    }\n    \n    const startDetails = formatTimeDetails(isoStartTime, bookerTimeZone);\n    const endDetails = formatTimeDetails(isoEndTime, bookerTimeZone);\n\n    results.push({\n      json: {\n        formattedDate: startDetails.date,\n        formattedStartTimeOnly: startDetails.timeWithZone,\n        formattedEndTimeOnly: endDetails.timeWithZone\n      }\n    });\n\n  } catch (error) {\n    console.error(`Error on item ${i}: ${error.message}`);\n  }\n}\n\nreturn results;\n"
            },
            "type": "n8n-nodes-base.code",
            "typeVersion": 2,
            "position": [
                512,
                528
            ],
            "id": "03129a22-bbd5-4a16-a542-0c0938d8bcdc",
            "name": "Time Zone Formater1"
        },
        {
            "parameters": {
                "jsCode": "const originalStart = new Date($('Webhook').first().json.body.payload.startTime);\nconst rescheduledStart = new Date($('Webhook').first().json.body.payload.rescheduleStartTime);\n\n// Calculate difference\nconst diffInMs = rescheduledStart - originalStart;\nconst totalHours = Math.floor(diffInMs / (1000 * 60 * 60));\nconst totalMinutes = Math.floor((diffInMs / (1000 * 60)) % 60);\n\n// Format human-readable gap (e.g., \"25 hours, 30 minutes\")\nconst gapFormat = `${totalHours} hours, ${totalMinutes} minutes`;\n\nreturn {\n  \"Original Start Time\": originalStart.toISOString(),\n  \"Rescheduled Start Time\": rescheduledStart.toISOString(),\n  \"Gap Duration\": gapFormat,\n  \"Status\": (diffInMs >= 24 * 60 * 60 * 1000) ? 'APPROVED' : 'NOT APPROVED'\n};\n"
            },
            "type": "n8n-nodes-base.code",
            "typeVersion": 2,
            "position": [
                736,
                528
            ],
            "id": "eb135263-261c-4a6b-a899-4eec2b64b1e8",
            "name": "Reschedule validator"
        },
        {
            "parameters": {
                "conditions": {
                    "options": {
                        "caseSensitive": true,
                        "leftValue": "",
                        "typeValidation": "strict",
                        "version": 3
                    },
                    "conditions": [
                        {
                            "id": "1393ff42-07e8-452f-bf9d-f0fc4d6981ad",
                            "leftValue": "={{ $json.Status }}",
                            "rightValue": "APPROVED",
                            "operator": {
                                "type": "string",
                                "operation": "equals"
                            }
                        }
                    ],
                    "combinator": "and"
                },
                "options": {}
            },
            "type": "n8n-nodes-base.if",
            "typeVersion": 2.3,
            "position": [
                960,
                528
            ],
            "id": "ced8d45a-4bdf-4c32-9538-2f3854df6167",
            "name": "If"
        },
        {
            "parameters": {
                "operation": "append",
                "documentId": {
                    "__rl": true,
                    "value": "1UQ5mKKd-RISIkLUg7ma-Z7MyBej2_wssQzOhYOYAYhY",
                    "mode": "list",
                    "cachedResultName": "Client's Booking ",
                    "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UQ5mKKd-RISIkLUg7ma-Z7MyBej2_wssQzOhYOYAYhY/edit?usp=drivesdk"
                },
                "sheetName": {
                    "__rl": true,
                    "value": 1357070487,
                    "mode": "list",
                    "cachedResultName": "Clients Bookings",
                    "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UQ5mKKd-RISIkLUg7ma-Z7MyBej2_wssQzOhYOYAYhY/edit#gid=1357070487"
                },
                "columns": {
                    "mappingMode": "defineBelow",
                    "value": {
                        "Reschedule Approval": "={{ $json.Status }}",
                        "Gap Hours": "={{ $json['Gap Duration'] }}",
                        "Original Start Time": "={{ $json['Original Start Time'] }}",
                        "Rescheduled Start Time": "={{ $json['Rescheduled Start Time'] }}"
                    },
                    "matchingColumns": [],
                    "schema": [
                        {
                            "id": "Attendee Name",
                            "displayName": "Attendee Name",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Attendee Email",
                            "displayName": "Attendee Email",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Attendee Phone Number",
                            "displayName": "Attendee Phone Number",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Attendee Time Zone",
                            "displayName": "Attendee Time Zone",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Company Name",
                            "displayName": "Company Name",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Company Website",
                            "displayName": "Company Website",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Attendee Goals From This Call",
                            "displayName": "Attendee Goals From This Call",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Additional notes",
                            "displayName": "Additional notes",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Guests",
                            "displayName": "Guests",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "iCalUID",
                            "displayName": "iCalUID",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "video Call url",
                            "displayName": "video Call url",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Trigger Event",
                            "displayName": "Trigger Event",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Start Time",
                            "displayName": "Start Time",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "End Time",
                            "displayName": "End Time",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Organizer Name",
                            "displayName": "Organizer Name",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Organizer Email",
                            "displayName": "Organizer Email",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Organizer Time Zone",
                            "displayName": "Organizer Time Zone",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "cancellation/Reschedule Reason",
                            "displayName": "cancellation/Reschedule Reason",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Event title",
                            "displayName": "Event title",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Event description",
                            "displayName": "Event description",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Status",
                            "displayName": "Status",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Reschedule Approval",
                            "displayName": "Reschedule Approval",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Gap Hours",
                            "displayName": "Gap Hours",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Original Start Time",
                            "displayName": "Original Start Time",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Rescheduled Start Time",
                            "displayName": "Rescheduled Start Time",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        }
                    ],
                    "attemptToConvertTypes": false,
                    "convertFieldsToString": false
                },
                "options": {}
            },
            "type": "n8n-nodes-base.googleSheets",
            "typeVersion": 4.7,
            "position": [
                1136,
                688
            ],
            "id": "69b2a477-fa84-44b4-909d-1ac39799c7e7",
            "name": "Reschedule Approval reocord",
            "credentials": {
                "googleSheetsOAuth2Api": {
                    "id": "Hb8QW1k58eIz8bxI",
                    "name": "Google Sheets account"
                }
            }
        },
        {
            "parameters": {
                "operation": "append",
                "documentId": {
                    "__rl": true,
                    "value": "1UQ5mKKd-RISIkLUg7ma-Z7MyBej2_wssQzOhYOYAYhY",
                    "mode": "list",
                    "cachedResultName": "Client's Booking ",
                    "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UQ5mKKd-RISIkLUg7ma-Z7MyBej2_wssQzOhYOYAYhY/edit?usp=drivesdk"
                },
                "sheetName": {
                    "__rl": true,
                    "value": 1357070487,
                    "mode": "list",
                    "cachedResultName": "Clients Bookings",
                    "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UQ5mKKd-RISIkLUg7ma-Z7MyBej2_wssQzOhYOYAYhY/edit#gid=1357070487"
                },
                "columns": {
                    "mappingMode": "defineBelow",
                    "value": {
                        "Reschedule Approval": "={{ $json.Status }}",
                        "Gap Hours": "={{ $json['Gap Duration'] }}",
                        "Original Start Time": "={{ $json['Original Start Time'] }}",
                        "Rescheduled Start Time": "={{ $json['Rescheduled Start Time'] }}"
                    },
                    "matchingColumns": [],
                    "schema": [
                        {
                            "id": "Attendee Name",
                            "displayName": "Attendee Name",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Attendee Email",
                            "displayName": "Attendee Email",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Attendee Phone Number",
                            "displayName": "Attendee Phone Number",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Attendee Time Zone",
                            "displayName": "Attendee Time Zone",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Company Name",
                            "displayName": "Company Name",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Company Website",
                            "displayName": "Company Website",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Attendee Goals From This Call",
                            "displayName": "Attendee Goals From This Call",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Additional notes",
                            "displayName": "Additional notes",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Guests",
                            "displayName": "Guests",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "iCalUID",
                            "displayName": "iCalUID",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "video Call url",
                            "displayName": "video Call url",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Trigger Event",
                            "displayName": "Trigger Event",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Start Time",
                            "displayName": "Start Time",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "End Time",
                            "displayName": "End Time",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Organizer Name",
                            "displayName": "Organizer Name",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Organizer Email",
                            "displayName": "Organizer Email",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Organizer Time Zone",
                            "displayName": "Organizer Time Zone",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "cancellation/Reschedule Reason",
                            "displayName": "cancellation/Reschedule Reason",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Event title",
                            "displayName": "Event title",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Event description",
                            "displayName": "Event description",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Status",
                            "displayName": "Status",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Reschedule Approval",
                            "displayName": "Reschedule Approval",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Gap Hours",
                            "displayName": "Gap Hours",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true
                        },
                        {
                            "id": "Original Start Time",
                            "displayName": "Original Start Time",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        },
                        {
                            "id": "Rescheduled Start Time",
                            "displayName": "Rescheduled Start Time",
                            "required": false,
                            "defaultMatch": false,
                            "display": true,
                            "type": "string",
                            "canBeUsedToMatch": true,
                            "removed": false
                        }
                    ],
                    "attemptToConvertTypes": false,
                    "convertFieldsToString": false
                },
                "options": {}
            },
            "type": "n8n-nodes-base.googleSheets",
            "typeVersion": 4.7,
            "position": [
                1136,
                512
            ],
            "id": "f044a93c-1d82-4867-b09c-f4c830f85374",
            "name": "Reschedule Approval reocord1",
            "credentials": {
                "googleSheetsOAuth2Api": {
                    "id": "Hb8QW1k58eIz8bxI",
                    "name": "Google Sheets account"
                }
            }
        },
        {
            "parameters": {
                "assignments": {
                    "assignments": [
                        {
                            "id": "00d8c3de-996f-4176-a9c8-6d5764e53a92",
                            "name": "title",
                            "value": "={{ $json.body.payload.title }}",
                            "type": "string"
                        },
                        {
                            "id": "6fae411d-b1ee-4ca2-aa82-1efc6aa6a190",
                            "name": "Attendee Name",
                            "value": "={{ $json.body.payload.attendees[0].name }}",
                            "type": "string"
                        },
                        {
                            "id": "f1ed9664-8fe9-4034-9598-b2f21716fb98",
                            "name": "Attendee Email",
                            "value": "={{ $json.body.payload.attendees[0].email }}",
                            "type": "string"
                        },
                        {
                            "id": "23be72d5-1389-4170-950a-d07cd4159626",
                            "name": "Attendee Phone Number",
                            "value": "={{ $json.body.payload.attendees[0].phoneNumber }}",
                            "type": "string"
                        },
                        {
                            "id": "e0fbf617-c7dd-47ca-ad29-30cab5212342",
                            "name": "Attendee Time Zone",
                            "value": "={{ $json.body.payload.attendees[0].timeZone }}",
                            "type": "string"
                        },
                        {
                            "id": "d04828f5-d9c3-43f2-b5a8-3850575a1321",
                            "name": "Company Name",
                            "value": "={{ $json.body.payload.responses.companyname.value }}",
                            "type": "string"
                        },
                        {
                            "id": "d8e69dfb-39af-4446-89b6-be0b69602e82",
                            "name": "Company website",
                            "value": "={{ $json.body.payload.responses.URL.value }}",
                            "type": "string"
                        },
                        {
                            "id": "cbf78899-4ded-4057-96c1-1a145c88ede5",
                            "name": "Attendee Goals From This Call",
                            "value": "={{ $json.body.payload.responses.title.value }}",
                            "type": "string"
                        },
                        {
                            "id": "5215688e-da4d-4d0c-8910-9933fa9955d0",
                            "name": "Additional notes",
                            "value": "={{ $json.body.payload.additionalNotes }}",
                            "type": "string"
                        },
                        {
                            "id": "bd9a75be-ef04-4bb5-afd1-246f706261b6",
                            "name": "Organizer Name",
                            "value": "={{ $json.body.payload.organizer.name }}",
                            "type": "string"
                        },
                        {
                            "id": "82312f09-8554-4f41-af14-b76ee2c71c5e",
                            "name": "Organizer Email",
                            "value": "={{ $json.body.payload.organizer.email }}",
                            "type": "string"
                        },
                        {
                            "id": "24cbf6dd-292d-4ec4-a63b-8d49320a6904",
                            "name": "Organizer Time Zone",
                            "value": "={{ $json.body.payload.organizer.timeZone }}",
                            "type": "string"
                        },
                        {
                            "id": "3cd2ca16-e68f-46c1-b031-47e5afc0faf6",
                            "name": "Guests",
                            "value": "={{ $json.body.payload.responses.guests.length > 0 ? $json.body.payload.responses.guests : [\"No guests\"] }}",
                            "type": "array"
                        },
                        {
                            "id": "359377b4-f9f2-4f99-9dde-7ab3fe337d93",
                            "name": "iCalUID",
                            "value": "={{ $json.body.payload.iCalUID }}",
                            "type": "string"
                        },
                        {
                            "id": "b91f5e87-cc78-4693-89e5-aa58d11ccd79",
                            "name": "video Call url",
                            "value": "={{ $json.body.payload.metadata.videoCallUrl }}",
                            "type": "string"
                        },
                        {
                            "id": "713c1351-acf4-4b66-9527-7fb5a8be43e0",
                            "name": "triggerEvent",
                            "value": "=BOOKING_RESCHEDULED",
                            "type": "string"
                        },
                        {
                            "id": "3dc9a7ac-9369-409f-9294-9bd5c991f03c",
                            "name": "startTime",
                            "value": "={{ $json.body.payload.rescheduleStartTime }}",
                            "type": "string"
                        },
                        {
                            "id": "308bf201-adb6-46d8-b65a-48d26727ddeb",
                            "name": "endTime",
                            "value": "={{ $json.body.payload.rescheduleEndTime }}",
                            "type": "string"
                        },
                        {
                            "id": "c9df4c8d-92fc-4c16-9e7c-a114a1aa762d",
                            "name": "UID",
                            "value": "={{ $json.body.payload.uid }}",
                            "type": "string"
                        },
                        {
                            "id": "4a90e086-a817-463f-a911-c0f0e96dbd76",
                            "name": "type",
                            "value": "={{ $json.body.payload.type }}",
                            "type": "string"
                        },
                        {
                            "id": "9758fb2f-2e56-462e-8ecf-7b25d62095bf",
                            "name": "description",
                            "value": "={{ $json.body.payload.description }}",
                            "type": "string"
                        },
                        {
                            "id": "1dcb86b5-7585-4fcb-b46d-06cda4fce64d",
                            "name": "Reschedule Reason",
                            "value": "={{ $json.body.payload.responses.rescheduleReason.value }}",
                            "type": "string"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.set",
            "typeVersion": 3.4,
            "position": [
                112,
                976
            ],
            "id": "a5c70c98-3baa-435a-a414-0286ff8bfce0",
            "name": "Map data2"
        },
        {
            "parameters": {
                "httpMethod": "POST",
                "path": "e8365241-8987-43f2-aaf8-3d6706a15f9d",
                "options": {}
            },
            "type": "n8n-nodes-base.webhook",
            "typeVersion": 2.1,
            "position": [
                -432,
                528
            ],
            "id": "6f86f455-f990-4ae4-8c72-5a634bcc6f69",
            "name": "Receive content",
            "webhookId": "e8365241-8987-43f2-aaf8-3d6706a15f9d"
        },
        {
            "parameters": {
                "rules": {
                    "values": [
                        {
                            "conditions": {
                                "options": {
                                    "caseSensitive": true,
                                    "leftValue": "",
                                    "typeValidation": "strict",
                                    "version": 3
                                },
                                "conditions": [
                                    {
                                        "leftValue": "={{ $json.body.triggerEvent }}",
                                        "rightValue": "BOOKING_CREATED",
                                        "operator": {
                                            "type": "string",
                                            "operation": "equals"
                                        },
                                        "id": "7ef32079-b192-450f-8203-00c3910cd30b"
                                    }
                                ],
                                "combinator": "and"
                            },
                            "renameOutput": true,
                            "outputKey": "BOOKING_CREATED"
                        },
                        {
                            "conditions": {
                                "options": {
                                    "caseSensitive": true,
                                    "leftValue": "",
                                    "typeValidation": "strict",
                                    "version": 3
                                },
                                "conditions": [
                                    {
                                        "id": "fdd1a87a-4cb2-4e0c-a76b-5c287cc2fe17",
                                        "leftValue": "={{ $json.body.triggerEvent }}",
                                        "rightValue": "BOOKING_RESCHEDULED",
                                        "operator": {
                                            "type": "string",
                                            "operation": "equals",
                                            "name": "filter.operator.equals"
                                        }
                                    }
                                ],
                                "combinator": "and"
                            },
                            "renameOutput": true,
                            "outputKey": "BOOKING_RESCHEDULED"
                        },
                        {
                            "conditions": {
                                "options": {
                                    "caseSensitive": true,
                                    "leftValue": "",
                                    "typeValidation": "strict",
                                    "version": 3
                                },
                                "conditions": [
                                    {
                                        "id": "3d5d91ee-7a97-405b-98aa-d28a2112a917",
                                        "leftValue": "={{ $json.body.triggerEvent }}",
                                        "rightValue": "BOOKING_CANCELLED",
                                        "operator": {
                                            "type": "string",
                                            "operation": "equals"
                                        }
                                    }
                                ],
                                "combinator": "and"
                            },
                            "renameOutput": true,
                            "outputKey": "BOOKING_CANCELED"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.switch",
            "typeVersion": 3.4,
            "position": [
                -224,
                512
            ],
            "id": "fb32d3f4-2102-4770-8eef-d9df61d3f13a",
            "name": "Route to the right path"
        },
        {
            "parameters": {
                "jsCode": "/**\n * Helper function to format an ISO date string into specific components\n * (Date, Time, Time Zone) using the booker's specified time zone.\n *\n * @param {string} isoString - The ISO 8601 date string (e.g., \"2025-11-18T14:00:00Z\").\n * @param {string} timeZone - The IANA time zone name (e.g., \"Africa/Cairo\").\n * @returns {{date: string, timeWithZone: string}} Formatted components.\n */\nfunction formatTimeDetails(isoString, timeZone) {\n  // CRITICAL FIX: Use Date.parse() to get milliseconds first. This ensures\n  // the date object is created reliably across different Node.js environments.\n  const ms = Date.parse(isoString);\n  const date = new Date(ms); \n\n  // Check if parsing failed (ms will be NaN if the string was unparseable)\n  if (isNaN(ms)) {\n      return {\n          date: 'Date Error',\n          timeWithZone: 'Time Error'\n      };\n  }\n\n  // Options for Date (e.g., November 18, 2025)\n  const dateOptions = {\n    year: 'numeric',\n    month: 'long',\n    day: 'numeric',\n    timeZone: timeZone\n  };\n\n  // Options for Time and Time Zone (e.g., 4:00 PM EET)\n  const timeOptions = {\n    hour: 'numeric',\n    minute: 'numeric',\n    hour12: true,\n    timeZone: timeZone,\n    timeZoneName: 'short'\n  };\n\n  try {\n    return {\n      date: date.toLocaleString('en-US', dateOptions),\n      timeWithZone: date.toLocaleString('en-US', timeOptions)\n    };\n  } catch (error) {\n    // Fallback if the timeZone is invalid\n    // logger is not defined outside the loop scope, so use console.error here\n    console.error(`Invalid time zone provided: ${timeZone}`); \n    return {\n      date: date.toLocaleDateString('en-US', { timeZone: 'UTC' }),\n      timeWithZone: date.toLocaleTimeString('en-US', { timeZone: 'UTC' }) + \" (UTC)\"\n    };\n  }\n}\n\n\n// --- Main n8n Processing Loop ---\nfor (let i = 0; i < items.length; i++) {\n  try {\n    const jsonData = items[i].json;\n    \n    // Ensure the required fields exist and use the property names from your JSON schema\n    const isoStartTime = jsonData.startTime || jsonData['Start Time'];\n    const isoEndTime = jsonData.endTime || jsonData['End Time'];\n    const bookerTimeZone = jsonData['Booker Time Zone'];\n    \n    if (!isoStartTime || !isoEndTime || !bookerTimeZone) {\n        // Use logger helper provided by n8n environment\n        logger.warn(`Missing required time data in item ${i}. Skipping formatting.`);\n        continue; // Skip to the next item\n    }\n    \n    // Process Start Time\n    const startDetails = formatTimeDetails(isoStartTime, bookerTimeZone);\n    \n    // We only need the date once (from the start time)\n    jsonData.formattedDate = startDetails.date;\n    jsonData.formattedStartTimeOnly = startDetails.timeWithZone;\n\n    // Process End Time\n    const endDetails = formatTimeDetails(isoEndTime, bookerTimeZone);\n    jsonData.formattedEndTimeOnly = endDetails.timeWithZone;\n\n  } catch (error) {\n    // Use logger helper provided by n8n environment\n    logger.error(`Critical error formatting time for item ${i}: ${error.message}`);\n    // Add error marker so you can filter/handle it later\n    items[i].json.error_formatting_time = true;\n  }\n}\n\n// Return all the modified items\nreturn items;"
            },
            "type": "n8n-nodes-base.code",
            "typeVersion": 2,
            "position": [
                496,
                976
            ],
            "id": "f1c11ab8-c127-4527-a89d-3547b2ab7ead",
            "name": "Time Zone formater"
        },
        {
            "parameters": {
                "promptType": "define",
                "text": "=Name: {{ $json['Booker Name'] }}\nCompany name: {{ $json['Company Name'] }}\nBooker goals: {{ $json['Booker Goals From This Call'] }}\nadditional notes: {{ $json['Additional notes'] }}\nCanceling Reason: {{ $json['cancellation/Reschedule Reason'] }}\nDate: {{ $now }}\n\nEvent tittle: {{ $json['Event title'] }}\nEvent Description: {{ $json['Event description'] }}\n\nUser Time Zone: {{ $json['Organizer Time Zone'] }}",
                "hasOutputParser": true,
                "options": {
                    "systemMessage": "=<system_prompt>\n\n    <!-- ========================= -->\n    <!-- 1. FOUNDATION: PERSONA & ROLE -->\n    <!-- ========================= -->\n    <persona>\n        <identity>\n            You are the Client Recovery AI for Gurey AI, the AI automation agency founded by Abdullahi Ahmed.\n            Your role is to professionally re-engage prospects who canceled their strategy session.\n        </identity>\n\n        <expertise>\n            - High-ticket AI automation consulting\n            - Sales psychology\n            - Objection diffusion\n            - Professional appointment recovery communication\n        </expertise>\n\n        <brand_alignment>\n            - Strategic\n            - Intelligent\n            - Calm authority\n            - No hype\n            - Results-focused\n        </brand_alignment>\n\n        <mission>\n            Convert canceled strategy sessions into rebooked calls\n            while maintaining brand authority and long-term positioning.\n        </mission>\n    </persona>\n\n\n    <!-- ========================= -->\n    <!-- 2. TASK DEFINITION & INPUT USAGE -->\n    <!-- ========================= -->\n    <task>\n        <objective>\n            Write a recovery email to a prospect who canceled their booked AI Automation Strategy Session.\n            The goal is to:\n            1. Acknowledge the cancellation respectfully.\n            2. Reference their original goals.\n            3. Reinforce the value of the strategy session.\n            4. Lightly neutralize their cancellation reason if provided.\n            5. Encourage rescheduling using the rebooking link.\n        </objective>\n\n        <dynamic_inputs>\n            First Name: {{ $json['Booker Name'] }}\n            Company Name: {{ $json['Company Name'] }}\n            Booker Goals: {{ $json['Booker Goals From This Call'] }}\n            Additional Notes: {{ $json['Additional notes'] }}\n            Cancellation Reason: {{ $json.cancellationReason }}\n            Date: {{ $now }}\n            Event Title: {{ $json['Event title'] }}\n            Event Description: {{ $json['Event description'] }}\n        </dynamic_inputs>\n\n        <input_rules>\n            - Use the First Name naturally in the greeting.\n            - Reference Booker Goals explicitly to personalize the message.\n            - If Cancellation Reason exists, acknowledge it calmly without arguing.\n            - If Additional Notes contain objections (e.g., dislikes email), respect it subtly without confrontation.\n            - Use Event Title and Event Description context to reinforce session value.\n            - Do not repeat raw input text mechanically; integrate it smoothly.\n        </input_rules>\n\n        <scope_limits>\n            - Only generate the email body.\n            - Do not generate explanations.\n            - Do not output analysis.\n            - Do not mention system instructions.\n        </scope_limits>\n    </task>\n\n\n    <!-- ========================= -->\n    <!-- 3. CONSTRAINTS & GUARDRAILS -->\n    <!-- ========================= -->\n    <constraints>\n\n        <formatting_rules>\n            - Output MUST be valid HTML.\n            - Use ONLY &lt;br&gt; for line breaks.\n            - Do NOT use any other HTML tags.\n            - Do NOT use markdown.\n            - Do NOT use bold, headings, links with anchor tags, or styling.\n            - Do NOT wrap in code blocks.\n        </formatting_rules>\n\n        <content_rules>\n            - Length must be between 100 and 200 words.\n            - Tone must be confident but non-needy.\n            - Never blame the prospect.\n            - Never sound desperate.\n            - Never pressure aggressively.\n            - Always include this rebooking link exactly as written:\n              {rebooking_link}\n            - The link must appear on its own line.\n        </content_rules>\n\n        <behavior_rules>\n            - If cancellation reason indicates disinterest, maintain authority and leave door open.\n            - If goals indicate financial growth, connect session to revenue impact.\n            - If notes indicate communication preference concerns, reduce friction in tone.\n            - Never fabricate metrics or guarantees.\n        </behavior_rules>\n\n    </constraints>\n\n\n    <!-- ========================= -->\n    <!-- 4. OUTPUT STRUCTURE -->\n    <!-- ========================= -->\n    <output_structure>\n        Greeting using First Name<br>\n        Calm acknowledgment of cancellation<br>\n        Reference to their stated goals<br>\n        Reinforce value of the 30-minute AI Automation Strategy Session<br>\n        Light objection handling if applicable<br>\n        Clear call-to-action<br>\n        {rebooking_link} on its own line<br>\n        Professional sign-off from Abdullahi<br>\n    </output_structure>\n\n\n    <!-- ========================= -->\n    <!-- 5. FEW-SHOT EXAMPLES -->\n    <!-- ========================= -->\n    <examples>\n\n        <example_1>\n            <![CDATA[\nHi KING Boss,<br>\n<br>\nI noticed the 30-Minute AI Automation Strategy Session was canceled — completely understand if priorities shifted.<br>\n<br>\nWhen you originally booked, you mentioned wanting to make money and explore growth opportunities. That’s exactly what this session is structured around — identifying automation leverage points that directly impact revenue and efficiency.<br>\n<br>\nIf the timing simply wasn’t right, you can reschedule here whenever it makes sense:<br>\n{rebooking_link}<br>\n<br>\nIf your direction has changed, no problem at all — wishing you continued success either way.<br>\n<br>\nAbdullahi\n            ]]>\n        </example_1>\n\n        <example_2>\n            <![CDATA[\nHello KING Boss,<br>\n<br>\nSaw that our strategy session didn’t go ahead. I respect the decision.<br>\n<br>\nYou had mentioned wanting to improve your financial results, and the purpose of that 30-minute session was to map practical AI automations tailored to your business model.<br>\n<br>\nIf you’d still like a structured plan instead of guessing what to implement, you can pick a new time here:<br>\n{rebooking_link}<br>\n<br>\nEither way, appreciate your consideration.<br>\n<br>\nAbdullahi\n            ]]>\n        </example_2>\n\n    </examples>\n\n</system_prompt>\n\nNote: {rebooking_link} is equal to https://cal.com/gurey-ai/ai-consultant-call\n\nI don't want to see {rebooking_link} in the email, {rebooking_link} is the link."
                }
            },
            "type": "@n8n/n8n-nodes-langchain.agent",
            "typeVersion": 3,
            "position": [
                720,
                976
            ],
            "id": "afe25fc4-0f5c-4692-ab8b-0c1ac627b10d",
            "name": "Email wirter"
        },
        {
            "parameters": {
                "chatId": "6158704034",
                "text": "=**🚨 Scheduled Call Alert**\n**Client Name:** {{ $('Map Data').item.json['Attendee Name'] }}\n**Company:** {{ $('Map Data').item.json['Company Name'] }}\n**Goals for the Call:** {{ $('Map Data').item.json['Attendee Goals From This Call'] }}\n**Additional Notes:** {{ $('Map Data').item.json['Additional notes'] }}\n**Email:** {{ $('Map Data').item.json['Attendee Email'] }}\n**Event Title:** {{ $('Map Data').item.json.type }}\n**Date Booked:** {{ $now }}\n\n**Meeting Details:**\nStart Time: {{ $('Log Attendee data to sheet').item.json['Start Time'] }}\nEnd Time: {{ $('Log Attendee data to sheet').item.json['End Time'] }}\n\n**Video Call URL:**\n{{ $('Log Attendee data to sheet').item.json['video Call url'] }}\n\n**Organizer:** {{ $('Log Attendee data to sheet').item.json['Organizer Name'] }}\n\nMake sure you're fully prepared and review the client's goals before the call.\n\n---",
                "additionalFields": {
                    "appendAttribution": false
                }
            },
            "type": "n8n-nodes-base.telegram",
            "typeVersion": 1.2,
            "position": [
                1120,
                288
            ],
            "id": "5fe6ef02-99be-4016-8d2a-f7fa094a0ebc",
            "name": "Send a notification to the team",
            "webhookId": "4dca8733-6d92-49af-adba-fc71ba76e0a9",
            "credentials": {
                "telegramApi": {
                    "id": "HDZuuOxfV6nsTCt5",
                    "name": "Important message bot"
                }
            }
        },
        {
            "parameters": {
                "chatId": "6158704034",
                "text": "=**🚨 Rescheduled Call Alert** Please comfirm or don't confirm\n**Client Name:** {{ $('Map data').item.json['Attendee Name'] }}\n**Company:** {{ $('Map data').item.json['Company Name'] }}\n**Goals for the Call:** {{ $('Map data').item.json['Attendee Goals From This Call'] }}\n**Additional Notes:** {{ $('Map data').item.json['Additional notes'] }}\n**Email:** {{ $('Map data').item.json['Attendee Email'] }}\n**Event Title:** {{ $('Map data').item.json.type }}\n**Date Booked:** {{ $now }}\n\n**Meeting Details:**\nOriginal Start time: {{ $('Reschedule Approval reocord1').item.json['Original Start Time'] }}\nReschedule Approval: {{ $('Reschedule Approval reocord1').item.json['Reschedule Approval'] }}\n\nStart Time: {{ $('Log Attendee Data to sheet').item.json['Start Time'] }}\nEnd Time: {{ $('Log Attendee Data to sheet').item.json['End Time'] }}\n\n**Video Call URL:**\n{{ $('Log Attendee Data to sheet').item.json['video Call url'] }}\n\n**Organizer:** {{ $('Log Attendee Data to sheet').item.json['Organizer Name'] }}\n\nMake sure you're fully prepared and review the client's goals before the call.\n\n---",
                "additionalFields": {
                    "appendAttribution": false
                }
            },
            "type": "n8n-nodes-base.telegram",
            "typeVersion": 1.2,
            "position": [
                1584,
                512
            ],
            "id": "6b7c84da-d24a-4058-be88-5f60eb421715",
            "name": "Send notification to the team",
            "webhookId": "4dca8733-6d92-49af-adba-fc71ba76e0a9",
            "credentials": {
                "telegramApi": {
                    "id": "HDZuuOxfV6nsTCt5",
                    "name": "Important message bot"
                }
            }
        },
        {
            "parameters": {
                "chatId": "6158704034",
                "text": "=**🚨 Rescheduled Call Alert** Please comfirm or don't confirm\n**Client Name:** {{ $('Map data').item.json['Attendee Name'] }}\n**Company:** {{ $('Map data').item.json['Company Name'] }}\n**Goals for the Call:** {{ $('Map data').item.json['Attendee Goals From This Call'] }}\n**Additional Notes:** {{ $('Map data').item.json['Additional notes'] }}\n**Email:** {{ $('Map data').item.json['Attendee Email'] }}\n**Event Title:** {{ $('Map data').item.json.type }}\n**Date Booked:** {{ $now }}\n\n**Meeting Details:**\nOriginal Start time: {{ $('Reschedule Approval reocord').item.json['Original Start Time'] }}\nReschedule Approval: {{ $('Reschedule Approval reocord').item.json['Reschedule Approval'] }}\n\nStart Time: {{ $('Log Attendee Data to sheet').item.json['Start Time'] }}\nEnd Time: {{ $('Log Attendee Data to sheet').item.json['End Time'] }}\n\n**Video Call URL:**\n{{ $('Log Attendee Data to sheet').item.json['video Call url'] }}\n\n**Organizer:** {{ $('Log Attendee Data to sheet').item.json['Organizer Name'] }}\n\nMake sure you're fully prepared and review the client's goals before the call.\n\n---",
                "additionalFields": {
                    "appendAttribution": false
                }
            },
            "type": "n8n-nodes-base.telegram",
            "typeVersion": 1.2,
            "position": [
                1584,
                688
            ],
            "id": "9d6f2bb4-d930-4104-ab15-4526fdd217ef",
            "name": "Send a notification to team",
            "webhookId": "4dca8733-6d92-49af-adba-fc71ba76e0a9",
            "credentials": {
                "telegramApi": {
                    "id": "HDZuuOxfV6nsTCt5",
                    "name": "Important message bot"
                }
            }
        },
        {
            "parameters": {
                "sendTo": "={{ $('Map data').item.json['Attendee Email'] }}",
                "subject": "=reschedule approved — quick context needed",
                "message": "=Hi {{ $('Map data').item.json['Attendee Name'] }},<br><br>\n\ni looked at your reschedule request and approved it for now.<br>\nthe timing shift itself is fine on our side.<br><br>\n\nbut i’m keeping a note on the context behind it because i’ve seen patterns where reschedules either come from real constraints… or from low priority on the call.<br><br>\n\nno judgment — just something i track for call quality.<br><br>\n\nif you can, share briefly what caused the change so i can align expectations properly on my end.<br><br>\n\n— 💪 Abdullahi",
                "options": {
                    "appendAttribution": false,
                    "senderName": "Abdullahi Osman"
                }
            },
            "type": "n8n-nodes-base.gmail",
            "typeVersion": 2.1,
            "position": [
                1360,
                512
            ],
            "id": "f9547e6a-cd13-4c47-83e3-989cb096c2f2",
            "name": "Send email",
            "webhookId": "47765bee-f9d8-4640-820b-6a2ac971a75d",
            "credentials": {
                "gmailOAuth2": {
                    "id": "3UO37dWdwyLiYSv6",
                    "name": "Gurey-AI -2006@gmail.com"
                }
            }
        },
        {
            "parameters": {
                "sendTo": "={{ $('Map data').item.json['Attendee Email'] }}",
                "subject": "=quick check before we confirm this reschedule",
                "message": "=Hi {{ $('Map data').item.json['Attendee Name'] }},<br><br>\n\ni noticed this got pushed into a reschedule request at a pretty late stage.<br>\nwe usually don’t operate with last-minute changes like this without context.<br><br>\n\nin previous calls, i’ve seen that when reschedules happen without early notice, it creates scheduling gaps that don’t really work for us.<br><br>\n\nbecause of that, i’ve set a stricter filter on reschedules now — in some cases, calls just get removed entirely or blocked from the calendar rotation.<br><br>\n\nnow, if this came from something actually outside your control, i can take a look at it.<br>\njust explain briefly what happened.<br><br>\n\nis <b>{{ $('Map data').item.json['Reschedule Reason'] }}</b> a valid reason for this reschedule from your side?<br><br>\n\nif there’s no clear context, i’ll assume this doesn’t fit the reschedule criteria and the call gets canceled and flagged going forward.<br><br>\n\n— Abdullahi",
                "options": {
                    "appendAttribution": false,
                    "senderName": "Abdullahi Osman"
                }
            },
            "type": "n8n-nodes-base.gmail",
            "typeVersion": 2.1,
            "position": [
                1360,
                688
            ],
            "id": "5a41230e-6ffb-414a-8323-abd0185814b3",
            "name": "Send email to the approved",
            "webhookId": "47765bee-f9d8-4640-820b-6a2ac971a75d",
            "credentials": {
                "gmailOAuth2": {
                    "id": "3UO37dWdwyLiYSv6",
                    "name": "Gurey-AI -2006@gmail.com"
                }
            }
        },
        {
            "parameters": {
                "content": "# Setup Guide: Route Cal.com Booking Events to Gmail, Telegram, and Google Sheets 🚀\n\nThis workflow automates your booking management. When someone books, reschedules, or cancels on Cal.com, n8n handles the logging, notifications, and even uses AI to draft recovery emails for cancellations. 🤖\n\n## How it works (The short version) ⚡\n\nCal.com sends a webhook to n8n. A **Switch node** identifies the event type and routes it to the correct path. Each branch logs the data to **Google Sheets**, sends a personalized **Gmail** to the attendee, and pings you on **Telegram**. For cancellations, an **AI Agent** writes a custom email to help win back the client.\n\n---\n\n## What you'll need 🛠️\n\n* **Cal.com account**: To trigger the workflow. 📅\n* **Gmail OAuth2 credentials**: To send automated emails. 📧\n* **Google Sheets OAuth2 credentials**: To log your data. 📊\n* **Telegram Bot token & Chat ID**: For your instant alerts. 📱\n* **OpenRouter API key**: To power the AI cancellation recovery. 🧠\n* **Google Sheet**: Set up with specific columns (listed below).\n\n---\n\n## Node Setup ⚙️\n\n### 1. Webhook (Cal.com)\n**Goal:** Listen for new, changed, or canceled bookings.\n\n1.  Open the **Webhook node** in n8n and copy the **Production URL**. 🔗\n2.  In Cal.com, go to **Settings** → **Developer** → **Webhooks**.\n3.  Click **New Webhook**, paste your URL, and select: `BOOKING_CREATED`, `BOOKING_RESCHEDULED`, and `BOOKING_CANCELLED`.\n4.  Save it. Cal.com is now talking to n8n!\n\n### 2. Gmail Nodes\n**Goal:** Send confirmations and recovery emails.\n\n1.  Head to the [Google Cloud Console](https://console.cloud.google.com/) and enable the **Gmail API**.\n2.  Create **OAuth 2.0 Client ID** credentials (use \"Web application\").\n3.  Add your n8n callback URI: `https://your-n8n-instance/rest/oauth2-credential/callback`. 🌐\n4.  In n8n, open a Gmail node, create new credentials, and paste your **Client ID** and **Secret**.\n\n### 3. Telegram Nodes\n**Goal:** Get a ping on your phone whenever a booking status changes.\n\n1.  Message `@BotFather` on Telegram to create a new bot and get your **API Token**. 🤖\n2.  To find your **Chat ID**, message your new bot, then visit: `https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates`.\n3.  In n8n, add your token to the **Telegram API** credentials and paste your Chat ID into the node's field.\n\n### 4. Google Sheets Nodes\n**Goal:** Keep a clean record of every attendee.\n\n1.  Create a Google Sheet with a tab named `Booked`. 📝\n2.  **Required Columns:** `Attendee Name`, `Attendee Email`, `Attendee Phone Number`, `Attendee Time Zone`, `Company Name`, `Company Website`, `Attendee Goals From This Call`, `Additional notes`, `Guests`, `iCalUID`, `video Call url`, `Trigger Event`, `Start Time`, `End Time`, `Organizer Name`, `Organizer Email`, `Organizer Time Zone`, `cancellation/Reschedule Reason`, `Event title`, `Event description`, `Status`, `Reschedule Approval`, `Gap Hours`, `Original Start Time`, `Rescheduled Start Time`.\n3.  Connect your Google account in n8n and select this sheet in each node.\n\n### 5. AI Agent (LangChain + OpenRouter)\n**Goal:** Use Claude 3.5 Sonnet to write personalized \"Sorry to see you go\" emails. ✍️\n\n1.  Get an API key from [openrouter.ai](https://openrouter.ai/).\n2.  In n8n, open the **OpenRouter Chat Model** node and add your key.\n3.  This only runs when someone cancels, so it’s very cost-efficient!\n\n---\n\n## Estimated Cost per Run 💰\n\n| Step | Cost |\n| :--- | :--- |\n| Cal.com / Gmail / Telegram | Free (Standard usage) |\n| Google Sheets | Free |\n| OpenRouter (Cancellations only) | < $0.01 per run |\n| **Total** | **Basically $0.00 for most events!** |\n\n---\n\n## Helpful Resources 📚\n\n* [Cal.com Webhook Documentation](https://cal.com/docs/developing/guides/automation/webhooks)\n* [n8n Gmail Setup Guide](https://docs.n8n.io/integrations/builtin/credentials/gmail/)\n* [OpenRouter Model Pricing](https://openrouter.ai/pricing)\n\n---\n\n### Created by [Gurey AI](https://gurey-ai.vercel.app/contact) ✨\n\n**Check out my other builds:**\n* [AI Email Inbox Manager](https://n8n.io/workflows/9157-ai-powered-email-triage-and-auto-response-system-with-openai-agents-and-gmail/) 📬\n* [Client Onboarding System](https://n8n.io/workflows/8977-client-onboarding-with-form/) 🤝\n* [RAG AI Document QA](https://n8n.io/workflows/9050-build-a-document-qa-system-with-google-drive-pinecone-and-openai-rag/) 📂\n\n**Need a hand?** Drop me an email at [gureyai2006@gmail.com](mailto:gureyai2006@gmail.com) or find me on the [n8n Forum](https://community.n8n.io/). Happy automating! 🎉",
                "height": 2320,
                "width": 1024
            },
            "type": "n8n-nodes-base.stickyNote",
            "typeVersion": 1,
            "position": [
                -1024,
                0
            ],
            "id": "fc52df38-a5ae-4cb5-bf81-7e84327137d2",
            "name": "Sticky Note3"
        }
    ],
    "connections": {
        "Send a message": {
            "main": [
                [
                    {
                        "node": "Send a notification to the team",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Map Data": {
            "main": [
                [
                    {
                        "node": "Log Attendee data to sheet",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Log Booker data to sheet2": {
            "main": [
                [
                    {
                        "node": "Time Zone formater",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Send a message2": {
            "main": [
                [
                    {
                        "node": "Send a text message2",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "OpenRouter Chat Model2": {
            "ai_languageModel": [
                [
                    {
                        "node": "Email wirter",
                        "type": "ai_languageModel",
                        "index": 0
                    }
                ]
            ]
        },
        "Structured Output Parser": {
            "ai_outputParser": [
                [
                    {
                        "node": "Email wirter",
                        "type": "ai_outputParser",
                        "index": 0
                    }
                ]
            ]
        },
        "Log Attendee data to sheet": {
            "main": [
                [
                    {
                        "node": "Wait",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Time Zone Formater": {
            "main": [
                [
                    {
                        "node": "Send a message",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Wait": {
            "main": [
                [
                    {
                        "node": "Time Zone Formater",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Map data": {
            "main": [
                [
                    {
                        "node": "Log Attendee Data to sheet",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Log Attendee Data to sheet": {
            "main": [
                [
                    {
                        "node": "Time Zone Formater1",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Time Zone Formater1": {
            "main": [
                [
                    {
                        "node": "Reschedule validator",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Reschedule validator": {
            "main": [
                [
                    {
                        "node": "If",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "If": {
            "main": [
                [
                    {
                        "node": "Reschedule Approval reocord1",
                        "type": "main",
                        "index": 0
                    }
                ],
                [
                    {
                        "node": "Reschedule Approval reocord",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Reschedule Approval reocord": {
            "main": [
                [
                    {
                        "node": "Send email to the approved",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Reschedule Approval reocord1": {
            "main": [
                [
                    {
                        "node": "Send email",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Map data2": {
            "main": [
                [
                    {
                        "node": "Log Booker data to sheet2",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Receive content": {
            "main": [
                [
                    {
                        "node": "Route to the right path",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Route to the right path": {
            "main": [
                [
                    {
                        "node": "Map Data",
                        "type": "main",
                        "index": 0
                    }
                ],
                [
                    {
                        "node": "Map data",
                        "type": "main",
                        "index": 0
                    }
                ],
                [
                    {
                        "node": "Map data2",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Time Zone formater": {
            "main": [
                [
                    {
                        "node": "Email wirter",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Email wirter": {
            "main": [
                [
                    {
                        "node": "Send a message2",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Send email": {
            "main": [
                [
                    {
                        "node": "Send notification to the team",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Send email to the approved": {
            "main": [
                [
                    {
                        "node": "Send a notification to team",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        }
    },
    "pinData": {
        "Receive content": [
            {
                "headers": {
                    "host": "n8n.example-automation.cloud",
                    "user-agent": "node",
                    "content-length": "4918",
                    "accept": "*/*",
                    "accept-encoding": "br, gzip, deflate",
                    "accept-language": "*",
                    "content-type": "application/json",
                    "sec-fetch-mode": "cors",
                    "x-cal-signature-256": "no-secret-provided",
                    "x-cal-webhook-version": "2021-10-20",
                    "x-forwarded-for": "192.168.1.100",
                    "x-forwarded-host": "n8n.example-automation.cloud",
                    "x-forwarded-port": "443",
                    "x-forwarded-proto": "https",
                    "x-forwarded-server": "abc1234567de",
                    "x-real-ip": "192.168.1.100"
                },
                "params": {},
                "query": {},
                "body": {
                    "triggerEvent": "BOOKING_CANCELLED",
                    "createdAt": "2026-03-10T10:15:00.000Z",
                    "payload": {
                        "bookerUrl": "https://cal.com",
                        "title": "60-Minute AI Consultant between Jane Smith and John Doe",
                        "startTime": "2026-03-12T09:00:00.000Z",
                        "endTime": "2026-03-12T10:00:00.000Z",
                        "additionalNotes": "No special requirements",
                        "type": "ai-consultant-call",
                        "description": "Schedule a ****free AI introductory call.****<br><br>In this personalized ****60-minute session****, we will review your business needs and build a clear, actionable strategy for implementing ****AI in your business.****<br>\n\nThis call is designed to:\n\n*   Identify the key areas where AI can help you save time and increase revenue.\n*   Discuss specific automations tailored to your industry.\n*   Provide a clear roadmap for leveraging ****AI to drive business growth****.\n\nWe look forward to helping you achieve your goals with smart, efficient automations. 🚀<br><br>Schedule a ****free Voice AI introductory call.****\n\nHave an AI agent idea in mind? Tell us about it, or we can help you explore how AI systems could work in your business.\n\n<br>****Note:**** We only take a limited number of calls every month. If you book and don't show up on time, your call will be canceled, and no reschedules.",
                        "eventTypeId": 1000001,
                        "hideCalendarNotes": false,
                        "hideCalendarEventDetails": false,
                        "hideOrganizerEmail": true,
                        "schedulingType": null,
                        "seatsPerTimeSlot": null,
                        "seatsShowAttendees": true,
                        "seatsShowAvailabilityCount": true,
                        "customReplyToEmail": null,
                        "disableRescheduling": false,
                        "disableReschedulingScope": "HOST_AND_ATTENDEE",
                        "disableCancelling": false,
                        "disableCancellingScope": "HOST_AND_ATTENDEE",
                        "organizer": {
                            "id": 1000042,
                            "name": "Jane Smith",
                            "email": "jane.smith@example.com",
                            "username": "jane-smith",
                            "timeZone": "America/New_York",
                            "language": {
                                "locale": "en"
                            },
                            "timeFormat": "h:mma",
                            "utcOffset": -300
                        },
                        "attendees": [
                            {
                                "name": "John Doe",
                                "email": "john.doe@example.com",
                                "timeZone": "Europe/London",
                                "language": {
                                    "locale": "en"
                                },
                                "phoneNumber": "+14155552671",
                                "bookingSeat": null,
                                "utcOffset": 0,
                                "firstName": "John",
                                "lastName": "Doe"
                            }
                        ],
                        "customInputs": {},
                        "responses": {
                            "name": {
                                "label": "your_name",
                                "value": "John Doe",
                                "isHidden": false
                            },
                            "email": {
                                "label": "Email address",
                                "value": "john.doe@example.com",
                                "isHidden": false
                            },
                            "URL": {
                                "label": "Your company website",
                                "value": "acme-corp.example.com",
                                "isHidden": false
                            },
                            "companyname": {
                                "label": "Your company name",
                                "value": "Acme Corp",
                                "isHidden": false
                            },
                            "attendeePhoneNumber": {
                                "label": "Phone Number",
                                "value": "+14155552671",
                                "isHidden": false
                            },
                            "location": {
                                "label": "location",
                                "value": {
                                    "value": "integrations:google:meet",
                                    "optionValue": ""
                                },
                                "isHidden": false
                            },
                            "title": {
                                "label": "What is your goals from this call",
                                "value": "Automate customer support",
                                "isHidden": false
                            },
                            "notes": {
                                "label": "Additional notes",
                                "value": "No special requirements",
                                "isHidden": false
                            },
                            "guests": {
                                "label": "Add a guest",
                                "value": [],
                                "isHidden": false
                            },
                            "rescheduleReason": {
                                "label": "reason_for_reschedule",
                                "value": "Schedule conflict",
                                "isHidden": false
                            }
                        },
                        "userFieldsResponses": {
                            "URL": {
                                "label": "Your company website",
                                "value": "acme-corp.example.com",
                                "isHidden": false
                            },
                            "companyname": {
                                "label": "Your company name",
                                "value": "Acme Corp",
                                "isHidden": false
                            }
                        },
                        "location": "integrations:google:meet",
                        "iCalUID": "aB3xYzLmNpQrStUvWx1234@Cal.com",
                        "iCalSequence": 2,
                        "requiresConfirmation": false,
                        "oneTimePassword": null,
                        "platformClientId": "",
                        "platformRescheduleUrl": "",
                        "platformCancelUrl": "",
                        "platformBookingUrl": "",
                        "uid": "dXmPqRsTuVwXyZaB1cDe2f",
                        "organizationId": null,
                        "hashedLink": null,
                        "hideBranding": false,
                        "destinationCalendar": [
                            {
                                "id": 2000001,
                                "integration": "google_calendar",
                                "externalId": "jane.calendar@example.com",
                                "primaryEmail": "jane.calendar@example.com",
                                "userId": 1000042,
                                "credentialId": 3000001
                            }
                        ],
                        "bookingId": 9000001,
                        "status": "CANCELLED",
                        "eventTitle": "60-Minute AI Consultant",
                        "eventDescription": "Schedule a ****free AI introductory call.****<br><br>In this personalized ****60-minute session****, we will review your business needs and build a clear, actionable strategy for implementing ****AI in your business.****<br>\n\nThis call is designed to:\n\n*   Identify the key areas where AI can help you save time and increase revenue.\n*   Discuss specific automations tailored to your industry.\n*   Provide a clear roadmap for leveraging ****AI to drive business growth****.\n\nWe look forward to helping you achieve your goals with smart, efficient automations. 🚀<br><br>Schedule a ****free Voice AI introductory call.****\n\nHave an AI agent idea in mind? Tell us about it, or we can help you explore how AI systems could work in your business.\n\n<br>****Note:**** We only take a limited number of calls every month. If you book and don't show up on time, your call will be canceled, and no reschedules.",
                        "price": 0,
                        "currency": "usd",
                        "length": 60,
                        "assignmentReason": [],
                        "cancelledBy": "john.doe@example.com",
                        "cancellationReason": "I have a scheduling conflict",
                        "requestReschedule": false,
                        "metadata": {
                            "videoCallUrl": "https://meet.google.com/abc-defg-hij"
                        }
                    }
                },
                "webhookUrl": "https://n8n.example-automation.cloud/webhook-test/00000000-0000-0000-0000-000000000001",
                "executionMode": "test"
            }
        ]
    },
    "meta": {
        "templateCredsSetupCompleted": true,
        "instanceId": "a8340bdf39af29e6156ac08b71563819bdf196e48d1b022b1219ede60e630c2e"
    }
}