Skip to main content

Grade PDF assignments with Google Gemini and upload reports to Google Drive

Workflow preview

Workflow preview
100%
Grade PDF assignments with Google Gemini and upload reports to Google Drive preview
Open on n8n.io

1. Workflow Overview

AI Assignment Grader with Automated Reporting Who’s it for This workflow is designed for educators, professors, academic institutions, coaching centers, and edtech platforms that want to automate t...

Best for

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

Tools used

n8n-nodes-base.webhook, n8n-nodes-base.extractfromfile, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.code, n8n-nodes-base.converttofile, @n8n/n8n-nodes-langchain.lmchatgooglegemini

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Grade PDF assignments with Google Gemini and upload reports to Google Drive
Workflow name
Grade PDF assignments with Google Gemini and upload reports to Google Drive

AI Assignment Grader with Automated Reporting

Who’s it for

This workflow is designed for educators, professors, academic institutions, coaching centers, and edtech platforms that want to automate the grading of written assignments or test papers. It’s ideal for scenarios where consistent evaluation, detailed feedback, and structured result storage are required without manual effort.


What it does / How it works

This workflow automates the end-to-end grading process for student assignments submitted as PDFs.

  1. A student’s test paper is uploaded via a webhook endpoint.
  2. The workflow extracts text from the uploaded PDF file.
  3. Student metadata (name, assignment title) is prepared and combined with the extracted answers.
  4. A predefined answer script (model answers with marking scheme) is loaded into the workflow.
  5. An AI grading agent powered by Gemini compares the student’s responses against the answer script.
  6. The AI:
  • Evaluates each question
  • Assigns marks based on correctness and completeness
  • Generates per-question feedback
  • Calculates total marks, percentage, and grade
  1. The structured grading output is converted into:
  • An HTML grading report
  • A CSV file for records
  1. The final CSV grading report is automatically uploaded to Google Drive for storage and sharing.

All grading logic runs automatically once the test paper is submitted.


Requirements

  • Google Gemini (PaLM) API credentials
  • Google Drive OAuth2 credentials
  • A webhook endpoint configured in n8n
  • PDF test papers submitted in a supported format
  • A predefined answer script with marks per question

How to set up

  1. Connect your Google Gemini credentials in n8n.
  2. Connect your Google Drive account and select the destination folder.
  3. Enable and copy the webhook URL for test paper uploads.
  4. Customize the Load Answer Script node with your assignment’s correct answers and marking scheme.
  5. (Optional) Adjust grading instructions or output format in the AI Agent prompt.
  6. Test the workflow by uploading a sample PDF assignment.

How to customize the workflow

  • Update the AI grading rubric to be stricter or more lenient.
  • Modify feedback style (short comments vs detailed explanations).
  • Change grading scales, total marks, or grade boundaries.
  • Store results in additional systems (LMS, database, email notifications).
  • Add plagiarism checks or similarity scoring before grading.
  • Generate PDF reports instead of CSV/HTML if required.

This workflow enables fast, consistent, and scalable assignment grading while giving students clear, structured feedback and educators reliable records.

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 - Webhook - Upload Test Paper

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

Block 2 - Extract Text from Test Paper

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

Block 3 - Prepare Assignment Data

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 4 - Load Answer Script

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 5 - AI Agent - Grade Assignment

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 6 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.2

Block 7 - Generate Results Table

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

Block 8 - Convert to CSV File

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

Block 9 - Prepare CSV Data

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 10 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 11 - Upload file

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

Block 12 - Sticky Note

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

Block 13 - Sticky Note1

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

Block 14 - Sticky Note2

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

Block 15 - Sticky Note3

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

3. Summary Table

Workflow Grade PDF assignments with Google Gemini and upload reports to Google Drive
Complexity advanced
Nodes 15
Categories Document Extraction, AI Summarization
Author Pixcels Themes
Published 02 Mar 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13806/13806.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 Grade PDF assignments with Google Gemini and upload reports to Google Drive do?

AI Assignment Grader with Automated Reporting Who’s it for This workflow is designed for educators, professors, academic institutions, coaching centers, and edtech platforms that want to automate t...

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.