8
n8n 中文网amn8n.com

使用AI和邮件解析自动化简历筛选与候选人验证

中级

这是一个HR, AI Summarization领域的自动化工作流,包含 14 个节点。主要使用 If, Code, Wait, EmailSend, EmailReadImap 等节点。 使用AI和邮件解析自动化简历筛选与候选人验证

前置要求
  • 无特殊前置要求,导入即可使用
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "wnbJahytoQE4GFZ3",
  "meta": {
    "instanceId": "dd69efaf8212c74ad206700d104739d3329588a6f3f8381a46a481f34c9cc281",
    "templateCredsSetupCompleted": true
  },
  "name": "使用 AI 和邮件解析自动化简历筛选与候选人验证",
  "tags": [],
  "nodes": [
    {
      "id": "2c5dae24-563c-4e86-958f-b267b80c7b97",
      "name": "新简历邮件触发",
      "type": "n8n-nodes-base.emailReadImap",
      "position": [
        -880,
        60
      ],
      "parameters": {
        "format": "resolved",
        "options": {
          "customEmailConfig": "[\"UNSEEN\", [\"SUBJECT\", \"CV\"]]"
        }
      },
      "credentials": {
        "imap": {
          "id": "zTEGYssr7MSVeCs3",
          "name": "IMAP-test"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "3fb527d0-5485-4a0d-bbe0-0ae995b8e5ec",
      "name": "从 PDF 简历提取文本",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -660,
        60
      ],
      "parameters": {
        "options": {},
        "operation": "pdf",
        "binaryPropertyName": "attachment_0"
      },
      "typeVersion": 1
    },
    {
      "id": "fd00eedc-3366-4c3c-b9b1-df26c85155cc",
      "name": "确保所有简历数据已加载",
      "type": "n8n-nodes-base.wait",
      "position": [
        -440,
        60
      ],
      "webhookId": "e13c2199-38bd-4ba8-aca2-1f800685301a",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "059b48de-32c9-41a7-a200-6112457df2e7",
      "name": "解析和构建简历信息",
      "type": "n8n-nodes-base.code",
      "position": [
        -220,
        60
      ],
      "parameters": {
        "jsCode": "// Access the extracted PDF text\nconst fileContent = ($input.first().json.text || '').toLowerCase();\nconst keywordsToDepartments = {\n  hr: 'HR',\n  bde: 'BDE',\n  'business development': 'BDE',\n  seo: 'SEO',\n  devops: 'DevOps',\n  developer: 'Development',\n  engineer: 'Engineering',\n  marketing: 'Marketing',\n  sales: 'Sales',\n  support: 'Support',\n  tester: 'QA',\n  qa: 'QA',\n};\n\n// Define a priority order (higher number = higher priority)\nconst priority = {\n  devops: 3,\n  developer: 3,\n  engineer: 3,\n  seo: 2,\n  bde: 2,\n  'business development': 2,\n  marketing: 2,\n  sales: 2,\n  support: 2,\n  tester: 2,\n  qa: 2,\n  hr: 1,\n};\n\n// Find all matching departments with their priorities\nlet matches = [];\nfor (const [keyword, department] of Object.entries(keywordsToDepartments)) {\n  if (fileContent.includes(keyword)) {\n    matches.push({ department, priority: priority[keyword] || 0 });\n  }\n}\n\n// Extract the username (first line of the CV text)\nconst originalText = $input.first().json.text || '';\nconst username = originalText.split('\\n')[0].trim(); // First line, e.g., \"Komal Shah\"\n\n// If matches are found, return the department with the highest priority along with the username\nif (matches.length > 0) {\n  const bestMatch = matches.reduce((best, current) =>\n    current.priority > best.priority ? current : best\n  );\n  return [{ department: bestMatch.department, username }];\n}\n\nreturn [{ department: 'Unknown', username }];"
      },
      "typeVersion": 2
    },
    {
      "id": "709ca3a3-04b6-44d7-bdc4-190c6b5f979f",
      "name": "检查简历必需字段",
      "type": "n8n-nodes-base.if",
      "position": [
        0,
        60
      ],
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": "={{ $json.department }}",
              "value2": true,
              "operation": "notEqual"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "3093ed8e-cc84-4ca2-9e24-b4ffe2fc0e6f",
      "name": "保存有效简历到文件夹",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        240,
        -140
      ],
      "parameters": {
        "command": "=mkdir -p /home/node/.n8n/resume/{{ $json.department }}/ && echo \"{{ $('Extract Text from PDF CV\t').item.json.text }}\" > /home/node/.n8n/resume/{{ $json.department }}/{{ $json.username.replace(/ /g, '-') }}.pdf"
      },
      "typeVersion": 1
    },
    {
      "id": "bae56e7d-8232-404b-856e-7cc2bb86fffe",
      "name": "通知 HR 无效简历",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        260,
        260
      ],
      "parameters": {
        "text": "CV Not Found",
        "options": {},
        "subject": "CV Processing Error",
        "toEmail": "abc@gmail.com",
        "fromEmail": "xyz@gmail.com"
      },
      "credentials": {
        "smtp": {
          "id": "G1kyF8cSWTZ4vouN",
          "name": "SMTP -test"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "68fa371e-f91e-415e-ad4c-a83a18fe4ecb",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -900,
        -80
      ],
      "parameters": {
        "width": 150,
        "height": 280,
        "content": "监听包含简历附件的新邮件。"
      },
      "typeVersion": 1
    },
    {
      "id": "5a2368ad-226a-45c3-bf2f-be91208d357d",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        -80
      ],
      "parameters": {
        "color": 4,
        "width": 150,
        "height": 280,
        "content": "使用 AI 或自定义逻辑提取结构化详细信息,如姓名、技能、教育背景、经验。"
      },
      "typeVersion": 1
    },
    {
      "id": "e2ba359c-c363-4805-b80a-291ff7c12185",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -20,
        -80
      ],
      "parameters": {
        "color": 6,
        "width": 150,
        "height": 280,
        "content": "在继续之前验证必需字段(如姓名、邮箱、技能)的存在。"
      },
      "typeVersion": 1
    },
    {
      "id": "a0d2f49b-0a2b-4faf-9c26-a8de59095b36",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        100
      ],
      "parameters": {
        "color": 3,
        "width": 150,
        "height": 280,
        "content": "为不完整或无效的简历发送邮件提醒。"
      },
      "typeVersion": 1
    },
    {
      "id": "b788d954-5d93-4db0-a58f-5fa7f8173aed",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        220,
        -280
      ],
      "parameters": {
        "color": 2,
        "width": 150,
        "height": 280,
        "content": "将成功验证的简历存储到目标目录。"
      },
      "typeVersion": 1
    },
    {
      "id": "a2f60daf-2ae0-4643-ad18-e9fd5fff132b",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -680,
        -80
      ],
      "parameters": {
        "color": 3,
        "width": 150,
        "height": 280,
        "content": "从附加的 PDF 文件解析简历内容。"
      },
      "typeVersion": 1
    },
    {
      "id": "1efb64dc-b917-47d9-9339-85dbae2d2385",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -460,
        -80
      ],
      "parameters": {
        "color": 5,
        "width": 150,
        "height": 280,
        "content": "暂停直到完整数据准备好进行处理。"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "128c5a19-ad2a-4426-851f-a9dbf2a9ff17",
  "connections": {
    "Trigger on New CV Email\t": {
      "main": [
        [
          {
            "node": "Extract Text from PDF CV\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Text from PDF CV\t": {
      "main": [
        [
          {
            "node": "Ensure All CV Data Loaded\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ensure All CV Data Loaded\t": {
      "main": [
        [
          {
            "node": "Parse & Structure CV Information\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check CV for Required Fields\t": {
      "main": [
        [
          {
            "node": "Save Valid CV to Folder\t",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Notify HR of Invalid CV\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse & Structure CV Information\t": {
      "main": [
        [
          {
            "node": "Check CV for Required Fields\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 人力资源, AI 摘要总结

需要付费吗?

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

工作流信息
难度等级
中级
节点数量14
分类2
节点类型8
难度说明

适合有一定经验的用户,包含 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 查看

分享此工作流