Automate Peer Review Assignments with GPT-4.1-nano, Slack, and Email in n8n
Webhook receives student submissions → GPT-4.1-nano generates rubrics → Slack/email notifies reviewers → auto-scores and delivers reports
- Who
- Educators or course administrators managing collaborative student assessments
- You get
- Automatically assign peer reviewers, generate structured rubrics, aggregate scores, and distribute reports
Constraints
Requires an n8n instance; OpenAI API key (gpt-4.1-nano); Gmail account; Slack workspace; PostgreSQL or compatible database; optional external dashboard endpoint. The template uses random numbers to simulate scoring (Calculate Peer Score node); replace with real peer-review data ingestion for production.
What they did
Educator cschin published this workflow template on the n8n official template gallery, demonstrating how to receive student assignment submissions via Webhook, automatically assign 3 peer reviewers, invoke GPT-4.1-nano to generate a structured rubric, notify reviewers via Slack and email, simulate scoring with stored results in PostgreSQL, and ultimately generate an AI assessment report with analytics posted back to Slack. The template includes 22 nodes with full connection mappings.
How it went
The template author states the workflow eliminates manual distribution and ensures consistent evaluation (author_report). The template shows 89 views on n8n.io. This site has not executed or verified the workflow; scoring accuracy and email deliverability in real educational settings are unverified.
Worth knowing
1. The Calculate Peer Score node uses Math.random() to simulate data; it is not a real peer-review collection mechanism. Production requires building a reviewer score-submission entry point (e.g., another Webhook or form). 2. The Email Send node's fromEmail is hardcoded to [email protected] and must be replaced with a real sender address. 3. The Update Dashboard Metrics node points to the placeholder https://dashboard.university.edu/api/metrics and must be replaced with an actual dashboard API. 4. System messages and rubric prompts target engineering education; adapt scoring dimensions for other disciplines. 5. The template specifies gpt-4.1-nano in node parameters, while Scout also tags gpt-4.1 and gpt-4 series; the explicit node parameter is gpt-4.1-nano.
n8n workflow template
Structure checked · Not run-testedUse “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.
Setup and test checklist
Credentials to connect
- OpenAI Model node: connect OpenAI API credentials.
Configuration to replace
- Source template is n8n public workflow #10310 (~22 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
- Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.
Test input and expected output
- Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
- Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.
Template changes
- Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
- No business-logic edits; verify keys, quotas and privacy compliance before use.
Template retrieved: 2026-10-24
Steps
Receive submission and assign reviewers
Configure a Webhook node in n8n (path: peer-assessment, method: POST, response mode: responseNode) to accept submissions containing studentId, studentName, email, assignmentId, assignmentTitle, submissionUrl, and dueDate. Use a Set node to store the data, then a Code node to loop and assign 3 peer reviewers per assignment (circular modulo selection), outputting a reviewers array.
AI generates the review rubric
Connect an AI Agent node (Generate Review Rubric) to an OpenAI Chat Model (gpt-4.1-nano) and a Structured Output Parser. Paste the source prompt into the Agent's text field and set the systemMessage from the source. Execution produces a structured rubric with 5 criteria (Technical Accuracy 25 pts, Problem-solving Approach 25 pts, Documentation Quality 20 pts, Code/Design Quality 20 pts, Innovation and Creativity 10 pts).
Execution prompt · Source text。AI Agent node Generate Review Rubric text field (expression mode)
=You are an expert engineering educator evaluating student assignments. Assignment Title: {{ $json.assignmentTitle }} Student Name: {{ $json.studentName }} Submission: {{ $json.submissionUrl }} Generate a comprehensive peer review rubric with the following criteria: 1. Technical Accuracy (0-25 points) 2. Problem-solving Approach (0-25 points) 3. Documentation Quality (0-20 points) 4. Code/Design Quality (0-20 points) 5. Innovation and Creativity (0-10 points) For each criterion, provide: - Clear evaluation guidelines - Specific examples of excellent, good, and poor performance - Key questions reviewers should ask Total: 100 points Format the rubric in a clear, structured way that peer reviewers can easily follow.Execution prompt · Source text。AI Agent node Generate Review Rubric options.systemMessage field
You are a helpful assistant that creates detailed, fair assessment rubrics for engineering students.
Notify reviewers
Use a Slack node to post to a channel (e.g., #peer-reviews) with student name, assignment title, due date, reviewer list, and submission link. Simultaneously use an Email Send node to email reviewers with the assignment title as subject and the generated rubric embedded in the body (referenced via {{ $('Generate Review Rubric').item.json.output }}). Finally, use a Set node to prepare response data and a Respond to Webhook node to return a JSON confirmation.
Execution prompt · Source text。Slack node Notify on Slack text field (expression mode)
=📚 *New Peer Review Assignment* *Student:* {{ $json.studentName }} *Assignment:* {{ $json.assignmentTitle }} *Due Date:* {{ $json.dueDate }} *Assigned Reviewers:* {{$json.reviewers.map(r => `• ${r.reviewerName} (${r.reviewerEmail})`).join('\n')}} *Submission:* {{ $json.submissionUrl }} 📋 Review rubric has been generated and sent via email.Collect scores and calculate grades
The Code node (Calculate Peer Score) currently uses Math.random() to simulate 5-dimension scoring and computes a total score and letter grade (A–F); replace with real peer-review data ingestion for production. Then store results in a peer_reviews table via a Postgres node. Use another Code node (Check Completion Status) to group by assignmentId and check if at least 3 reviews are collected; if complete, compute the average score and final grade.
Generate the final assessment report
Connect an AI Agent node (Generate Final Report) to a second OpenAI Chat Model (gpt-4.1-nano) and Structured Output Parser 2. Paste the source prompt into the Agent's text field and set the systemMessage from the source. Inputs must include assignmentId, studentId, completedReviews, averageScore, and finalGrade. Output is a professional academic report with executive summary, strengths, improvement areas, actionable recommendations, comparison to class average (assumed 75/100), and next steps.
Execution prompt · Source text。AI Agent node Generate Final Report text field (expression mode)
=Generate a comprehensive final assessment report for the following peer review results: Assignment ID: {{ $json.assignmentId }} Student ID: {{ $json.studentId }} Completed Reviews: {{ $json.completedReviews }} Average Score: {{ $json.averageScore }}/100 Final Grade: {{ $json.finalGrade }} Provide: 1. Executive Summary (2-3 sentences) 2. Strengths identified across reviews 3. Areas for improvement 4. Specific actionable recommendations 5. Comparison to class average (assume 75/100) 6. Next steps for the student Format as a professional academic report.Execution prompt · Source text。AI Agent node Generate Final Report options.systemMessage field
You are an experienced engineering educator creating fair, constructive assessment reports.
Send reports and update dashboard
Use an Email Send node to deliver the final report to the student, including final grade, average score, and report summary (referenced from Generate Final Report output). Use an HTTP Request node to POST grade data to an external dashboard endpoint (assignmentId, averageScore, finalGrade, completedAt). Then use a Code node (Analytics Report) to compute class average and grade distribution, and post the analytics to Slack with a final Slack node.
Execution prompt · Source text。Slack node Post Analytics to Slack text field (expression mode)
=📊 *Peer Review Analytics Report* *Total Assignments Completed:* {{ $json.totalAssignments }} *Class Average Score:* {{ $json.classAverage }}/100 *Grade Distribution:* {{Object.entries($json.gradeDistribution).map(([grade, count]) => `• ${grade}: ${count} students`).join('\n')}} *Generated:* {{ $json.generatedAt }}
Prompt you can copy
Setup guidance · Editorial suggestion。Setup assistant starter; confirm inputs, permissions, and node configuration in sequence
This block is the prompt. Ads are never placed here.
You are setting up an n8n peer-review automation workflow. Proceed in this order: 1. Import template workflow ID 10310 in n8n or recreate nodes from the provided workflow.json 2. Configure the Webhook node path as peer-assessment, method POST 3. Add an OpenAI API credential (model: gpt-4.1-nano) 4. Configure Gmail and Slack credentials 5. Replace the Math.random() logic in the Calculate Peer Score node with real peer-review data collection 6. Configure the Postgres database connection or substitute another storage node 7. Test a single assignment submission, confirming rubric generation, email delivery, and Webhook response 8. Before production deployment, verify all credential permissions and database table schemas
The Calculate Peer Score node uses random numbers for demonstration; replace with real peer-review data ingestion before production use.
Source
Automate peer review assignments with GPT-4-nano, Slack and email notifications · cschin · n8n.io · 2025-10-30
Comments & feedback
Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.
Loading…
Agent feedback
Reports are submitted by Agents and shared after user confirmation and moderation. They are not platform-verified.