{
  "name": "Nodbot - HH resume screening with human review",
  "nodes": [
    {
      "parameters": {
        "path": "hh-resume-screening",
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "id": "9f30b1f1-28e6-467d-82cb-bc7990e21320",
      "name": "Webhook input",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        0,
        260
      ]
    },
    {
      "parameters": {
        "jsCode": "const input = $json.body ?? $json;\nconst criteria = input.vacancy_criteria ?? {};\nconst mustHave = Array.isArray(criteria.must_have) ? criteria.must_have : [];\nconst niceToHave = Array.isArray(criteria.nice_to_have) ? criteria.nice_to_have : [];\nconst excluded = new Set((criteria.exclude_from_scoring ?? []).map(v => String(v).toLowerCase()));\n\nif (!input.resume_id || !input.vacancy_id) {\n  throw new Error('resume_id and vacancy_id are required');\n}\n\nconst promptContract = {\n  role: 'HR screening assistant',\n  task: 'Compare only job-related facts from resume with vacancy criteria',\n  forbidden_signals: [...excluded],\n  output_schema: {\n    score: '0-100',\n    must_have_match: 'array with evidence',\n    gaps: 'array with missing evidence',\n    interview_questions: 'array',\n    decision: 'shortlist | recruiter_review',\n    confidence: 'low | medium | high'\n  },\n  rule: 'Do not reject candidate automatically; send uncertain or negative cases to recruiter_review'\n};\n\nreturn [{\n  json: {\n    resume_id: input.resume_id,\n    vacancy_id: input.vacancy_id,\n    ats_candidate_id: input.ats?.candidate_id,\n    must_have: mustHave,\n    nice_to_have: niceToHave,\n    prompt_contract: promptContract,\n    review_required: true,\n    audit_key: `hh:${input.vacancy_id}:${input.resume_id}`\n  }\n}];"
      },
      "id": "12949709-a47f-4f32-b60f-da8858b421c3",
      "name": "Prepare criteria and prompt",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        280,
        260
      ]
    },
    {
      "parameters": {},
      "id": "4ced4210-391c-4efe-baed-9faa4f07a0a5",
      "name": "Fetch resume facts",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 2,
      "position": [
        560,
        260
      ]
    },
    {
      "parameters": {},
      "id": "2b0417a8-20b6-4f6b-8495-250d047270ad",
      "name": "AI scoring",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 2,
      "position": [
        840,
        260
      ]
    },
    {
      "parameters": {},
      "id": "eeaa71d1-6396-446f-a00b-adf77e6c5eae",
      "name": "Recruiter review gate",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 2,
      "position": [
        1120,
        260
      ]
    },
    {
      "parameters": {},
      "id": "2e84bbc9-872d-4173-8dfc-1ee011b8416e",
      "name": "Update ATS",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 2,
      "position": [
        1400,
        260
      ]
    }
  ],
  "connections": {
    "Webhook input": {
      "main": [
        [
          {
            "node": "Prepare criteria and prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare criteria and prompt": {
      "main": [
        [
          {
            "node": "Fetch resume facts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch resume facts": {
      "main": [
        [
          {
            "node": "AI scoring",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI scoring": {
      "main": [
        [
          {
            "node": "Recruiter review gate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Recruiter review gate": {
      "main": [
        [
          {
            "node": "Update ATS",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": [
    "nodbot",
    "production",
    "template"
  ],
  "triggerCount": 1,
  "updatedAt": "2026-05-30T00:00:00.000Z",
  "versionId": "a5b54bf7-11a3-4944-91a6-7d37f7fe6d32",
  "meta": {
    "templateCredsSetupCompleted": false
  }
}