Monitor at-risk students with Google Sheets, GPT-4o, Gmail, Slack and Telegram

Go to Workflow
0 views
Built by Rahul Joshi Rahul Joshi
Created on August 19, 2026

Description

Quick overview
This workflow runs weekly to read student performance data from Google Sheets, calculates a risk index and trend, generates personalised nudge messages with OpenAI for high-risk students, posts a teacher digest to Slack and Telegram, and logs weekly snapshots back to Google Sheets.

How it works
Runs every week on a schedule trigger.
Reads all student records from a Google Sheets “Student Data” worksheet.
Calculates attendance, assignment completion, average test score, risk index, risk level (HIGH/MEDIUM/LOW), and a week-to-week score trend for each student.
Sends HIGH-risk students to OpenAI (GPT-4o mini) to generate a short, encouraging WhatsApp-style nudge message and emails the generated message via Gmail.
Builds a weekly digest of all HIGH and MEDIUM risk students and posts it to a Slack channel and a Telegram chat.
Appends a dated snapshot of each student’s metrics and risk label to a Google Sheets “Log Trend” worksheet for historical tracking.
If the workflow fails, an error trigger posts an alert to Slack with a basic failure message.

Setup
Connect Google Sheets OAuth2 credentials and replace the spreadsheet ID and worksheet names/IDs used for “Student Data” and “Log Trend.”
Add an OpenAI credential for the OpenAI node (GPT-4o mini) and adjust the prompt text if you want different message tone or constraints.
Connect Gmail OAuth2 credentials and set the email recipient(s) for the student nudge emails.
Connect Slack OAuth2 credentials and set the target channel(s) for both the teacher digest and error alerts.
Add Telegram bot credentials and set the target chat ID for the Telegram digest message.
Update the schedule trigger to match your reporting cadence (the default runs weekly at 7:00).

Nodes Used (6)

Code
n8n-nodes-base.code
Gmail
n8n-nodes-base.gmail
Google Sheets
n8n-nodes-base.googleSheets
OpenAI
@n8n/n8n-nodes-langchain.openAi
Slack
n8n-nodes-base.slack
Telegram
n8n-nodes-base.telegram