This workflow corresponds to n8n.io template #7042 — we link there as the canonical source.
This workflow follows the Emailsend → HTTP Request recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "2IRMZQsCHLw3s6RW",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Student Absence Alerts & Attendance Tracking Automation",
"tags": [],
"nodes": [
{
"id": "50cc2f6f-e04f-4852-9b42-1247f72995ab",
"name": "Daily Attendance Check - 10:30 AM",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
40,
500
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 10,
"triggerAtMinute": 30
}
]
}
},
"typeVersion": 1.2
},
{
"id": "9bb5b16b-c820-4c62-aec5-56588dc1fdb8",
"name": "Read Today's Attendance",
"type": "n8n-nodes-base.microsoftExcel",
"position": [
260,
400
],
"parameters": {
"filters": {
"fields": [
{
"value": "={{new Date().toISOString().split('T')[0]}}",
"column": "Date"
}
]
},
"resource": "worksheet",
"workbook": {
"__rl": true,
"mode": "id",
"value": "=attendance-workbook"
}
},
"credentials": {
"microsoftExcelOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 2
},
{
"id": "64bec200-5b08-45be-ba98-0a810910dce5",
"name": "Read Student Contacts",
"type": "n8n-nodes-base.microsoftExcel",
"position": [
260,
600
],
"parameters": {
"filters": {},
"resource": "worksheet",
"workbook": {
"__rl": true,
"mode": "id",
"value": "=student-records-workbook"
}
},
"credentials": {
"microsoftExcelOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 2
},
{
"id": "abfdb5ea-24d9-4f08-8150-0f8c7258f829",
"name": "Process Absent Students",
"type": "n8n-nodes-base.code",
"position": [
480,
500
],
"parameters": {
"jsCode": "const attendanceRecords = $('Read Today\\'s Attendance').all();\nconst studentContacts = $('Read Student Contacts').all();\n\nconst absentStudents = [];\nconst today = new Date().toISOString().split('T')[0];\n\nfor (const record of attendanceRecords) {\n const attendance = record.json;\n \n if (attendance.status === 'Absent' && !attendance.excused) {\n const student = studentContacts.find(s => s.json.studentId === attendance.studentId);\n \n if (student) {\n const studentData = student.json;\n \n // Calculate recent absence pattern (last 30 days)\n const recentAbsences = attendanceRecords.filter(r => {\n const recordDate = new Date(r.json.date);\n const thirtyDaysAgo = new Date();\n thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30);\n return r.json.studentId === attendance.studentId && \n r.json.status === 'Absent' && \n recordDate >= thirtyDaysAgo;\n }).length;\n \n absentStudents.push({\n studentId: attendance.studentId,\n studentName: studentData.studentName,\n className: studentData.className,\n parentName: studentData.parentName,\n parentEmail: studentData.parentEmail,\n parentPhone: studentData.parentPhone,\n absentDate: today,\n recentAbsences: recentAbsences,\n attendanceRate: Math.round(((30 - recentAbsences) / 30) * 100),\n alertLevel: recentAbsences >= 5 ? 'High' : recentAbsences >= 3 ? 'Medium' : 'Low'\n });\n }\n }\n}\n\nreturn absentStudents.map(item => ({ json: item }));"
},
"typeVersion": 2
},
{
"id": "d4606ae7-8ac2-4648-bf59-caa601ac1b22",
"name": "Prepare Absence Email",
"type": "n8n-nodes-base.code",
"position": [
700,
300
],
"parameters": {
"jsCode": "const studentData = $input.first().json;\n\nconst alertIcon = studentData.alertLevel === 'High' ? '\ud83d\udea8' : studentData.alertLevel === 'Medium' ? '\u26a0\ufe0f' : '\u2139\ufe0f';\n\nconst emailSubject = `${alertIcon} Absence Alert: ${studentData.studentName} - ${studentData.absentDate}`;\nconst emailBody = `Dear ${studentData.parentName},\n\nWe are writing to inform you that ${studentData.studentName} was marked absent today (${studentData.absentDate}).\n\nAttendance Summary:\n- Student: ${studentData.studentName}\n- Class: ${studentData.className}\n- Absent Date: ${studentData.absentDate}\n- Recent Absences (30 days): ${studentData.recentAbsences}\n- Attendance Rate: ${studentData.attendanceRate}%\n- Alert Level: ${studentData.alertLevel}\n\n${studentData.alertLevel === 'High' ? \n '\u26a0\ufe0f ATTENTION: Your child has exceeded the acceptable absence limit. Please contact the school office immediately to discuss this matter.' :\n studentData.alertLevel === 'Medium' ? \n '\ud83d\udccb NOTICE: Your child\\'s attendance needs attention. Please ensure regular attendance to avoid academic impact.' :\n '\ud83d\udcdd INFORMATION: This is a routine absence notification. Please ensure your child attends school regularly.'}\n\nIf this absence was due to illness or other valid reason, please contact the school office with appropriate documentation.\n\nFor attendance concerns, contact: user@example.com or (555) 123-4567\n\nBest regards,\nSchool Attendance Office`;\n\nreturn [{\n json: {\n to: studentData.parentEmail,\n subject: emailSubject,\n body: emailBody,\n studentName: studentData.studentName,\n parentName: studentData.parentName,\n alertLevel: studentData.alertLevel\n }\n}];"
},
"typeVersion": 2
},
{
"id": "902d1502-2d1e-43d0-b41f-4b2ce68298ac",
"name": "Prepare Absence SMS",
"type": "n8n-nodes-base.code",
"position": [
700,
700
],
"parameters": {
"jsCode": "const studentData = $input.first().json;\n\nconst alertEmoji = studentData.alertLevel === 'High' ? '\ud83d\udea8' : studentData.alertLevel === 'Medium' ? '\u26a0\ufe0f' : '\ud83d\udccb';\n\nconst whatsappMessage = `${alertEmoji} *Absence Alert*\\n\\nDear ${studentData.parentName},\\n\\n\ud83d\udc64 Student: *${studentData.studentName}*\\n\ud83c\udfeb Class: ${studentData.className}\\n\ud83d\udcc5 Absent Date: ${studentData.absentDate}\\n\\n\ud83d\udcca *Attendance Summary:*\\n\u2022 Recent Absences (30 days): ${studentData.recentAbsences}\\n\u2022 Attendance Rate: ${studentData.attendanceRate}%\\n\u2022 Alert Level: *${studentData.alertLevel}*\\n\\n${studentData.alertLevel === 'High' ? \n '\ud83d\udea8 *URGENT:* Please contact school office immediately regarding excessive absences.' :\n studentData.alertLevel === 'Medium' ? \n '\u26a0\ufe0f *ATTENTION:* Please ensure regular attendance to avoid academic impact.' :\n '\ud83d\udcdd *NOTICE:* Routine absence notification. Please ensure regular attendance.'}\n\nIf excused, please contact school office with documentation.\\n\\n\ud83d\udcde Contact: (555) 123-4567\\n\ud83d\udce7 user@example.com\\n\\n_School Attendance Office_`;\n\nreturn [{\n json: {\n phone: studentData.parentPhone,\n message: whatsappMessage,\n studentName: studentData.studentName,\n parentName: studentData.parentName,\n alertLevel: studentData.alertLevel\n }\n}];"
},
"typeVersion": 2
},
{
"id": "14d0d2c1-9082-4ba6-ab6f-cccefb2b7b35",
"name": "Send Absence Email",
"type": "n8n-nodes-base.emailSend",
"position": [
920,
300
],
"parameters": {
"text": "={{$json.body}}",
"options": {},
"subject": "={{$json.subject}}",
"toEmail": "={{$json.to}}",
"fromEmail": "user@example.com",
"emailFormat": "text"
},
"credentials": {
"smtp": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
},
{
"id": "0fabc892-b164-4a89-bf2c-41474484e012",
"name": "Send Absence WhatsApp",
"type": "n8n-nodes-base.httpRequest",
"position": [
920,
700
],
"parameters": {
"url": "https://graph.facebook.com/v17.0/FROM_PHONE_NUMBER_ID/messages",
"options": {},
"jsonBody": "={\n \"messaging_product\": \"whatsapp\",\n \"to\": \"{{ $json.phone }}\",\n \"type\": \"text\",\n \"text\": {\n \"body\": \"{{ $json.message }}\"\n }\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_TOKEN_HERE"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "d483ca47-cd98-423b-8a34-ef7360e18677",
"name": "Generate Attendance Report",
"type": "n8n-nodes-base.code",
"position": [
700,
500
],
"parameters": {
"jsCode": "const absentStudents = $input.all();\nconst today = new Date().toISOString().split('T')[0];\n\nconst attendanceReport = {\n date: today,\n totalAbsences: absentStudents.length,\n highAlerts: absentStudents.filter(s => s.json.alertLevel === 'High').length,\n mediumAlerts: absentStudents.filter(s => s.json.alertLevel === 'Medium').length,\n lowAlerts: absentStudents.filter(s => s.json.alertLevel === 'Low').length,\n averageAttendanceRate: Math.round(\n absentStudents.reduce((sum, s) => sum + s.json.attendanceRate, 0) / absentStudents.length\n ),\n studentsAtRisk: absentStudents.filter(s => s.json.recentAbsences >= 5).map(s => ({\n studentName: s.json.studentName,\n className: s.json.className,\n recentAbsences: s.json.recentAbsences,\n attendanceRate: s.json.attendanceRate\n }))\n};\n\nreturn [{ json: attendanceReport }];"
},
"typeVersion": 2
},
{
"id": "a1e55a21-3a65-4249-a613-703291679483",
"name": "Save Attendance Report",
"type": "n8n-nodes-base.microsoftExcel",
"position": [
920,
500
],
"parameters": {
"options": {},
"dataMode": "autoMap",
"resource": "worksheet",
"workbook": {
"__rl": true,
"mode": "id",
"value": "=attendance-reports-workbook"
},
"operation": "append",
"worksheet": {
"__rl": true,
"mode": "id",
"value": "=w234t5yhyt43e"
}
},
"credentials": {
"microsoftExcelOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 2
},
{
"id": "0e92d559-fcb7-4f32-83cb-645bdfd6c32e",
"name": "Workflow Info",
"type": "n8n-nodes-base.stickyNote",
"position": [
-300,
-40
],
"parameters": {
"color": 5,
"width": 360,
"height": 500,
"content": "### **Absence Tracking Workflow**\n\n**\ud83d\udd59 Schedule:** Daily at 10:30 AM\n\n**\ud83d\udcca Process:**\n1. Check today's attendance records\n2. Identify absent students (unexcused)\n3. Calculate 30-day absence patterns\n4. Send alerts via Email & WhatsApp\n5. Generate daily attendance reports\n\n**\ud83d\udea6 Alert Levels:**\n- **High (\ud83d\udea8):** 5+ absences in 30 days\n- **Medium (\u26a0\ufe0f):** 3-4 absences in 30 days \n- **Low (\ud83d\udccb):** 1-2 absences in 30 days\n\n**\ud83d\udcc8 Tracking:**\n- Attendance rates calculation\n- Pattern analysis\n- Risk identification\n- Historical reporting"
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "36d284ba-f45d-484e-a7a3-cee26d0160c1",
"connections": {
"Prepare Absence SMS": {
"main": [
[
{
"node": "Send Absence WhatsApp",
"type": "main",
"index": 0
}
]
]
},
"Prepare Absence Email": {
"main": [
[
{
"node": "Send Absence Email",
"type": "main",
"index": 0
}
]
]
},
"Read Student Contacts": {
"main": [
[
{
"node": "Process Absent Students",
"type": "main",
"index": 0
}
]
]
},
"Process Absent Students": {
"main": [
[
{
"node": "Prepare Absence Email",
"type": "main",
"index": 0
},
{
"node": "Prepare Absence SMS",
"type": "main",
"index": 0
},
{
"node": "Generate Attendance Report",
"type": "main",
"index": 0
}
]
]
},
"Read Today's Attendance": {
"main": [
[
{
"node": "Process Absent Students",
"type": "main",
"index": 0
}
]
]
},
"Generate Attendance Report": {
"main": [
[
{
"node": "Save Attendance Report",
"type": "main",
"index": 0
}
]
]
},
"Daily Attendance Check - 10:30 AM": {
"main": [
[
{
"node": "Read Today's Attendance",
"type": "main",
"index": 0
},
{
"node": "Read Student Contacts",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
microsoftExcelOAuth2Apismtp
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Automatically alerts parents about student absences and tracks 30-day attendance patterns to identify risks and trends.
Source: https://n8n.io/workflows/7042/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Enhance financial oversight with this automated n8n workflow. Triggered every 5 minutes, it fetches real-time bank transactions via an API, enriches and transforms the data, and applies smart logic to
This workflow automates competitive price intelligence using Bright Data's enterprise web scraping API. On a scheduled basis (default: daily at 9 AM), the system loops through configured competitor pr
This n8n workflow proactively scans and aggregates threat intelligence, network logs, and vulnerability data every 15 minutes to detect emerging risks across the infrastructure. It analyzes anomalies,
SEO managers, content marketers, bloggers, and growth teams who want to automatically catch declining content performance before it's too late — without manually checking Google Search Console every w
Get ==Instant== Alerts When Your Website Goes Down — Using ==n8n== as ==Website Downtime Checker Robot==