πŸ”¬ Generate school report card PDFs and email them to parents with Gmail

⚑ 146 views Β· πŸ”¬ Document Extraction & Analysis

Description

This n8n workflow automates the complete lifecycle of student report card generation β€” from fetching raw marks data to delivering polished PDF reports directly to parents via email.

It is designed to be scalable, idempotent, and production-ready, making it suitable for schools, coaching institutes, and EdTech platforms.


πŸ”„ Workflow Overview

The workflow follows a structured pipeline:

  1. Fetch student data
  2. Filter and loop through records
  3. Calculate results and generate report
  4. Convert to PDF
  5. Send email
  6. Update database

🧠 Node-by-Node Explanation

1. ▢️ Run Workflow Manually (Manual Trigger)

This is the starting point of the workflow.


2. πŸ“₯ Get row(s) (Data Table)

Fetches student records from the n8n Data Table.


3. πŸ” Loop Over Students (Split In Batches)

Processes students one at a time.


4. 🚫 Skip Already Sent (IF Node)

Checks if a report has already been sent.


5. πŸ“Š Calculate Grade and Remarks (Code Node)

Core logic of the workflow.

What it does:

Why it’s powerful:


6. 🧾 Build HTML Report Card (Code Node)

Generates a complete report card UI using HTML + CSS.

Includes:

Output:


7. πŸ“„ Convert HTML to PDF (HTML to PDF Node)

Converts the generated HTML into a downloadable PDF.


8. πŸ“§ Send a Message to Parents (Gmail Node)

Sends the report card to parents via email.

Email includes:


9. ⏱️ Wait 3 Seconds (Wait Node)

Introduces a delay between emails.


10. βœ… Update row(s) (Data Table)

Updates the student record after successful delivery.

Updates:

Purpose:


πŸ’‘ Key Features


🧩 Requirements


πŸ› οΈ Customization Ideas


🎯 Use Cases


πŸ”₯ Pro Tip

You can turn this into a SaaS product by:

πŸ”— Nodes Used

Gmail, Data table

πŸ“₯ Import

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

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