See llms.txt for all machine-readable content.

Back to Templates

Run a school admin assistant on Telegram with DeepSeek and Google Sheets

Quick overview

Run school admin from one Telegram chat. Teachers report absences and the bot asks free teachers to confirm cover. The principal approves AI-written English and Hindi circulars before parents are emailed, and gets a daily 8am briefing on attendance, fees and substitutions. Everything is logged in Google Sheets.

How it works

  1. Triggers when a message arrives in Telegram or every day at 8am via a schedule.
  2. Looks up the sender in Google Sheets (Users and Teachers) to determine their role, and replies with a registration message if the chat ID is unknown.
  3. Uses DeepSeek to extract the request intent (absence or announcement) and key details from the Telegram message, then routes the request accordingly or sends a help reply.
  4. For absence requests, reads the Timetable and existing Substitutions from Google Sheets, ranks available teachers, and sends Telegram approval prompts to the top candidates per period, escalating to the principal when no one accepts.
  5. Logs confirmed and uncovered periods to the Substitutions sheet in Google Sheets and sends a consolidated cover-plan summary to both the requester and the principal on Telegram.
  6. For announcement requests (Principal/Admin only), uses DeepSeek to draft an English and Hindi circular, asks for Telegram approval, then emails matching parents via Gmail using addresses from the Students sheet and logs the send to the Circulars sheet.
  7. At 8am, reads Students and Substitutions from Google Sheets, calculates attendance/fees/substitution counts, uses DeepSeek to write a formatted briefing, and sends it to the principal on Telegram.

Setup

  1. Create a Telegram bot and add a Telegram API credential in n8n, then message the bot from each staff account and record their Telegram Chat IDs in the Teachers and Users sheets.
  2. Connect Google Sheets OAuth2 credentials and update the sheet ID, tab names, and required columns in the Workflow Config and Google Sheets nodes (Teachers, Users, Students, Timetable, Substitutions, Circulars).
  3. Add a DeepSeek API credential and ensure it is selected for the information extraction, circular drafting, and daily briefing steps.
  4. Add a Gmail OAuth2 credential and update the Gmail “Send To” field to use the recipient email from Google Sheets (or your preferred target) before enabling parent emails.
  5. Set the principal’s Telegram Chat ID in the Users sheet (Role = Principal) and adjust Workflow Config values like attendance threshold, due-soon window, and approval wait time to match your school process.