π¬ Generate weekly student progress reports with Gemini, Supabase, and WhatsApp
β‘ 27 views Β· π¬ Document Extraction & Analysis
Description
Quick overview
This workflow runs weekly to pull student attendance and score data from Supabase, uses Google Gemini to generate per-student performance summaries and attention flags, sends immediate WhatsApp alerts for flagged students, then compiles all summaries into a PDF report, uploads it, and shares it with the coach via WhatsApp.
How it works
- Runs weekly on a schedule.
- Fetches all student weekly metrics (attendance and scores) from Supabase.
- Uses Google Gemini to write a short performance summary per student and determine whether the student should be flagged for attention based on attendance and score-drop rules.
- If a student is flagged, sends a WhatsApp message to the coach and inserts a flag record into Supabase.
- Aggregates all studentsβ summaries into a single HTML weekly report.
- Converts the HTML report to a PDF via an HTTP-based HTML-to-PDF API, uploads the PDF to a file-hosting API, and sends the PDF link/document to the coach via WhatsApp.
- Logs the report URL to Supabase for recordkeeping.
Setup
- Add Supabase credentials and create the required tables/columns (weekly_student_data, attention_flags, and weekly_reports) referenced by the workflow.
- Add a Google Gemini (PaLM) API credential for the chat model used to generate summaries and flags.
- Add WhatsApp Business Cloud credentials, and set your WhatsApp phone number ID and the coachβs recipient number in the configuration values.
- Provide an HTML-to-PDF API endpoint and API key, plus a file upload/hosting API endpoint and API key, and update the configuration fields accordingly.
- Confirm the upload API response field used for the public file URL (assumed to be
url) and adjust the workflow if your provider returns a different field. - Set the preferred day/time in the weekly schedule trigger and activate the workflow.
π Nodes Used
HTTP Request, Supabase, WhatsApp Business Cloud, Schedule Trigger, Basic LLM Chain, Structured Output Parser
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File