Geofenced Student Activity Tracker via iOS Automation - n8n Workflow

Automate student arrival tracking using a robust n8n workflow. This automation logs geofence activity to Google Sheets and sends real-time email alerts to teachers and parents.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

School administrators needing automated attendance tracking.
Parents who want real-time notification of their child's arrival at school.
IT professionals looking for advanced, webhook-based n8n templates for location services integration.
Users setting up complex geofence monitoring systems using iOS Shortcuts and a custom n8n workflow.

Overview

The "Geofenced Student Activity Tracker" is a critical n8n workflow designed to bridge the gap between physical location tracking (typically via an iOS Shortcut triggered by geofencing) and automated data logging/notification systems. This sophisticated n8n workflow eliminates manual check-ins by using a secure webhook n8n trigger to receive location updates in real-time. Once the data is received, the automation intelligently processes the activity (arrival vs. departure) and the location (School Campus). If a student arrives at the specific location, the data is instantly logged into a Google Sheet for reporting, and simultaneous email notifications are dispatched to relevant parties (parents and teachers). This specific n8n workflow demonstrates the power of combining mobile device automation with powerful server-side processing provided by the n8n node network.

How it Works

This n8n workflow is initiated by the Location Update Webhook n8n trigger, which must be configured in an external service (like an iOS Shortcut automation) to fire a POST request upon a student entering or exiting a geofenced area.


  1. Trigger and Data Ingestion: The n8n trigger (Webhook) receives the payload containing student details, location coordinates, and the activitytype (e.g., "arrived").

  2. Data Standardization: The Process Location Data n8n node standardizes the payload, extracting key fields and appending the current date and time using n8n expressions.

  3. Arrival Check: The Student Arrived? n8n node uses an If condition to check if the activitytype is "arrived". If true, the flow proceeds to logging. If false, the process stops (or skips logging and notification).

  4. Data Logging: For arrivals, the Log School Arrival n8n node sends an HTTP request to the Google Sheets API to append the standardized student data to the designated spreadsheet. This step relies on a configured Google Sheets credential in your n8n environment.

  5. Location Confirmation: The At School? n8n node performs a final safety check, ensuring that the reported location_name specifically matches "School Campus" before sending sensitive notifications.

  6. Notifications: If confirmed at school, the flow executes two parallel actions: Notify Teacher and Notify Parent using the Email Send n8n node, sending immediate alerts.

  7. Webhook Response: Finally, the Success Response n8n node sends a clean JSON success message back to the originating device, completing the communication loop for this robust n8n workflow.

Installation Guide

To use this n8n workflow template effectively, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON and import it into your n8n instance via the "New" menu -> "Import from JSON".

  2. Activate the n8n Trigger: In the Location Update Webhook n8n node, save the workflow to generate a unique Webhook URL. This URL is the target endpoint for your external geofencing automation (e.g., the iOS Shortcut). The expected path is /student-location.

  3. Configure Google Sheets:

Open the Log School Arrival n8n node.
Update the URL to include your specific Google Sheet ID (YOURSHEETID).
Set up a Google Sheets OAuth2 API credential if you haven't already and select it in the n8n node.

  1. Configure Email Credentials:

In the Notify Teacher and Notify Parent n8n nodes, set up and select your desired SMTP credential.
* Update the toEmail fields with the actual parent and teacher email addresses.

  1. Final Activation: Ensure the n8n workflow is marked as "Active" to listen for the incoming geofence data via the n8n trigger. Testing this n8n template requires sending a correctly structured POST payload to the webhook URL.

Node Details

This custom n8n workflow leverages several core n8n node types:

Location Update Webhook (n8n trigger):
Function: Serves as the starting n8n trigger, awaiting a POST request from the external geofencing system (iOS Shortcut).
Key Configuration: Path is set to /student-location.
Process Location Data (Set n8n node):
Function: Cleans and formats the incoming webhook data, extracting student identifiers, location data, and adding current timestamp variables ($now).
Key Configuration: Uses expressions like ={{ $json.body.studentname }} to map incoming data and standardizes date/time formats.
Student Arrived? (If n8n node):
Function: Controls the flow path, checking if the received activity
type is "arrived". Only proceeds if the condition is met.
Key Configuration: Condition checks if activitytype exactly equals arrived.
Log School Arrival (HTTP Request n8n node):
Function: Executes the API call to Google Sheets to write the arrival record. This uses a standard n8n node for interfacing with external APIs.
Key Configuration: URL is configured for the Google Sheets API append method, requiring sheet ID and a valid Google Sheets OAuth2 credential.
At School? (If n8n node):
Function: A secondary filter to ensure notifications are only sent if the confirmed location is "School Campus".
Key Configuration: Checks if locationname equals School Campus.
Notify Teacher / Notify Parent (Email Send n8n node):
Function: Sends customized email alerts to stakeholders using configured SMTP credentials within the n8n workflow.
Key Configuration: Requires configured SMTP credentials and defined toEmail addresses (e.g., [email protected], [email protected]).
Success Response (Respond To Webhook n8n node):
Function: Provides a structured, immediate confirmation back to the triggering device, ensuring the device knows the n8n workflow executed successfully.
* Key Configuration: Responds with a custom JSON body containing extracted student data.

Related n8n Workflows

Free

Nodes: 7 Nodes
Updated: December 26 2025
View all
Created by

The AI Squad Initiative is a pioneering effort to build, automate and scale AI-powered workflows using n8n.io. Our mission is to help individuals and businesses integrate AI agents seamlessly into their daily operations from automating tasks and enhancing productivity to creating innovative, intelligent solutions. We design modular, reusable AI workflow templates that empower creators, developers and teams to supercharge their automation with minimal effort and maximum impact.

Featured*