Skip to main content

Generate school report card PDFs and email them to parents with Gmail

Workflow preview

Workflow preview
100%
Generate school report card PDFs and email them to parents with Gmail preview
Open on n8n.io

1. Workflow Overview

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 ...

Best for

  • Document Extraction automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.splitinbatches, n8n-nodes-base.if, n8n-nodes-base.code, n8n-nodes-base.datatable, n8n-nodes-htmlcsstopdf.htmlcsstopdf, n8n-nodes-base.gmail, n8n-nodes-base.wait

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Jitesh Dugar.

Original n8n.io source

1.1 Workflow description

Title
Generate school report card PDFs and email them to parents with Gmail
Workflow name
Generate school report card PDFs and email them to parents with Gmail

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.

  • Used for testing and manual execution
  • Can be replaced with:
  • Cron (scheduled runs)
  • Webhook (trigger via form submission)

2. 📥 Get row(s) (Data Table)

Fetches student records from the n8n Data Table.

  • Filters only rows where Status is empty
  • Ensures only students who haven't received reports are processed
  • Acts as the primary data source

3. 🔁 Loop Over Students (Split In Batches)

Processes students one at a time.

  • Prevents overload and improves stability
  • Useful for handling large datasets
  • Enables controlled execution flow

4. 🚫 Skip Already Sent (IF Node)

Checks if a report has already been sent.

  • Condition: Status != "Sent"
  • If already sent → skips the record
  • Prevents duplicate emails and reprocessing

5. 📊 Calculate Grade and Remarks (Code Node)

Core logic of the workflow.

What it does:

  • Extracts subject marks
  • Calculates:
  • Total marks
  • Maximum marks
  • Percentage
  • Assigns grade based on percentage:
  • A+, A, B, C, D
  • Generates:
  • Dynamic teacher remarks
  • Subject-wise pass/fail status
  • Attendance evaluation

Why it's powerful:

  • Fully dynamic logic
  • Easy to customize grading system
  • Adds intelligence to raw data

6. 🧾 Build HTML Report Card (Code Node)

Generates a complete report card UI using HTML + CSS.

Includes:

  • School header
  • Student details
  • Subject-wise table
  • Total marks & grade
  • Attendance stats
  • Teacher remarks
  • Signature section

Output:

  • Clean HTML string
  • Styled for A4 PDF export

7. 📄 Convert HTML to PDF (HTML to PDF Node)

Converts the generated HTML into a downloadable PDF.

  • Uses external API (e.g., HTML to PDF)
  • Returns a public PDF URL
  • Ensures consistent formatting across devices

8. 📧 Send a Message to Parents (Gmail Node)

Sends the report card to parents via email.

Email includes:

  • Personalized greeting
  • Student name & exam details
  • Quick performance summary
  • Link to download/view PDF

9. ⏱️ Wait 3 Seconds (Wait Node)

Introduces a delay between emails.

  • Prevents API rate limits
  • Improves deliverability
  • Important when sending bulk emails

10. ✅ Update row(s) (Data Table)

Updates the student record after successful delivery.

Updates:

  • Report_URL → PDF link
  • Sent_At → timestamp
  • Status → "Sent"

Purpose:

  • Ensures tracking
  • Prevents duplicate processing
  • Maintains clean workflow state

💡 Key Features

  • 🎯 Fully automated end-to-end workflow
  • 🧠 Smart grading and remark generation
  • 🧾 Professional PDF report card design
  • 🔁 Duplicate-safe processing
  • 📦 Scalable for bulk operations
  • 🛠️ Easily customizable

🧩 Requirements

  • n8n Data Table (or Google Sheets alternative)
  • Gmail OAuth2 credentials
  • HTML → PDF API (HTML to PDF)

🛠️ Customization Ideas

  • Add WhatsApp delivery (Twilio / Exotel)
  • Add school branding (logo, colors)
  • Include rank, topper list, or analytics
  • Replace manual trigger with webhook/form

🎯 Use Cases

  • Schools & educational institutions
  • Coaching centers
  • EdTech platforms
  • Automated reporting systems

🔥 Pro Tip

You can turn this into a SaaS product by:

  • Adding a frontend form for schools
  • Connecting a database (Supabase / Airtable)
  • Charging per student/report generated

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Run Workflow Manually

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Loop Over Students

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 3 - Skip Already Sent

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 4 - Calculate Grade and Remarks

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - Build HTML Report Card

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 6 - Get row(s)

Type / Role
n8n-nodes-base.dataTable - dataTable
Config choices
Version 1.1

Block 7 - Convert HTML to PDF

Type / Role
n8n-nodes-htmlcsstopdf.htmlcsstopdf - htmlcsstopdf
Config choices
Version 1

Block 8 - Update row(s)

Type / Role
n8n-nodes-base.dataTable - dataTable
Config choices
Version 1.1

Block 9 - Send a message to Parents

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.2

Block 10 - Wait 3 Seconds

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 11 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky Note8

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note9

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note10

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Generate school report card PDFs and email them to parents with Gmail
Complexity advanced
Nodes 21
Categories Document Extraction, AI Summarization
Author Jitesh Dugar
Published 23 Apr 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15258/15258.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Generate school report card PDFs and email them to parents with Gmail do?

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 ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, AI Summarization use case.