πŸ”§ Track student attendance from CSV, email parents, and build an HTML dashboard

⚑ 501 views Β· πŸ”§ Miscellaneous

Description

πŸš€ Overview

Automatically monitors daily student attendance from CSV files, identifies absent students, sends parent email alerts via SMTP, calculates risk scores, and generates an interactive HTML dashboard β€” all on a weekday schedule with no manual work needed.


βš™οΈ How it works

  1. Schedule trigger β€” runs Monday–Friday at 17:30
  2. Data ingestion β€” reads student_attendance.csv and filters to today’s records only
  3. Absence check β€” splits students into Absent / Present branches
  4. Contact merge β€” matches absent students with parent data from student_contacts.csv
  5. Alert logic β€” calculates risk level, attendance %, consecutive streak, and trend (Improving / Stable / Worsening)
  6. Parent email β€” sends a colour-coded HTML alert via SMTP for each absent student
  7. Dashboard builder β€” generates dashboard.html with 5 tabs: Today, Weekly, Monthly, Full History, and At-Risk
  8. Report update β€” appends records to attendance_report.csv for historical tracking

πŸ›  Setup steps

  1. Upload student_attendance.csv to the n8n files folder
  2. Upload student_contacts.csv to the n8n files folder
  3. Create an empty attendance_report.csv in the n8n files folder
  4. Add smtp_user in Settings β†’ Variables
  5. Configure SMTP credentials in the Send Email node
  6. Adjust the cron schedule if needed (default: 17:30 Mon–Fri)

πŸ”§ Required CSV formats

student_attendance.csv

StudentIDDateStatusClassSubjectTeacher
S10112-01-2026AbsentGrade 6MathMr Singh

student_contacts.csv

StudentIDParentNameEmailPhone
S101Anita Kumarparent@email.com+919999999999

πŸ“Š Dashboard Preview

Dashboard Preview 1

 Dashboard Preview 2

πŸ”— Nodes Used

Send Email, Spreadsheet File, Schedule Trigger, Filter, Read/Write Files from Disk, Convert to File

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup