{
  "name": "Dental Calendly Booking + Confirmation",
  "nodes": [
    {
      "parameters": { "rule": "incomingWebhook" },
      "id": "calendly-webhook",
      "name": "Calendly Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "position": [250, 300]
    },
    {
      "parameters": {
        "url": "https://autostack-17.polsia.app/api/calendar/webhook",
        "method": "POST",
        "bodyParameters": {
          "parameters": [
            { "name": "event_uri", "value": "={{ $json.event_uri }}" },
            { "name": "invitee_name", "value": "={{ $json.invitee_name }}" },
            { "name": "invitee_email", "value": "={{ $json.invitee_email }}" },
            { "name": "event_start_time", "value": "={{ $json.event_start_time }}" },
            { "name": "event_type", "value": "={{ $json.event_type }}" }
          ]
        }
      },
      "id": "book-appointment",
      "name": "Book Appointment in DB",
      "type": "n8n-nodes-base.httpRequest",
      "position": [500, 300]
    },
    {
      "parameters": {
        "url": "https://autostack-17.polsia.app/api/calendar/confirm-email",
        "method": "POST",
        "bodyParameters": {
          "parameters": [
            { "name": "appointment_id", "value": "={{ $json.appointment_id }}" }
          ]
        }
      },
      "id": "send-confirmation",
      "name": "Send Confirmation Email",
      "type": "n8n-nodes-base.httpRequest",
      "position": [750, 300]
    }
  ],
  "connections": {
    "Calendly Webhook Trigger": { "main": [[{ "node": "Book Appointment in DB", "type": "main" }]] },
    "Book Appointment in DB": { "main": [[{ "node": "Send Confirmation Email", "type": "main" }]] }
  },
  "settings": {},
  "description": "Imports into n8n: receives Calendly booking webhook, saves appointment to AutoStack DB, triggers confirmation email"
}