Automated Resume Review System Using OpenAI + Google Sheets

工作流概述

这是一个包含17个节点的复杂工作流,主要用于自动化处理各种任务。

工作流源代码

下载
{
  "id": "IO0OrQ6ao4vm9urI",
  "meta": {
    "instanceId": "0d6ec6d73242e93a616bed7dc657bb92fd6b05466b19318f83d18293848e971a",
    "templateCredsSetupCompleted": true
  },
  "name": "Automated Resume Review System Using OpenAI + Google Sheets",
  "tags": [],
  "nodes": [
    {
      "id": "8585c01d-f26c-453e-a705-7783b3a28a46",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -780,
        180
      ],
      "webhookId": "6ea62ea0-de12-4134-b646-121474b3b846",
      "parameters": {
        "options": {
          "ignoreBots": true,
          "appendAttribution": false
        },
        "formTitle": "Submit your CV",
        "formFields": {
          "values": [
            {
              "fieldLabel": "First name",
              "placeholder": "First Name",
              "requiredField": true
            },
            {
              "fieldLabel": "Last Name",
              "placeholder": "Last Name",
              "requiredField": true
            },
            {
              "fieldType": "email",
              "fieldLabel": "Email",
              "placeholder": "Email",
              "requiredField": true
            },
            {
              "fieldType": "file",
              "fieldLabel": "Resume",
              "requiredField": true,
              "acceptFileTypes": "=.pdf"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "d7acbd9b-f24a-4801-9a00-94308df9a55e",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        540,
        140
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineAll"
      },
      "typeVersion": 3
    },
    {
      "id": "68f1cb96-fca5-473b-b79c-707682206135",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1600,
        340
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{
  \"type\": \"object\",
  \"properties\": {
    \"vote\": {
      \"type\": \"string\"
    },
    \"consideration\": {
      \"type\": \"string\"
    }
  }
}
"
      },
      "typeVersion": 1.2
    },
    {
      "id": "04b20070-141a-466c-87d3-7de4323f83df",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1900,
        120
      ],
      "parameters": {
        "columns": {
          "value": {
            "DOB": "={{ $('Merge').item.json.output.birthdate }}",
            "City": "={{ $('Merge').item.json.output.city }}",
            "Vote": "={{ $json.output.vote }}",
            "Email": "={{ $('Merge').item.json.output.email }}",
            "Skills": "={{ $('Merge').item.json.output.Skills }}",
            "Website": "={{ $('Merge').item.json.output.website }}",
            "Last Name": "={{ $('Merge').item.json.output.last_name }}",
            "Experience": "={{ $('Merge').item.json.output['Job History'] }}",
            "First Name": "={{ $('Merge').item.json.output.first_name }}",
            "Applied Date": "={{ $now.format('MM-dd-yyyy') }}",
            "Education Qualification": "={{ $('Merge').item.json.output['Educational Qualification'] }}"
          },
          "schema": [
            {
              "id": "First Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "First Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Last Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "City",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "City",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone number",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Phone number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LinkedIn",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "LinkedIn",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "DOB",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "DOB",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Education Qualification",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Education Qualification",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Experience",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Experience",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Skills",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Skills",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Vote",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Vote",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Consideration",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Consideration",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Applied Date",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Applied Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1tmg5CW1d3ZNVJ98hODs24RLGyKul98cAtVHULLNDAyU/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1tmg5CW1d3ZNVJ98hODs24RLGyKul98cAtVHULLNDAyU",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1tmg5CW1d3ZNVJ98hODs24RLGyKul98cAtVHULLNDAyU/edit?usp=drivesdk",
          "cachedResultName": "HR New"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "d63Esv5UOI7IgJEf",
          "name": "Google Sheets account 2"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "dab7587f-890d-4571-b03d-1a2948baa91c",
      "name": "Personal Info",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        -140,
        80
      ],
      "parameters": {
        "text": "={{ $json.text }}",
        "options": {},
        "schemaType": "manual",
        "inputSchema": "{
  \"type\": \"object\",
  \"properties\": {
    \"first_name\": {
      \"type\": \"string\"
    },
    \"last_name\": {
      \"type\": \"string\"
    },
    \"email\": {
      \"type\": \"string\"
    },
    \"telephone\": {
      \"type\": \"string\"
    },
    \"city\": {
      \"type\": \"string\"
    },
    \"birthdate\": {
      \"type\": \"string\"
    },
    \"linkedin\": {
      \"type\": \"string\"
    },
    \"website\": {
      \"type\": \"string\"
    },
    \"summary\": {
      \"type\": \"string\"
    }
  }
}
"
      },
      "typeVersion": 1
    },
    {
      "id": "5c815337-80c4-4332-9179-77c0a446c205",
      "name": "Qualification",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        -140,
        320
      ],
      "parameters": {
        "text": "={{ $json.text }}",
        "options": {
          "systemPromptTemplate": "You are an expert extraction algorithm.
Only extract relevant information from the text.
If you do not know the value of an attribute asked to extract, you may omit the attribute's value."
        },
        "attributes": {
          "attributes": [
            {
              "name": "Educational Qualification",
              "required": true,
              "description": "Summary of your academic career. Focus on your high school and university studies. Summarize in 100 words maximum and also include your grade if applicable."
            },
            {
              "name": "Job History",
              "required": true,
              "description": "Work history summary. Focus on your most recent work experiences. Summarize in 100 words maximum"
            },
            {
              "name": "Skills",
              "required": true,
              "description": "Extract the candidate’s technical skills. What software and frameworks they are proficient in. Make a bulleted list."
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ad245152-b1cc-4dcd-b9bc-c8ec8a592115",
      "name": "HR Expert",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1500,
        120
      ],
      "parameters": {
        "text": "=Profile:
{{ $json['wanted-profile'] }}

Candidate:{{ $('Summarizer').item.json.response.text }}",
        "messages": {
          "messageValues": [
            {
              "message": "=You are an HR expert, and your task is to determine whether a candidate aligns with the company's desired profile. You must assign a rating from 1 to 10, where 1 means the candidate does not meet the requirements, while 10 means the candidate is the perfect match for the role. Additionally, in the \"consideration\" field, explain the reasoning behind the given score."
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.5
    },
    {
      "id": "86a37824-a3d0-4199-bb2d-c7608d65f6de",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -820,
        -140
      ],
      "parameters": {
        "width": 500,
        "height": 660,
        "content": "## Submission, Saving to Google Drive & Extraction

**Captures user info from the form.**
**Uploads resume to Google Drive.**
**Extracts data from the PDF (resume).**"
      },
      "typeVersion": 1
    },
    {
      "id": "6a42aedf-e2a0-44fc-ae02-00d25ab56a91",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -300,
        -140
      ],
      "parameters": {
        "color": 7,
        "width": 560,
        "height": 660,
        "content": "## Extraction (Personal Info & Qualification)

**Extracts personal details (name, city, etc.).**
**Retrieves educational qualifications and job history.**"
      },
      "typeVersion": 1
    },
    {
      "id": "17134f76-322d-4621-ab85-340d1f9ea115",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        280,
        -140
      ],
      "parameters": {
        "color": 5,
        "width": 1120,
        "height": 660,
        "content": "## Merge & Summarization

**Merges extracted information.**
**Generates a concise professional summary.**

"
      },
      "typeVersion": 1
    },
    {
      "id": "cf09a615-65dc-4c4d-8419-f05cadeb9405",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1420,
        -140
      ],
      "parameters": {
        "color": 4,
        "width": 640,
        "height": 660,
        "content": "## Voting, Consideration & Google Sheets

**HR expert reviews and analyzes the summary.

Assigns a rating (1-10) and provides hiring insights.

Appends all details to Google Sheets for record-keeping.**

"
      },
      "typeVersion": 1
    },
    {
      "id": "ee76a66a-ce2a-4a4f-8c57-0cc48b8f7dcb",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1960,
        -140
      ],
      "parameters": {
        "color": 2,
        "width": 1060,
        "height": 660,
        "content": "# Automated Resume Processing & Evaluation System

**This workflow streamlines the process of handling resume submissions, extracting key details, summarizing qualifications, and aiding HR in the decision-making process.**

## 1. Submission, Saving to Google Drive & Extraction
**The user submits a resume via a form.
The system saves the uploaded file to Google Drive for record-keeping.
AI-powered text extraction retrieves personal details, qualifications, and job history from the document.**

## 2. Extraction (Personal Info & Qualification)
**The workflow identifies and extracts key details such as the candidate’s name, contact information, and location.
It scans for educational background, certifications, and past work experiences.**

## 3. Merge & Summarization
**The extracted data is merged into a structured format.
A concise summary is generated, highlighting the candidate’s most relevant qualifications and experiences.**

## 4. Voting, Consideration & Google Sheets
**HR reviews the summarized profile and assigns a rating (1-10).
Hiring insights and comments are recorded for evaluation.
All processed data, including extracted details and review scores, are appended to a Google Sheet for tracking and further consideration.**

"
      },
      "typeVersion": 1
    },
    {
      "id": "51e5290b-fadd-4f7c-99fc-8bfd54a1ee27",
      "name": "Upload to google drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -440,
        100
      ],
      "parameters": {
        "name": "=Resume-{{ $now.format('yyyyLLdd') }}-{{ $json.Resume[0].filename }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "root",
          "cachedResultName": "/ (Root folder)"
        },
        "inputDataFieldName": "Resume"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "Z5vnQSvmzFvtqQeL",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "b69e22ba-ab56-4199-830a-4d74fd8c8e74",
      "name": "Resume extraction",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -440,
        260
      ],
      "parameters": {
        "options": {},
        "operation": "pdf",
        "binaryPropertyName": "Resume"
      },
      "typeVersion": 1
    },
    {
      "id": "653d83ad-309f-4e09-acf5-e7d0a1890e1e",
      "name": "wanted profile",
      "type": "n8n-nodes-base.set",
      "position": [
        1240,
        120
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "8b812d8f-87d6-46e2-855a-b465c1248c2d",
              "name": "wanted-profile",
              "type": "string",
              "value": "We are a web agency looking for an Automation Expert skilled in workflow automation, API integrations, and AI-driven process optimization. The ideal candidate should have expertise in n8n, Python, and JavaScript, with a strong understanding of automation tools and webhooks. Experience in building custom automations for businesses is required.  Requirements:  Proficiency in n8n, Python, and JavaScript Experience in workflow automation, API integrations, and AI agents Ability to optimize business processes through automation Prior experience in the automation industry Must be based in Northern Italy If you have a passion for automation and want to work with a forward-thinking agency, we'd love to hear from you!"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "9ed47811-30d8-48e7-a05e-e5213f0e0526",
      "name": "Summarizer",
      "type": "@n8n/n8n-nodes-langchain.chainSummarization",
      "position": [
        840,
        120
      ],
      "parameters": {
        "options": {
          "summarizationMethodAndPrompts": {
            "values": {
              "prompt": "=Write a concise summary of the following:
First name:{{ $json.output.first_name }}
Last name:{{ $json.output.last_name }}
City: {{ $json.output.city }}
Educational Qualification:{{ $json.output['Educational Qualification'] }}
Previous experience:{{ $json.output['Job History'] }}
Skills:{{ $json.output.Skills }}
Applied date:{{$now.format('yyyy-MM-dd')}}

Write a concise Summary and summary of 100 words or less. Be concise and professional.

",
              "combineMapPrompt": "=Write a concise summary of the following:
First name:{{ $json.output.first_name }}
Last name:{{ $json.output.last_name }}
City: {{ $json.output.city }}
Educational Qualification:{{ $json.output['Educational Qualification'] }}
Previous experience:{{ $json.output['Job History'] }}
Skills:{{ $json.output.Skills }}
Applied date:{{$now.format('yyyy-MM-dd')}}

Write a concise Summary and summary of 100 words or less. Be concise and professional.

"
            }
          }
        }
      },
      "typeVersion": 2
    },
    {
      "id": "56329dd0-53e2-4617-ba54-c91e9f96d6ca",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        860,
        400
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "n2UwuicTmLclqMaY",
          "name": "OpenAi account 2"
        }
      },
      "typeVersion": 1.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "callerPolicy": "workflowsFromSameOwner",
    "executionOrder": "v1"
  },
  "versionId": "24ebf6c2-c041-4dc0-8fec-5728f86625f1",
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Summarizer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HR Expert": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarizer": {
      "main": [
        [
          {
            "node": "wanted profile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Personal Info": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Qualification": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "wanted profile": {
      "main": [
        [
          {
            "node": "HR Expert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Qualification",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Personal Info",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Summarizer",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "HR Expert",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Resume extraction": {
      "main": [
        [
          {
            "node": "Personal Info",
            "type": "main",
            "index": 0
          },
          {
            "node": "Qualification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Upload to google drive",
            "type": "main",
            "index": 0
          },
          {
            "node": "Resume extraction",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "HR Expert",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}

功能特点

  • 自动检测新邮件
  • AI智能内容分析
  • 自定义分类规则
  • 批量处理能力
  • 详细的处理日志

技术分析

节点类型及作用

  • Formtrigger
  • Merge
  • @N8N/N8N Nodes Langchain.Outputparserstructured
  • Googlesheets
  • @N8N/N8N Nodes Langchain.Informationextractor

复杂度评估

配置难度:
★★★★☆
维护难度:
★★☆☆☆
扩展性:
★★★★☆

实施指南

前置条件

  • 有效的Gmail账户
  • n8n平台访问权限
  • Google API凭证
  • AI分类服务订阅

配置步骤

  1. 在n8n中导入工作流JSON文件
  2. 配置Gmail节点的认证信息
  3. 设置AI分类器的API密钥
  4. 自定义分类规则和标签映射
  5. 测试工作流执行
  6. 配置定时触发器(可选)

关键参数

参数名称 默认值 说明
maxEmails 50 单次处理的最大邮件数量
confidenceThreshold 0.8 分类置信度阈值
autoLabel true 是否自动添加标签

最佳实践

优化建议

  • 定期更新AI分类模型以提高准确性
  • 根据邮件量调整处理批次大小
  • 设置合理的分类置信度阈值
  • 定期清理过期的分类规则

安全注意事项

  • 妥善保管API密钥和认证信息
  • 限制工作流的访问权限
  • 定期审查处理日志
  • 启用双因素认证保护Gmail账户

性能优化

  • 使用增量处理减少重复工作
  • 缓存频繁访问的数据
  • 并行处理多个邮件分类任务
  • 监控系统资源使用情况

故障排除

常见问题

邮件未被正确分类

检查AI分类器的置信度阈值设置,适当降低阈值或更新训练数据。

Gmail认证失败

确认Google API凭证有效且具有正确的权限范围,重新进行OAuth授权。

调试技巧

  • 启用详细日志记录查看每个步骤的执行情况
  • 使用测试邮件验证分类逻辑
  • 检查网络连接和API服务状态
  • 逐步执行工作流定位问题节点

错误处理

工作流包含以下错误处理机制:

  • 网络超时自动重试(最多3次)
  • API错误记录和告警
  • 处理失败邮件的隔离机制
  • 异常情况下的回滚操作