8
n8n 中文网amn8n.com

学生录取与入学自动化

中级

这是一个Miscellaneous领域的自动化工作流,包含 10 个节点。主要使用 If, Code, EmailSend, MicrosoftExcel, ScheduleTrigger 等节点。 使用Excel、验证和邮件通知自动化学生录取流程

前置要求
  • HTTP Webhook 端点(n8n 会自动生成)

分类

工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "avWHNKwWwluMcjge",
  "meta": {
    "instanceId": "dd69efaf8212c74ad206700d104739d3329588a6f3f8381a46a481f34c9cc281",
    "templateCredsSetupCompleted": true
  },
  "name": "学生录取与入学自动化",
  "tags": [],
  "nodes": [
    {
      "id": "7a080e11-1f6a-4bad-be9e-2e791f2339b1",
      "name": "验证申请数据",
      "type": "n8n-nodes-base.if",
      "position": [
        -500,
        -80
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json.firstName}}",
              "operation": "isNotEmpty"
            },
            {
              "value1": "={{$json.lastName}}",
              "operation": "isNotEmpty"
            },
            {
              "value1": "={{$json.email}}",
              "operation": "isNotEmpty"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fdf26268-f331-4a67-826d-541abe266d1a",
      "name": "处理申请数据",
      "type": "n8n-nodes-base.code",
      "position": [
        -280,
        -180
      ],
      "parameters": {
        "jsCode": "// Get existing data from Excel\nconst existingData = $input.all();\n\n// Get new application data from webhook\nconst newApplication = $('Webhook - Application Form').first().json;\n\n// Create new student record\nconst newStudent = {\n  'Application ID': 'APP-' + Date.now(),\n  'First Name': newApplication.firstName,\n  'Last Name': newApplication.lastName,\n  'Email': newApplication.email,\n  'Phone': newApplication.phone || '',\n  'Program Interest': newApplication.program || 'General',\n  'Grade Level': newApplication.gradeLevel || '',\n  'School': newApplication.school || '',\n  'Guardian Name': newApplication.guardianName || '',\n  'Guardian Phone': newApplication.guardianPhone || '',\n  'Application Date': new Date().toISOString().split('T')[0],\n  'Status': 'Pending Review',\n  'Notes': newApplication.additionalNotes || ''\n};\n\n// Combine existing data with new application\nconst allData = [...existingData, newStudent];\n\nreturn allData.map(item => ({ json: item }));"
      },
      "typeVersion": 2
    },
    {
      "id": "cf61ad33-7397-4d7b-820d-42f17b88bde8",
      "name": "更新学生数据库",
      "type": "n8n-nodes-base.microsoftExcel",
      "position": [
        -60,
        -180
      ],
      "parameters": {
        "options": {},
        "resource": "worksheet",
        "workbook": {
          "__rl": true,
          "mode": "id",
          "value": "324t5yttre"
        },
        "operation": "append",
        "worksheet": {
          "__rl": true,
          "mode": "id",
          "value": "=23wrhhh"
        }
      },
      "credentials": {
        "microsoftExcelOAuth2Api": {
          "id": "jevPChvDpEJk6W9v",
          "name": "Microsoft Excel account - test"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "dd051ad2-91b2-411c-a128-26169f78fb3e",
      "name": "准备欢迎邮件",
      "type": "n8n-nodes-base.code",
      "position": [
        160,
        -180
      ],
      "parameters": {
        "jsCode": "// Get application data\nconst applicationData = $('Webhook - Application Form').first().json;\n\n// Create email content\nconst emailSubject = 'Welcome! Your Application Has Been Received';\nconst emailBody = `Dear ${applicationData.firstName} ${applicationData.lastName},\n\nThank you for your interest in our program! We have successfully received your application and it is currently under review.\n\nApplication Details:\n- Program of Interest: ${applicationData.program || 'General Program'}\n- Grade Level: ${applicationData.gradeLevel || 'Not Specified'}\n- Application Date: ${new Date().toLocaleDateString()}\n\nWhat happens next?\n1. Our admissions team will review your application within 3-5 business days\n2. You will receive an email with next steps or any additional requirements\n3. If you have any questions, please don't hesitate to contact us\n\nThank you for choosing our institution. We look forward to potentially welcoming you to our community!\n\nBest regards,\nAdmissions Team`;\n\nreturn [{\n  json: {\n    to: applicationData.email,\n    subject: emailSubject,\n    body: emailBody,\n    studentName: `${applicationData.firstName} ${applicationData.lastName}`,\n    program: applicationData.program,\n    applicationDate: new Date().toLocaleDateString()\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "717ebb5a-648c-4748-9ef1-573ec09458c9",
      "name": "成功响应",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        600,
        -180
      ],
      "parameters": {
        "options": {},
        "respondWith": "json",
        "responseBody": "={\n  \"success\": true,\n  \"message\": \"Application submitted successfully\",\n  \"applicationId\": \"APP-\" + Date.now(),\n  \"status\": \"pending_review\",\n  \"studentName\": $json.firstName + \" \" + $json.lastName,\n  \"program\": $json.program || \"General\",\n  \"submissionTime\": new Date().toISOString(),\n  \"nextSteps\": \"You will receive an email confirmation shortly and our admissions team will review your application within 3-5 business days.\"\n}"
      },
      "typeVersion": 1
    },
    {
      "id": "40c7a9e4-26da-4e54-9598-105e54b1cd28",
      "name": "错误响应",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -280,
        20
      ],
      "parameters": {
        "options": {
          "responseCode": 400
        },
        "respondWith": "json",
        "responseBody": "{\n  \"success\": false,\n  \"error\": \"Invalid application data\",\n  \"message\": \"Please ensure all required fields (firstName, lastName, email) are provided.\",\n  \"requiredFields\": [\"firstName\", \"lastName\", \"email\"],\n  \"timestamp\": \"{{ new Date().toISOString() }}\"\n}"
      },
      "typeVersion": 1
    },
    {
      "id": "a0aa2e5a-1d10-4926-8da4-b81402ea0f35",
      "name": "读取学生数据",
      "type": "n8n-nodes-base.microsoftExcel",
      "position": [
        -720,
        -80
      ],
      "parameters": {
        "filters": {},
        "resource": "worksheet",
        "workbook": {
          "__rl": true,
          "mode": "id",
          "value": "1234567uytr4w"
        }
      },
      "credentials": {
        "microsoftExcelOAuth2Api": {
          "id": "jevPChvDpEJk6W9v",
          "name": "Microsoft Excel account - test"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "76950d75-bc2f-47a6-b682-6bc46b921f42",
      "name": "发送邮件",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        380,
        -180
      ],
      "webhookId": "772da57c-1922-4b06-ae50-626d8695c776",
      "parameters": {
        "text": "${applicationData.emailtext}",
        "options": {},
        "subject": "${applicationData.subject}",
        "toEmail": "${applicationData.toemail}",
        "fromEmail": "admin@school.com",
        "emailFormat": "text"
      },
      "credentials": {
        "smtp": {
          "id": "G1kyF8cSWTZ4vouN",
          "name": "SMTP -test"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "0107a249-3bf2-4019-8daf-92eb6a92637a",
      "name": "每天上午7点触发",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -940,
        -80
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 7
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "cd5f1386-0912-4666-9a27-2d0feb24ff4a",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -980,
        -440
      ],
      "parameters": {
        "color": 5,
        "width": 640,
        "height": 260,
        "content": "### **主要组件**"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "39d210c3-6dc0-4dce-8cea-133208caf718",
  "connections": {
    "Send email": {
      "main": [
        [
          {
            "node": "Success Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Student Data": {
      "main": [
        [
          {
            "node": "Validate Application Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Welcome Email": {
      "main": [
        [
          {
            "node": "Send email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Student Database": {
      "main": [
        [
          {
            "node": "Prepare Welcome Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Application Data": {
      "main": [
        [
          {
            "node": "Update Student Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger at Every Day 7 am": {
      "main": [
        [
          {
            "node": "Read Student Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Application Data": {
      "main": [
        [
          {
            "node": "Process Application Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Error Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 杂项

需要付费吗?

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

工作流信息
难度等级
中级
节点数量10
分类1
节点类型7
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
Oneclick AI Squad

Oneclick AI Squad

@oneclick-ai

The AI Squad Initiative is a pioneering effort to build, automate and scale AI-powered workflows using n8n.io. Our mission is to help individuals and businesses integrate AI agents seamlessly into their daily operations from automating tasks and enhancing productivity to creating innovative, intelligent solutions. We design modular, reusable AI workflow templates that empower creators, developers and teams to supercharge their automation with minimal effort and maximum impact.

外部链接
在 n8n.io 查看

分享此工作流