8
n8n 中文网amn8n.com

Sonar Pro AI作业评估与多截止日期提醒

高级

这是一个Document Extraction, AI Summarization领域的自动化工作流,包含 23 个节点。主要使用 Set, Filter, Discord, ReadPDF, Webhook 等节点。 通过Sonar Pro AI和多渠道截止日期提醒自动化同行评审分配

前置要求
  • Discord Bot Token 或 Webhook
  • HTTP Webhook 端点(n8n 会自动生成)
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "SN8IPZsF4ezEdP4z",
  "meta": {
    "instanceId": "b91e510ebae4127f953fd2f5f8d40d58ca1e71c746d4500c12ae86aad04c1502"
  },
  "name": "Sonar Pro AI 作业评估与多截止日期提醒",
  "tags": [],
  "nodes": [
    {
      "id": "3ae96cfc-23c9-4619-af4c-6f73ec220e45",
      "name": "手动触发器",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        976,
        96
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "70a0c1e7-16b0-4d09-8c55-18d5619ad4ef",
      "name": "由 Github 模型提供支持",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        976,
        288
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 24
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "abda9b85-fece-4c81-b3bb-e7e4284e973a",
      "name": "Webhook - 作业提交",
      "type": "n8n-nodes-base.webhook",
      "position": [
        992,
        608
      ],
      "webhookId": "f6eacf9a-4477-4e16-a476-d1b4c726e65f",
      "parameters": {
        "path": "engineering-peer-eval",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 2
    },
    {
      "id": "dd75a29c-993e-4f8b-a6a7-42bbd10bff5f",
      "name": "提取提交数据",
      "type": "n8n-nodes-base.set",
      "position": [
        1184,
        608
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "={{ $json.body.student_id }}",
              "value": "={{ $json.body.student_id }}"
            },
            {
              "id": "={{ $json.body.assignment_file }}",
              "value": "={{ $json.body.assignment_file }}"
            },
            {
              "id": "={{ $json.body.course_code }}",
              "value": "={{ $json.body.course_code }}"
            },
            {
              "id": "={{ $json.body.assignment_title }}",
              "value": "={{ $json.body.assignment_title }}"
            },
            {
              "id": "={{ $json.body.peer_reviewers }}",
              "value": "={{ $json.body.peer_reviewers }}"
            },
            {
              "id": "={{ $json.body.deadline }}",
              "value": "={{ $json.body.deadline }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "63cdfbc2-7ceb-48a8-9921-4bec0ff7601a",
      "name": "读取作业文件",
      "type": "n8n-nodes-base.readPDF",
      "position": [
        1360,
        608
      ],
      "parameters": {
        "binaryPropertyName": "={{ $json.assignment_file }}"
      },
      "typeVersion": 1
    },
    {
      "id": "0ab69570-bc79-4a49-9372-2ffda95a37d4",
      "name": "AI 评估 - 技术标准",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1504,
        608
      ],
      "parameters": {
        "text": "=You are an engineering professor evaluating a student assignment. Analyze the following submission based on these ENGINEERING-SPECIFIC CRITERIA:\n\n**Technical Accuracy (30 points)**\n- Correct application of engineering principles\n- Accurate calculations and formulas\n- Proper units and dimensional analysis\n- Valid assumptions and constraints\n\n**Problem-Solving Methodology (25 points)**\n- Systematic approach to problem decomposition\n- Appropriate engineering tools/methods used\n- Quality of design/analysis process\n- Innovation and creativity in solutions\n\n**Documentation & Communication (20 points)**\n- Clear technical writing and explanations\n- Proper engineering notation and symbols\n- Quality of diagrams, schematics, or CAD drawings\n- Professional formatting and organization\n\n**Analysis & Critical Thinking (15 points)**\n- Depth of analysis and interpretation\n- Recognition of limitations and trade-offs\n- Consideration of practical constraints\n- Engineering judgment demonstrated\n\n**Code/Implementation Quality (10 points, if applicable)**\n- Code efficiency and optimization\n- Proper documentation and comments\n- Testing and validation approach\n- Adherence to engineering standards\n\nAssignment Content:\n{{ $json.data }}\n\nProvide a detailed evaluation with:\n1. Score for each criterion (with justification)\n2. Total score out of 100\n3. Specific strengths identified\n4. Areas for improvement with actionable feedback\n5. Overall assessment summary\n\nFormat the response as structured JSON.",
        "agent": "conversationalAgent",
        "options": {
          "systemMessage": "You are an expert engineering educator with 15+ years of experience evaluating student work across mechanical, electrical, civil, and software engineering disciplines."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.7
    },
    {
      "id": "bf9412cc-3af5-4878-80a2-b1a914998539",
      "name": "结构化输出解析器",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1648,
        816
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "94dbc235-e275-495b-ae55-d63af377dc8f",
      "name": "存储评估结果",
      "type": "n8n-nodes-base.set",
      "position": [
        1776,
        608
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "={{ $json.student_id }}",
              "value": "={{ $('Extract Submission Data').item.json.student_id }}"
            },
            {
              "id": "={{ $json.course_code }}",
              "value": "={{ $('Extract Submission Data').item.json.course_code }}"
            },
            {
              "id": "={{ $json.assignment_title }}",
              "value": "={{ $('Extract Submission Data').item.json.assignment_title }}"
            },
            {
              "id": "={{ $json.ai_evaluation }}",
              "value": "={{ $json.output }}"
            },
            {
              "id": "={{ $json.evaluation_date }}",
              "value": "={{ $now.toISO() }}"
            },
            {
              "id": "={{ $json.total_score }}",
              "value": "={{ $json.output.total_score }}"
            },
            {
              "id": "={{ $json.peer_reviewers }}",
              "value": "={{ $('Extract Submission Data').item.json.peer_reviewers }}"
            },
            {
              "id": "={{ $json.deadline }}",
              "value": "={{ $('Extract Submission Data').item.json.deadline }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "6b6d447c-2287-41c8-afe1-827b8dd5a2f1",
      "name": "分配同行评审员",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1936,
        560
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "peer_reviewers"
      },
      "typeVersion": 1
    },
    {
      "id": "515f185f-2338-43df-b601-28135f39f427",
      "name": "创建评估模板",
      "type": "n8n-nodes-base.set",
      "position": [
        2080,
        560
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "={{ $json.reviewer_email }}",
              "value": "={{ $json.peer_reviewers }}"
            },
            {
              "id": "={{ $json.evaluation_template }}",
              "value": "=**PEER EVALUATION FORM - {{ $('Store Evaluation Results').item.json.course_code }}**\n\nAssignment: {{ $('Store Evaluation Results').item.json.assignment_title }}\nStudent ID: {{ $('Store Evaluation Results').item.json.student_id }}\nReviewer: {{ $json.peer_reviewers }}\nDeadline: {{ $('Store Evaluation Results').item.json.deadline }}\n\n---\n\n**EVALUATION CRITERIA:**\n\n1. Technical Accuracy (0-30 points)\n   - Engineering principles correctly applied?\n   - Calculations accurate?\n   - Units and dimensions correct?\n   Score: ___/30\n   Comments:\n\n2. Problem-Solving Methodology (0-25 points)\n   - Systematic approach used?\n   - Appropriate tools/methods?\n   - Creative solutions?\n   Score: ___/25\n   Comments:\n\n3. Documentation & Communication (0-20 points)\n   - Clear explanations?\n   - Professional formatting?\n   - Quality diagrams/drawings?\n   Score: ___/20\n   Comments:\n\n4. Analysis & Critical Thinking (0-15 points)\n   - Depth of analysis?\n   - Trade-offs considered?\n   - Engineering judgment?\n   Score: ___/15\n   Comments:\n\n5. Implementation Quality (0-10 points)\n   - Code/design quality?\n   - Testing approach?\n   - Standards compliance?\n   Score: ___/10\n   Comments:\n\n---\n\n**AI PRELIMINARY EVALUATION:**\nTotal Score: {{ $('Store Evaluation Results').item.json.total_score }}/100\n\nStrengths: {{ $('Store Evaluation Results').item.json.ai_evaluation.strengths.join(', ') }}\n\nAreas for Improvement: {{ $('Store Evaluation Results').item.json.ai_evaluation.improvements.join(', ') }}\n\n---\n\nPlease submit your evaluation by: {{ $('Store Evaluation Results').item.json.deadline }}\nSubmission Link: [Evaluation Form URL]"
            },
            {
              "id": "={{ $json.student_id }}",
              "value": "={{ $('Store Evaluation Results').item.json.student_id }}"
            },
            {
              "id": "={{ $json.assignment_title }}",
              "value": "={{ $('Store Evaluation Results').item.json.assignment_title }}"
            },
            {
              "id": "={{ $json.deadline }}",
              "value": "={{ $('Store Evaluation Results').item.json.deadline }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "bf9a0291-f743-4b97-bf2d-814dcc1b4d6a",
      "name": "发送 Teams 通知",
      "type": "n8n-nodes-base.microsoftTeams",
      "position": [
        2256,
        368
      ],
      "webhookId": "ae6f1e0c-4bd8-4d4c-bff6-96c414e7a243",
      "parameters": {
        "resource": "message"
      },
      "typeVersion": 2
    },
    {
      "id": "e5e4c276-b2c4-4296-967f-0681c32375c4",
      "name": "发送 Discord 通知",
      "type": "n8n-nodes-base.discord",
      "position": [
        2256,
        560
      ],
      "webhookId": "bcc2b28c-18a4-497c-b21f-136bc13c3862",
      "parameters": {
        "content": "=**🎓 Peer Evaluation Assignment**\n\n@{{ $json.reviewer_email }}\n\nYou've been assigned to review:\n- **Assignment:** {{ $json.assignment_title }}\n- **Student:** {{ $json.student_id }}\n- **Deadline:** {{ $json.deadline }}\n\nAI Preliminary Score: {{ $('Store Evaluation Results').item.json.total_score }}/100\n\nPlease check your email for the complete evaluation template and submission link.",
        "guildId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "options": {},
        "resource": "message",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        }
      },
      "typeVersion": 2
    },
    {
      "id": "56aea28b-e448-4769-91b4-a98b54f6984b",
      "name": "发送带模板的邮件",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        2256,
        752
      ],
      "webhookId": "7ce0254a-3e9e-4010-b13a-dcf081ddff93",
      "parameters": {
        "options": {
          "allowUnauthorizedCerts": false
        },
        "subject": "=Peer Evaluation Assignment - {{ $json.assignment_title }}",
        "toEmail": "={{ $json.reviewer_email }}",
        "fromEmail": "course-admin@engineering.edu"
      },
      "typeVersion": 2.1
    },
    {
      "id": "da00d68a-3cf0-4ab2-821d-a720436b598d",
      "name": "保存到 Google Sheets - 评分",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1936,
        752
      ],
      "parameters": {
        "columns": {
          "value": {
            "status": "Pending Peer Review",
            "ai_score": "={{ $('Store Evaluation Results').item.json.total_score }}",
            "analysis": "={{ $('Store Evaluation Results').item.json.ai_evaluation.analysis }}",
            "student_id": "={{ $('Store Evaluation Results').item.json.student_id }}",
            "course_code": "={{ $('Store Evaluation Results').item.json.course_code }}",
            "documentation": "={{ $('Store Evaluation Results').item.json.ai_evaluation.documentation }}",
            "implementation": "={{ $('Store Evaluation Results').item.json.ai_evaluation.implementation }}",
            "evaluation_date": "={{ $('Store Evaluation Results').item.json.evaluation_date }}",
            "problem_solving": "={{ $('Store Evaluation Results').item.json.ai_evaluation.problem_solving }}",
            "assignment_title": "={{ $('Store Evaluation Results').item.json.assignment_title }}",
            "technical_accuracy": "={{ $('Store Evaluation Results').item.json.ai_evaluation.technical_accuracy }}"
          },
          "mappingMode": "defineBelow"
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "Peer Evaluations"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "engineering-grades-sheet-id"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "05f1584b-1ee8-49d0-9aa4-8b59523265fe",
      "name": "检查评审截止日期",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1152,
        192
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "Pending Peer Review",
              "lookupColumn": "status"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "Peer Evaluations"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "engineering-grades-sheet-id"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "4b7c80b4-ee14-4113-8847-54db1b587096",
      "name": "筛选临近截止日期",
      "type": "n8n-nodes-base.filter",
      "position": [
        1328,
        192
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "combinator": "and",
          "conditions": [
            {
              "id": "deadline_check",
              "operator": {
                "type": "number",
                "operation": "lt"
              },
              "leftValue": "={{ new Date($json.deadline).getTime() - Date.now() }}",
              "rightValue": 172800000
            },
            {
              "id": "not_overdue",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ new Date($json.deadline).getTime() - Date.now() }}",
              "rightValue": 0
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "6add76c6-15a6-4bdc-8322-79dfe04e7aa5",
      "name": "发送截止日期提醒 - Teams",
      "type": "n8n-nodes-base.microsoftTeams",
      "position": [
        1552,
        0
      ],
      "webhookId": "961c0a62-b69d-4805-95eb-2cb8780b0388",
      "parameters": {
        "resource": "message"
      },
      "typeVersion": 2
    },
    {
      "id": "cddfbdcf-b637-49c8-8588-15f665b10ffc",
      "name": "发送截止日期提醒 - Discord",
      "type": "n8n-nodes-base.discord",
      "position": [
        1552,
        192
      ],
      "webhookId": "f676be85-3f3d-43b2-bf9e-21c3ac406412",
      "parameters": {
        "content": "=⏰ **DEADLINE REMINDER**\n\n**Assignment:** {{ $json.assignment_title }}\n**Student:** {{ $json.student_id }}\n**Deadline:** {{ $json.deadline }}\n\nYour peer evaluation is due in less than 48 hours! Please complete your review.",
        "guildId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "options": {},
        "resource": "message",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        }
      },
      "typeVersion": 2
    },
    {
      "id": "1a0937dc-69a0-4605-8064-14c05b08ea19",
      "name": "发送截止日期提醒 - 邮件",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1552,
        384
      ],
      "webhookId": "6f553172-b297-415d-bdb8-fd0ade6c4ced",
      "parameters": {
        "options": {},
        "subject": "=⏰ Reminder: Peer Evaluation Due Soon - {{ $json.assignment_title }}",
        "toEmail": "={{ $json.reviewer_email }}",
        "fromEmail": "course-admin@engineering.edu"
      },
      "typeVersion": 2.1
    },
    {
      "id": "891f0175-4e59-4622-a6c6-4a30a6dbe5cb",
      "name": "Webhook 响应",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        2416,
        752
      ],
      "parameters": {
        "options": {},
        "respondWith": "json",
        "responseBody": "={\n  \"status\": \"success\",\n  \"message\": \"Peer evaluation workflow initiated\",\n  \"student_id\": \"{{ $('Store Evaluation Results').item.json.student_id }}\",\n  \"assignment\": \"{{ $('Store Evaluation Results').item.json.assignment_title }}\",\n  \"ai_score\": {{ $('Store Evaluation Results').item.json.total_score }},\n  \"peer_reviewers_notified\": {{ $('Split Peer Reviewers').all().length }},\n  \"deadline\": \"{{ $('Store Evaluation Results').item.json.deadline }}\"\n}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "05d609e9-ddbf-4038-9b31-aec3a514a85f",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        -32
      ],
      "parameters": {
        "width": 672,
        "height": 784,
        "content": "## 简介"
      },
      "typeVersion": 1
    },
    {
      "id": "6f2c649e-1bc4-4fbe-b196-0f0213c0d643",
      "name": "OpenRouter聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        1504,
        816
      ],
      "parameters": {
        "model": "perplexity/sonar-pro",
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "id": "fKnn6LL7cRFqNHDX",
          "name": "OpenRouter account2"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "4932a9e3-d18c-4b45-a686-381da89e6160",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1792,
        -16
      ],
      "parameters": {
        "color": 5,
        "width": 352,
        "height": 400,
        "content": "## 使用案例"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "3a5d4cce-fbe3-4843-8a3e-757e66e9482b",
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Check Review Deadlines",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Check Review Deadlines",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Assignment File": {
      "main": [
        [
          {
            "node": "AI Evaluation - Technical Criteria",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Peer Reviewers": {
      "main": [
        [
          {
            "node": "Create Evaluation Template",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Evaluation - Technical Criteria",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Check Review Deadlines": {
      "main": [
        [
          {
            "node": "Filter Approaching Deadlines",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Submission Data": {
      "main": [
        [
          {
            "node": "Read Assignment File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Email with Template": {
      "main": [
        [
          {
            "node": "Webhook Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Evaluation Results": {
      "main": [
        [
          {
            "node": "Split Peer Reviewers",
            "type": "main",
            "index": 0
          },
          {
            "node": "Save to Google Sheets - Grading",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Evaluation - Technical Criteria",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Create Evaluation Template": {
      "main": [
        [
          {
            "node": "Send Teams Notification",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Discord Notification",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Email with Template",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Approaching Deadlines": {
      "main": [
        [
          {
            "node": "Send Deadline Reminder - Teams",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Deadline Reminder - Discord",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Deadline Reminder - Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook - Assignment Submission": {
      "main": [
        [
          {
            "node": "Extract Submission Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Evaluation - Technical Criteria": {
      "main": [
        [
          {
            "node": "Store Evaluation Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 文档提取, AI 摘要总结

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量23
分类2
节点类型16
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
Cheng Siong Chin

Cheng Siong Chin

@cschin

Prof. Cheng Siong CHIN serves as Chair Professor in Intelligent Systems Modelling and Simulation in Newcastle University, Singapore. His academic credentials include an M.Sc. in Advanced Control and Systems Engineering from The University of Manchester and a Ph.D. in Robotics from Nanyang Technological University.

外部链接
在 n8n.io 查看

分享此工作流