{
  "name": "Manage online bookings with webhook, Gmail, Google Calendar and Slack",
  "nodes": [
    {
      "id": "d3cfcf6a-5a5c-45df-8e5a-9792005d09ef",
      "name": "Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -336,
        -624
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "56e42c3f-9ee3-4797-9b9b-59048e06fa98",
      "name": "Booking intake",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        -624
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "6d5f6245-8dd0-4e5b-8b94-f280ca61043a",
      "name": "Webhook - New Booking",
      "type": "n8n-nodes-base.webhook",
      "position": [
        144,
        -480
      ]
    },
    {
      "id": "3052d759-251d-45ea-ba2d-9e36e2171cac",
      "name": "Validate Booking",
      "type": "n8n-nodes-base.code",
      "position": [
        384,
        -480
      ]
    },
    {
      "id": "c970ffd4-c554-4005-9281-0d1a6f01f906",
      "name": "IF - Valid Request",
      "type": "n8n-nodes-base.if",
      "position": [
        624,
        -480
      ]
    },
    {
      "id": "c1dd93a7-4c22-428e-86eb-bc776fea4026",
      "name": "Format Validation Error",
      "type": "n8n-nodes-base.code",
      "position": [
        608,
        -288
      ]
    },
    {
      "id": "e642c5b7-0620-4059-bdd8-b5eddceb985e",
      "name": "Respond - Validation Error",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        784,
        -288
      ]
    },
    {
      "id": "8f2acb6b-2dc7-4b94-b236-5b5edf01a797",
      "name": "Duplicate and availability",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        -624
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "4b53616a-c9e9-462a-8372-3114dee473a7",
      "name": "API - Check Duplicates",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        976,
        -480
      ]
    },
    {
      "id": "b08ce3ff-11a3-4ef4-b6fc-7d23b078ef48",
      "name": "IF - Not Duplicate",
      "type": "n8n-nodes-base.if",
      "position": [
        1216,
        -480
      ]
    },
    {
      "id": "37c32fad-9f39-44e8-b604-c19bdb5ac3fe",
      "name": "Format Duplicate Error",
      "type": "n8n-nodes-base.code",
      "position": [
        1216,
        -288
      ]
    },
    {
      "id": "ecc9bf6f-1113-4e0e-bf15-5162a51f50b7",
      "name": "Respond - Duplicate",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1392,
        -288
      ]
    },
    {
      "id": "6a11ab42-6042-4b55-a0b5-53e9dae00cc8",
      "name": "Availability check",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1552,
        -624
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "1fe7d609-781f-4304-a315-f7a882b8c9bc",
      "name": "API - Check Availability",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1568,
        -480
      ]
    },
    {
      "id": "dc03159d-1ced-4614-9e47-a313f6df965c",
      "name": "IF - Available",
      "type": "n8n-nodes-base.if",
      "position": [
        1808,
        -480
      ]
    },
    {
      "id": "2baf6ee6-b1f3-4416-affb-d5219bf61372",
      "name": "Format Unavailable",
      "type": "n8n-nodes-base.code",
      "position": [
        1808,
        -288
      ]
    },
    {
      "id": "ebf72e58-bbbb-4d21-b1d3-f699ff0f319e",
      "name": "Respond - Unavailable",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1984,
        -288
      ]
    },
    {
      "id": "eb7c304e-4f27-4920-8862-79c01ed36bc5",
      "name": "Booking creation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2144,
        -624
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "27b7dc27-0279-4243-92ab-b47ab6b7885b",
      "name": "API - Create Booking",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2160,
        -480
      ]
    },
    {
      "id": "9c17450c-c4ad-4b2c-9d46-0acc259a06c1",
      "name": "Format Email",
      "type": "n8n-nodes-base.code",
      "position": [
        2400,
        -480
      ]
    },
    {
      "id": "285ad0e6-b570-444b-802d-13b4dd3adbe2",
      "name": "Send Confirmation Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2640,
        -480
      ]
    },
    {
      "id": "438cca51-29c4-47d7-943c-ba92f494fff1",
      "name": "Prepare Calendar Event",
      "type": "n8n-nodes-base.code",
      "position": [
        2880,
        -480
      ]
    },
    {
      "id": "71e87976-b71f-4d81-8e16-17bcec662466",
      "name": "Create Calendar Event",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        3120,
        -480
      ]
    },
    {
      "id": "cc87c7e6-83be-43de-8a34-e261e403e300",
      "name": "Slack - Notify Team",
      "type": "n8n-nodes-base.slack",
      "position": [
        3120,
        -288
      ]
    },
    {
      "id": "d8333f8a-60aa-4a03-a223-e625f5feaa27",
      "name": "Audit and response",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3376,
        -624
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "cc3f5571-d9df-434a-ac74-5eaba94d1d0e",
      "name": "Prepare Audit Entry",
      "type": "n8n-nodes-base.code",
      "position": [
        3392,
        -480
      ]
    },
    {
      "id": "8a06defc-3c3b-4ca7-9646-6820d898dce2",
      "name": "API - Log Audit",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3632,
        -480
      ]
    },
    {
      "id": "788c353c-e38c-4009-a640-3e0b68c0aaa2",
      "name": "Format Success",
      "type": "n8n-nodes-base.code",
      "position": [
        3584,
        -288
      ]
    },
    {
      "id": "fec47223-cf67-4160-92a9-ae8d43e589a7",
      "name": "Respond - Success",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3760,
        -288
      ]
    },
    {
      "id": "798ed1d3-080a-4158-930a-3504f932faeb",
      "name": "Error handling",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        400
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "78c95ae5-0e56-4594-ab41-a6464004500b",
      "name": "Error Trigger",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        -288,
        512
      ]
    },
    {
      "id": "4a27ada2-76cf-40b4-adf6-694048fdf495",
      "name": "Format Error",
      "type": "n8n-nodes-base.code",
      "position": [
        -48,
        512
      ]
    },
    {
      "id": "d17f3d39-63a4-44ba-ac35-be587d5c5877",
      "name": "Slack - Error Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        192,
        512
      ]
    }
  ],
  "connections": {
    "Format Email": {
      "main": [
        [
          {
            "node": "Send Confirmation Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Error": {
      "main": [
        [
          {
            "node": "Slack - Error Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error Trigger": {
      "main": [
        [
          {
            "node": "Format Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Success": {
      "main": [
        [
          {
            "node": "Respond - Success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF - Available": {
      "main": [
        [
          {
            "node": "API - Create Booking",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Format Unavailable",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "API - Log Audit": {
      "main": [
        [
          {
            "node": "Format Success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Booking": {
      "main": [
        [
          {
            "node": "IF - Valid Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Unavailable": {
      "main": [
        [
          {
            "node": "Respond - Unavailable",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF - Not Duplicate": {
      "main": [
        [
          {
            "node": "API - Check Availability",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Format Duplicate Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF - Valid Request": {
      "main": [
        [
          {
            "node": "API - Check Duplicates",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Format Validation Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Audit Entry": {
      "main": [
        [
          {
            "node": "API - Log Audit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack - Notify Team": {
      "main": [
        [
          {
            "node": "Prepare Audit Entry",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "API - Create Booking": {
      "main": [
        [
          {
            "node": "Format Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Calendar Event": {
      "main": [
        [
          {
            "node": "Prepare Audit Entry",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook - New Booking": {
      "main": [
        [
          {
            "node": "Validate Booking",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "API - Check Duplicates": {
      "main": [
        [
          {
            "node": "IF - Not Duplicate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Duplicate Error": {
      "main": [
        [
          {
            "node": "Respond - Duplicate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Calendar Event": {
      "main": [
        [
          {
            "node": "Create Calendar Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Validation Error": {
      "main": [
        [
          {
            "node": "Respond - Validation Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Confirmation Email": {
      "main": [
        [
          {
            "node": "Prepare Calendar Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "API - Check Availability": {
      "main": [
        [
          {
            "node": "IF - Available",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}