{
  "id": "TEMPLATE_WORKFLOW_ID_PLACEHOLDER",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "TimeRex AI-Powered Booking Automation",
  "tags": [],
  "nodes": [
    {
      "id": "e30fe291-8fc4-464f-bda7-bc0422a0b3d0",
      "name": "TimeRex Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1856,
        -96
      ],
      "parameters": {
        "path": "/timerex-booking",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2.1
    },
    {
      "id": "77437701-6098-4ca4-906d-6a76eb052049",
      "name": "Get Media Master",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -704,
        -240
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultName": "Media Master"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_MEDIA_MASTER_SHEET_ID"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "34e95f13-a21b-46a1-9928-0955f6f96fd3",
      "name": "Detect Media Source",
      "type": "n8n-nodes-base.code",
      "position": [
        -496,
        -240
      ],
      "parameters": {
        "jsCode": "// Get calendar_name from Webhook\nconst calendarName = $('TimeRex Webhook').first().json.body.calendar_name;\n\n// Get media list from spreadsheet\nconst mediaList = $items().map(\n  item => item.json[\"media_name\"]\n);\n\n// Find matching media name in calendar_name\nconst matchedMedia = mediaList.find(media =>\n  calendarName && calendarName.includes(media)\n);\n\n// Return matched media name or empty string\nconst result = matchedMedia ?? \"\";\n\nreturn {\n  calendar_name: result\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "abf9375b-33a2-4a45-bc5f-bf5ab9869579",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2304,
        -624
      ],
      "parameters": {
        "width": 400,
        "height": 1036,
        "content": "## \ud83d\ude80 TimeRex AI-Powered Booking Automation\n\nAutomate your TimeRex bookings with AI-powered insights and smart notifications.\n\n---\n\n### \u2728 Key Features\n\n**AI-Powered Intelligence**\n- Auto-detect company from email domain\n- Smart booking categorization (Sales/Support/Interview/etc.)\n- AI-generated meeting briefs for host preparation\n\n**Robust Automation**\n- Secure webhook with token verification\n- Automatic data enrichment & logging to Google Sheets\n- Real-time Slack notifications with AI insights\n- Cancellation handling with cleanup\n\n---\n\n### \ud83d\udccb Setup Checklist\n\n1. Copy webhook URL \u2192 TimeRex Settings \u2192 Webhook\n2. Set your security token in `Verify Security Token` node\n3. Update Google Sheet IDs in all Sheets nodes\n4. Connect your Google Gemini API credentials\n5. Select your Slack channel in notification nodes\n6. Activate workflow\n\n---\n\n### \ud83d\udcca Required Sheet Columns\n\n`event_id` | `booking_date` | `guest_name` | `guest_email` | `calendar_name` | `meeting_url` | `host_name` | `media_source` | `company_name` | `booking_category` | `ai_meeting_brief` | `created_at`"
      },
      "typeVersion": 1
    },
    {
      "id": "db62776f-70ec-4adc-8cb8-71a54d1bd3df",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        -624
      ],
      "parameters": {
        "color": 7,
        "width": 2096,
        "height": 736,
        "content": "## \ud83d\udcc5 Booking Flow \u2014 AI Enhancement Pipeline\n\nThis section processes confirmed bookings through an AI enrichment pipeline:\n\n**Data Flow:**\n```\nMedia Detection \u2192 Company Extraction \u2192 AI Categorization \u2192 AI Brief Generation \u2192 Data Merge \u2192 Sheet Append \u2192 Slack Alert\n```\n\n**AI Processing:**\n- **Categorize**: Classifies booking purpose using LLM\n- **Brief**: Generates actionable meeting prep notes\n\n**Output:**\n- Enriched booking record in Google Sheets\n- Slack notification with AI-generated insights"
      },
      "typeVersion": 1
    },
    {
      "id": "c371a464-ff15-49ad-835f-a885b1dbdbc6",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        144
      ],
      "parameters": {
        "color": 7,
        "width": 976,
        "height": 384,
        "content": "## \u274c Cancellation Flow\n\nHandles booking cancellations:\n\n1. **Find**: Lookup booking by Event ID\n2. **Delete**: Remove row from Google Sheets\n3. **Notify**: Send Slack cancellation alert\n\nKeeps your booking data clean and team informed."
      },
      "typeVersion": 1
    },
    {
      "id": "cb90ddd7-f571-43dd-817b-7342d7cd3769",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1888,
        -624
      ],
      "parameters": {
        "color": 7,
        "width": 908,
        "height": 908,
        "content": "## \ud83d\udd10 Trigger & Security Layer\n\n**Webhook Endpoint**\nReceives POST requests from TimeRex when bookings are confirmed or cancelled.\n\n**Security Verification**\nValidates `x-timerex-authorization` header against your security token. Failed attempts trigger an immediate Slack security alert.\n\n**Calendar Filter**\nRoutes only relevant calendar types for processing. Customize the filter condition to match your calendar naming convention.\n\n**Event Routing**\n- `event_confirmed` \u2192 Booking flow\n- `event_cancelled` \u2192 Cancellation flow"
      },
      "typeVersion": 1
    },
    {
      "id": "eb574d54-b2f6-4c90-98b1-4190d3ce9805",
      "name": "Find Booking by Event ID",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -688,
        368
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "={{ $node['TimeRex Webhook'].json.body.event.id }}",
              "lookupColumn": "event_id"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultName": "Bookings"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_BOOKINGS_SHEET_ID"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "6627f5c1-af48-4e65-b112-d3b238889b1d",
      "name": "Delete Cancelled Booking",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -448,
        368
      ],
      "parameters": {
        "operation": "delete",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultName": "Bookings"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_BOOKINGS_SHEET_ID"
        },
        "startIndex": "={{ $json.row_number }}",
        "numberToDelete": "=1"
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "78f4ef8e-6e8f-4150-9e1f-8ef8edf774a3",
      "name": "Filter by Calendar Type",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1392,
        -96
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "09d6d397-d513-444c-9573-b18a76d1f1a2",
                    "operator": {
                      "type": "string",
                      "operation": "contains"
                    },
                    "leftValue": "={{ $json.body.calendar_name }}",
                    "rightValue": "YOUR_CALENDAR_FILTER_KEYWORD"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.3
    },
    {
      "id": "53375f65-804f-435d-ab44-8647c649f3ad",
      "name": "Route by Event Type",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1184,
        -96
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "11158f54-8452-4dd0-a341-8bbafc60cfd8",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.body.webhook_type }}",
                    "rightValue": "event_confirmed"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "7397cf36-2c73-416e-821f-15cbee3d3953",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.body.webhook_type }}",
                    "rightValue": "event_cancelled"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.3
    },
    {
      "id": "3eec9754-3962-46a9-a25c-465d62f76e6c",
      "name": "Verify Security Token",
      "type": "n8n-nodes-base.if",
      "position": [
        -1664,
        -96
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "3d75c8ce-a002-40d4-b89e-312ca6d0e6e2",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.headers['x-timerex-authorization'] }}",
              "rightValue": "YOUR_TIMEREX_SECURITY_TOKEN"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "ea52f34e-b4e7-480a-8885-2483f609831c",
      "name": "Slack: Security Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        -1392,
        96
      ],
      "parameters": {
        "text": "=\ud83d\udeab *Webhook Security Alert*\n\n*Status:* Token Verification Failed\n*Timestamp:* {{ $now.format('yyyy-MM-dd HH:mm:ss') }}\n\n\u26a0\ufe0f This request was rejected due to invalid security token.\nPlease investigate if this persists.",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultName": "Select your channel"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "typeVersion": 2.3
    },
    {
      "id": "d10fcb97-b4d0-47c5-ab74-d40fe13af725",
      "name": "Slack: Cancellation Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        -192,
        368
      ],
      "parameters": {
        "text": "=\u274c *Meeting Cancelled*\n\n\ud83d\udc64 *Guest:* {{ $('TimeRex Webhook').item.json.body.event.form.find(f => f.field_type === 'guest_name')?.value }}\n\ud83d\udce7 *Email:* {{ $('TimeRex Webhook').item.json.body.event.form.find(f => f.field_type === 'guest_email')?.value }}\n\ud83d\uddd3\ufe0f *Original Date:* {{ $('TimeRex Webhook').item.json.body.event.local_start_datetime }}\n\ud83d\udc68\u200d\ud83d\udcbc *Host:* {{ $('TimeRex Webhook').item.json.body.event.hosts[0]?.name }}\n\n\ud83d\udd11 *Event ID:* {{ $('TimeRex Webhook').item.json.body.event.id }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultName": "Select your channel"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "typeVersion": 2.3
    },
    {
      "id": "d15fa08b-a6cb-4da1-ad33-05e82129e31b",
      "name": "Extract Company from Email",
      "type": "n8n-nodes-base.code",
      "position": [
        -304,
        -240
      ],
      "parameters": {
        "jsCode": "// Get guest email from webhook\nconst guestEmail = $('TimeRex Webhook').first().json.body.event.form.find(\n  f => f.field_type === 'guest_email'\n)?.value || '';\n\nconst guestName = $('TimeRex Webhook').first().json.body.event.form.find(\n  f => f.field_type === 'guest_name'\n)?.value || '';\n\nconst calendarName = $('TimeRex Webhook').first().json.body.calendar_name || '';\nconst mediaSource = $('Detect Media Source').first().json.calendar_name || '';\n\n// Extract domain and estimate company name\nconst domain = guestEmail.split('@')[1] || '';\nlet companyName = '';\n\nif (domain) {\n  // Remove common email providers\n  const freeEmailDomains = ['gmail.com', 'yahoo.co.jp', 'yahoo.com', 'hotmail.com', 'outlook.com', 'icloud.com', 'me.com'];\n  \n  if (!freeEmailDomains.includes(domain.toLowerCase())) {\n    // Extract company name from domain\n    companyName = domain.split('.')[0];\n    // Capitalize first letter\n    companyName = companyName.charAt(0).toUpperCase() + companyName.slice(1);\n  } else {\n    companyName = 'Individual';\n  }\n}\n\nreturn {\n  guest_email: guestEmail,\n  guest_name: guestName,\n  email_domain: domain,\n  company_name: companyName,\n  calendar_name: calendarName,\n  media_source: mediaSource,\n  booking_date: $('TimeRex Webhook').first().json.body.event.local_start_datetime,\n  host_name: $('TimeRex Webhook').first().json.body.event.hosts[0]?.name || '',\n  meeting_url: $('TimeRex Webhook').first().json.body.event.google_meet_meeting?.join_url || '',\n  event_id: $('TimeRex Webhook').first().json.body.event.id\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "8be3e8cc-8e9a-43f5-ad80-62f96a4c5da9",
      "name": "AI: Categorize Booking",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -112,
        -240
      ],
      "parameters": {
        "text": "=You are a booking classification expert. Analyze the following booking information and select the most appropriate category.\n\n\u3010Booking Information\u3011\n- Guest Name: {{ $json.guest_name }}\n- Company Name: {{ $json.company_name }}\n- Email Domain: {{ $json.email_domain }}\n- Calendar Name: {{ $json.calendar_name }}\n\n\u3010Category Options\u3011\n- Sales Meeting\n- Customer Support\n- Job Interview\n- Partnership\n- Media Interview\n- Other\n\n\u3010Output Format\u3011\nOutput only the category name. No explanation needed.",
        "messages": {
          "messageValues": []
        },
        "promptType": "define"
      },
      "typeVersion": 1.5
    },
    {
      "id": "46c6e552-9750-4683-8029-15cbff5f9576",
      "name": "AI: Generate Meeting Brief",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        192,
        -240
      ],
      "parameters": {
        "text": "=You are a professional meeting assistant. Based on the following booking information, create a concise meeting preparation brief for the host.\n\n\u3010Booking Details\u3011\n- Guest Name: {{ $('Extract Company from Email').item.json.guest_name }}\n- Estimated Company: {{ $('Extract Company from Email').item.json.company_name }}\n- Email Domain: {{ $('Extract Company from Email').item.json.email_domain }}\n- Calendar/Meeting Type: {{ $('Extract Company from Email').item.json.calendar_name }}\n- Booking Category: {{ $('AI: Categorize Booking').item.json.text }}\n- Date/Time: {{ $('Extract Company from Email').item.json.booking_date }}\n\n\u3010Output Format\u3011\nProvide a concise output in the following format (total under 150 characters):\n\n\ud83d\udccc Summary: (One sentence describing who and what purpose)\n\ud83d\udca1 Prep Points: (2-3 bullet points)\n\nOutput in English only.",
        "messages": {
          "messageValues": []
        },
        "promptType": "define"
      },
      "typeVersion": 1.5
    },
    {
      "id": "7e1cf8fd-b5d6-457f-a26b-2b813d045455",
      "name": "Merge AI Results",
      "type": "n8n-nodes-base.code",
      "position": [
        512,
        -240
      ],
      "parameters": {
        "jsCode": "// Merge all data from previous nodes\nconst extractedData = $('Extract Company from Email').first().json;\nconst category = $('AI: Categorize Booking').first().json.text || 'Other';\nconst meetingBrief = $('AI: Generate Meeting Brief').first().json.text || '';\n\nreturn {\n  ...extractedData,\n  booking_category: category.trim(),\n  ai_meeting_brief: meetingBrief.trim(),\n  created_at: new Date().toISOString()\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "6b593ca3-0e58-4ea2-a99c-2d356546be0c",
      "name": "Append Enriched Booking",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        720,
        -240
      ],
      "parameters": {
        "columns": {
          "value": {
            "event_id": "={{ $json.event_id }}",
            "host_name": "={{ $json.host_name }}",
            "created_at": "={{ $json.created_at }}",
            "guest_name": "={{ $json.guest_name }}",
            "guest_email": "={{ $json.guest_email }}",
            "meeting_url": "={{ $json.meeting_url }}",
            "booking_date": "={{ $json.booking_date }}",
            "company_name": "={{ $json.company_name }}",
            "media_source": "={{ $json.media_source }}",
            "calendar_name": "={{ $json.calendar_name }}",
            "ai_meeting_brief": "={{ $json.ai_meeting_brief }}",
            "booking_category": "={{ $json.booking_category }}"
          },
          "schema": [
            {
              "id": "event_id",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "event_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "booking_date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "booking_date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "guest_name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "guest_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "guest_email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "guest_email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "calendar_name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "calendar_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "meeting_url",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "meeting_url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "host_name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "host_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "media_source",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "media_source",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "company_name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "company_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "booking_category",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "booking_category",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ai_meeting_brief",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ai_meeting_brief",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "created_at",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "created_at",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultName": "Bookings"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_BOOKINGS_SHEET_ID"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "0e2cd78c-ba48-46ff-ad11-259a7e19abd3",
      "name": "Slack: New Booking Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        928,
        -240
      ],
      "parameters": {
        "text": "=\ud83d\udcc5 *New Booking with AI Insights*\n\n\ud83d\udc64 *Guest:* {{ $json.guest_name }}\n\ud83c\udfe2 *Company:* {{ $json.company_name }}\n\ud83d\udce7 *Email:* {{ $json.guest_email }}\n\ud83d\uddd3\ufe0f *Date:* {{ $json.booking_date }}\n\ud83d\udc68\u200d\ud83d\udcbc *Host:* {{ $json.host_name }}\n\ud83d\udcca *Category:* {{ $json.booking_category }}\n\ud83d\udce1 *Media Source:* {{ $json.media_source || 'Direct' }}\n\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\ud83e\udd16 *AI Meeting Brief:*\n{{ $json.ai_meeting_brief }}\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\n\ud83d\udd17 <{{ $json.meeting_url }}|Join Meeting>",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultName": "Select your channel"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "typeVersion": 2.3
    },
    {
      "id": "6a254b3e-7198-4182-bac4-7ca4982695e9",
      "name": "Google Gemini (Categorize)",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -112,
        -32
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "a871a6b1-2c1e-4cac-ae90-ebad70d7200a",
      "name": "Google Gemini (Brief)",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        192,
        -32
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "TEMPLATE_VERSION_ID_PLACEHOLDER",
  "connections": {
    "TimeRex Webhook": {
      "main": [
        [
          {
            "node": "Verify Security Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Media Master": {
      "main": [
        [
          {
            "node": "Detect Media Source",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge AI Results": {
      "main": [
        [
          {
            "node": "Append Enriched Booking",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Detect Media Source": {
      "main": [
        [
          {
            "node": "Extract Company from Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Event Type": {
      "main": [
        [
          {
            "node": "Get Media Master",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Find Booking by Event ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini (Brief)": {
      "ai_languageModel": [
        [
          {
            "node": "AI: Generate Meeting Brief",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Verify Security Token": {
      "main": [
        [
          {
            "node": "Filter by Calendar Type",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Slack: Security Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI: Categorize Booking": {
      "main": [
        [
          {
            "node": "AI: Generate Meeting Brief",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append Enriched Booking": {
      "main": [
        [
          {
            "node": "Slack: New Booking Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter by Calendar Type": {
      "main": [
        [
          {
            "node": "Route by Event Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete Cancelled Booking": {
      "main": [
        [
          {
            "node": "Slack: Cancellation Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Booking by Event ID": {
      "main": [
        [
          {
            "node": "Delete Cancelled Booking",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI: Generate Meeting Brief": {
      "main": [
        [
          {
            "node": "Merge AI Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Company from Email": {
      "main": [
        [
          {
            "node": "AI: Categorize Booking",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini (Categorize)": {
      "ai_languageModel": [
        [
          {
            "node": "AI: Categorize Booking",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}