{
  "name": "Schedule appointments from a booking form with Google Calendar and Gmail",
  "nodes": [
    {
      "id": "997c252a-ea1c-455b-8afe-392225b73d70",
      "name": "Code in JavaScript",
      "type": "n8n-nodes-base.code",
      "position": [
        -880,
        560
      ]
    },
    {
      "id": "a94a2cdc-0ad0-480d-8e58-5352f2416756",
      "name": "Show Success Message",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        0,
        560
      ]
    },
    {
      "id": "7887c143-437b-49b1-bc52-09d0cc02e42b",
      "name": "Send Confirmation Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -208,
        560
      ]
    },
    {
      "id": "f296c75f-87bb-4463-8504-56534c918486",
      "name": "Format Email Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -432,
        560
      ]
    },
    {
      "id": "e0130056-a309-4a1f-bf22-7dc192bd2fce",
      "name": "Create Calendar Event",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        -656,
        560
      ]
    },
    {
      "id": "3124fd95-0fd3-4f81-98e9-86b5fb76400c",
      "name": "Webhook - Submit Form",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1088,
        560
      ]
    },
    {
      "id": "6c9e11ac-bda2-4e73-abf7-4b3d43d5e802",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -208,
        336
      ]
    },
    {
      "id": "b9808377-3551-4192-9124-0b7d2f452586",
      "name": "Build HTML Form",
      "type": "n8n-nodes-base.code",
      "position": [
        -416,
        336
      ]
    },
    {
      "id": "796ed038-04a1-479e-8ac8-f162b22319ad",
      "name": "Calculate Available Slots",
      "type": "n8n-nodes-base.code",
      "position": [
        -640,
        336
      ]
    },
    {
      "id": "4b727001-37aa-42df-bb4c-98b75bbe3510",
      "name": "Get Calendar Events",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        -864,
        336
      ]
    },
    {
      "id": "1f9bede9-b36a-4ebf-9697-12c53d5a3146",
      "name": "Webhook - Show Form",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1088,
        336
      ]
    },
    {
      "id": "1085bf5c-a45a-4bf9-ade3-dd76aab87cf5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1056,
        -80
      ],
      "parameters": {
        "width": 864,
        "height": 352,
        "content": "## Self-Hosted Booking Form with Google Calendar\n\nThis workflow has **two paths**:\n\n**Top row (GET):** Serves the booking form\nWebhook → Get Calendar Events → Calculate Available Slots → Build HTML Fo"
      }
    }
  ],
  "connections": {
    "Build HTML Form": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Email Data": {
      "main": [
        [
          {
            "node": "Send Confirmation Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Create Calendar Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Calendar Events": {
      "main": [
        [
          {
            "node": "Calculate Available Slots",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook - Show Form": {
      "main": [
        [
          {
            "node": "Get Calendar Events",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Calendar Event": {
      "main": [
        [
          {
            "node": "Format Email Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook - Submit Form": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Confirmation Email": {
      "main": [
        [
          {
            "node": "Show Success Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Available Slots": {
      "main": [
        [
          {
            "node": "Build HTML Form",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}