{
  "name": "Schedule appointments with manual approval using Google Calendar and Gmail",
  "nodes": [
    {
      "id": "29aab469-1f9f-452d-8141-5059af69fffc",
      "name": "Receive appointment request",
      "type": "n8n-nodes-base.webhook",
      "position": [
        160,
        352
      ]
    },
    {
      "id": "2bf0d6da-e840-4599-b793-8fbf23babcfd",
      "name": "Format appointment data",
      "type": "n8n-nodes-base.set",
      "position": [
        384,
        352
      ]
    },
    {
      "id": "a0c4e8f2-ed59-466e-b020-13b4c763894d",
      "name": "Check Availability",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        608,
        352
      ]
    },
    {
      "id": "8ae03768-acf8-4748-9d5e-804d2cc7fad3",
      "name": "Is approved?",
      "type": "n8n-nodes-base.if",
      "position": [
        1504,
        256
      ]
    },
    {
      "id": "16e45971-fc70-4478-ac00-c5ce0eb66f48",
      "name": "Appointment Failed",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1728,
        352
      ]
    },
    {
      "id": "22a1d4e8-f83a-4e46-a883-7880c5968bbb",
      "name": "Book Appointment",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        1728,
        160
      ]
    },
    {
      "id": "a3c0ede0-ee2a-4ef8-a8d4-4badeb6ee97d",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        832,
        352
      ]
    },
    {
      "id": "a05231fc-9c65-4732-8e73-ecb5fb51cf19",
      "name": "Is Slot Available?",
      "type": "n8n-nodes-base.if",
      "position": [
        1056,
        352
      ]
    },
    {
      "id": "b7ec4e94-48e8-41d0-ae3f-3cfce5c88388",
      "name": "Get Approval (HR) [1 hour wait]",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1280,
        256
      ]
    },
    {
      "id": "42b3486c-f2d7-4336-839d-1789f7bae261",
      "name": "End - Slot Busy",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1280,
        448
      ]
    },
    {
      "id": "fb697393-26eb-4bd2-8fe9-69566d1eb088",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        -160
      ],
      "parameters": {
        "width": 672,
        "height": 360,
        "content": "## Smart Appointment Scheduler\n\n## How it works\n1. Receives appointment request via Webhook.\n2. Checks Google Calendar availability.\n3. If free, requests HR approval via Gmail.\n4. Sends confirmation o"
      }
    },
    {
      "id": "277da4b1-0ee9-49d9-8be6-eabfbc4aec17",
      "name": "Sticky Note Group 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        105,
        248
      ],
      "parameters": {
        "width": 430,
        "height": 264,
        "content": "## Step 1: Ingestion\nReceives and formats the request."
      }
    },
    {
      "id": "e9898219-fcaa-4c86-bd80-d28bbc1864a0",
      "name": "Sticky Note Group 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        572,
        248
      ],
      "parameters": {
        "width": 616,
        "height": 264,
        "content": "## Step 2: Availability\nChecks calendar availability and returns immediate response."
      }
    },
    {
      "id": "ac7ca2be-1159-4311-bc12-e495d4a5fea3",
      "name": "Sticky Note Group 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1244,
        126
      ],
      "parameters": {
        "width": 616,
        "height": 482,
        "content": "## Step 3: Approval & Booking\nHandles manual approval and booking."
      }
    }
  ],
  "connections": {
    "Is approved?": {
      "main": [
        [
          {
            "node": "Book Appointment",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Appointment Failed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Availability": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Slot Available?": {
      "main": [
        [
          {
            "node": "Get Approval (HR) [1 hour wait]",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "End - Slot Busy",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Respond to Webhook": {
      "main": [
        [
          {
            "node": "Is Slot Available?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format appointment data": {
      "main": [
        [
          {
            "node": "Check Availability",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive appointment request": {
      "main": [
        [
          {
            "node": "Format appointment data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Approval (HR) [1 hour wait]": {
      "main": [
        [
          {
            "node": "Is approved?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}