{
  "name": "Sync AI-enriched TimeRex bookings to Google Sheets and Slack with Gemini",
  "nodes": [
    {
      "id": "e30fe291-8fc4-464f-bda7-bc0422a0b3d0",
      "name": "TimeRex Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1856,
        -96
      ]
    },
    {
      "id": "77437701-6098-4ca4-906d-6a76eb052049",
      "name": "Get Media Master",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -704,
        -240
      ]
    },
    {
      "id": "34e95f13-a21b-46a1-9928-0955f6f96fd3",
      "name": "Detect Media Source",
      "type": "n8n-nodes-base.code",
      "position": [
        -496,
        -240
      ]
    },
    {
      "id": "abf9375b-33a2-4a45-bc5f-bf5ab9869579",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2304,
        -624
      ],
      "parameters": {
        "width": 400,
        "height": 1036,
        "content": "## 🚀 TimeRex AI-Powered Booking Automation\n\nAutomate your TimeRex bookings with AI-powered insights and smart notifications.\n\n---\n\n### ✨ Key Features\n\n**AI-Powered Intelligence**\n- Auto-detect company"
      }
    },
    {
      "id": "db62776f-70ec-4adc-8cb8-71a54d1bd3df",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        -624
      ],
      "parameters": {
        "width": 2096,
        "height": 736,
        "content": "## 📅 Booking Flow — AI Enhancement Pipeline\n\nThis section processes confirmed bookings through an AI enrichment pipeline:\n\n**Data Flow:**\n```\nMedia Detection → Company Extraction → AI Categorization →"
      }
    },
    {
      "id": "c371a464-ff15-49ad-835f-a885b1dbdbc6",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        144
      ],
      "parameters": {
        "width": 976,
        "height": 384,
        "content": "## ❌ 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 bo"
      }
    },
    {
      "id": "cb90ddd7-f571-43dd-817b-7342d7cd3769",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1888,
        -624
      ],
      "parameters": {
        "width": 908,
        "height": 908,
        "content": "## 🔐 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 "
      }
    },
    {
      "id": "eb574d54-b2f6-4c90-98b1-4190d3ce9805",
      "name": "Find Booking by Event ID",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -688,
        368
      ]
    },
    {
      "id": "6627f5c1-af48-4e65-b112-d3b238889b1d",
      "name": "Delete Cancelled Booking",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -448,
        368
      ]
    },
    {
      "id": "78f4ef8e-6e8f-4150-9e1f-8ef8edf774a3",
      "name": "Filter by Calendar Type",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1392,
        -96
      ]
    },
    {
      "id": "53375f65-804f-435d-ab44-8647c649f3ad",
      "name": "Route by Event Type",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1184,
        -96
      ]
    },
    {
      "id": "3eec9754-3962-46a9-a25c-465d62f76e6c",
      "name": "Verify Security Token",
      "type": "n8n-nodes-base.if",
      "position": [
        -1664,
        -96
      ]
    },
    {
      "id": "ea52f34e-b4e7-480a-8885-2483f609831c",
      "name": "Slack: Security Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        -1392,
        96
      ]
    },
    {
      "id": "d10fcb97-b4d0-47c5-ab74-d40fe13af725",
      "name": "Slack: Cancellation Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        -192,
        368
      ]
    },
    {
      "id": "d15fa08b-a6cb-4da1-ad33-05e82129e31b",
      "name": "Extract Company from Email",
      "type": "n8n-nodes-base.code",
      "position": [
        -304,
        -240
      ]
    },
    {
      "id": "8be3e8cc-8e9a-43f5-ad80-62f96a4c5da9",
      "name": "AI: Categorize Booking",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -112,
        -240
      ]
    },
    {
      "id": "46c6e552-9750-4683-8029-15cbff5f9576",
      "name": "AI: Generate Meeting Brief",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        192,
        -240
      ]
    },
    {
      "id": "7e1cf8fd-b5d6-457f-a26b-2b813d045455",
      "name": "Merge AI Results",
      "type": "n8n-nodes-base.code",
      "position": [
        512,
        -240
      ]
    },
    {
      "id": "6b593ca3-0e58-4ea2-a99c-2d356546be0c",
      "name": "Append Enriched Booking",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        720,
        -240
      ]
    },
    {
      "id": "0e2cd78c-ba48-46ff-ad11-259a7e19abd3",
      "name": "Slack: New Booking Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        928,
        -240
      ]
    },
    {
      "id": "6a254b3e-7198-4182-bac4-7ca4982695e9",
      "name": "Google Gemini (Categorize)",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -112,
        -32
      ]
    },
    {
      "id": "a871a6b1-2c1e-4cac-ae90-ebad70d7200a",
      "name": "Google Gemini (Brief)",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        192,
        -32
      ]
    }
  ],
  "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
          }
        ]
      ]
    }
  }
}