{
  "name": "Track student arrival with iOS automation, Google Sheets & email alerts",
  "nodes": [
    {
      "id": "28447b9c-fdd0-4588-82e0-54d4d65c8ca9",
      "name": "Location Update Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1600,
        -120
      ]
    },
    {
      "id": "a88c48d7-d3f5-4413-9ff6-b461cdbe1152",
      "name": "Process Location Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -1380,
        -120
      ]
    },
    {
      "id": "1f15187f-8602-4ba2-a3fb-7b5a8828c4cb",
      "name": "Student Arrived?",
      "type": "n8n-nodes-base.if",
      "position": [
        -1160,
        -120
      ]
    },
    {
      "id": "856b5882-61c2-451c-ab3f-8d2750ecc564",
      "name": "Log School Arrival",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -940,
        -120
      ]
    },
    {
      "id": "30800230-2d9c-47c6-b972-13328eef51ff",
      "name": "At School?",
      "type": "n8n-nodes-base.if",
      "position": [
        -720,
        -120
      ]
    },
    {
      "id": "be6abf64-49da-496d-9e83-132b4aafd92c",
      "name": "Notify Teacher",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        -500,
        -220
      ]
    },
    {
      "id": "a9e2767f-fd26-40d2-8b01-d6b6dd07dd53",
      "name": "Notify Parent",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        -500,
        -20
      ]
    },
    {
      "id": "8bf469fa-cb45-46f5-93e8-a31cec898dc8",
      "name": "Success Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -280,
        -120
      ]
    },
    {
      "id": "11654022-f76a-4c16-9572-83890d5feb53",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1640,
        -260
      ],
      "parameters": {
        "width": 180,
        "height": 320,
        "content": "Triggered via iOS Shortcut when student location updates\n"
      }
    },
    {
      "id": "cb2c8940-f1d1-493e-949c-a98ffd13b723",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1400,
        -260
      ],
      "parameters": {
        "width": 180,
        "height": 320,
        "content": "Extracts coordinates and metadata\n"
      }
    },
    {
      "id": "5aff6f9d-a92a-4f9e-803b-4d948a848b50",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1180,
        -260
      ],
      "parameters": {
        "width": 180,
        "height": 320,
        "content": "Checks if student entered school zone\n"
      }
    },
    {
      "id": "8d738c70-8bf6-4989-b18b-34c333a54d19",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -980,
        -260
      ],
      "parameters": {
        "width": 180,
        "height": 320,
        "content": "Adds arrival data to Google Sheet\n"
      }
    },
    {
      "id": "efea3574-c4fc-44cd-a0bc-42d1bfc2c297",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -760,
        -260
      ],
      "parameters": {
        "width": 180,
        "height": 320,
        "content": "Double-checks geofence condition before notifying\n"
      }
    },
    {
      "id": "2bc11c73-917f-4764-8838-f2f5747642bd",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -260
      ],
      "parameters": {
        "width": 180,
        "height": 320,
        "content": "Returns a 200 response to the triggering device\n\n"
      }
    },
    {
      "id": "220a1498-beea-48b8-adc7-58b84b7e811a",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        -400
      ],
      "parameters": {
        "width": 180,
        "height": 540,
        "content": "Sends email if student is confirmed at school\n"
      }
    }
  ],
  "connections": {
    "At School?": {
      "main": [
        [
          {
            "node": "Notify Teacher",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Notify Parent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify Parent": {
      "main": [
        [
          {
            "node": "Success Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify Teacher": {
      "main": [
        [
          {
            "node": "Success Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Student Arrived?": {
      "main": [
        [
          {
            "node": "Log School Arrival",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Log School Arrival": {
      "main": [
        [
          {
            "node": "At School?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Location Data": {
      "main": [
        [
          {
            "node": "Student Arrived?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Location Update Webhook": {
      "main": [
        [
          {
            "node": "Process Location Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}