{
  "name": "09 · HR & Recruiting / Resume Intake & AI Ranker",
  "active": false,
  "nodes": [
    {
      "id": "683721c9-c115-408c-8149-dfc026b0d1c9",
      "name": "📘 Guide",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -640,
        -120
      ],
      "parameters": {
        "content": "## 09 · HR & Recruiting · Resume Intake & AI Ranker\n\n### What this does\nReceives applications, extracts skills, scores vs job req, and shortlists to ATS stage.\n\n### Setup checklist\n1. Careers form webhook\n2. LLM extract/score\n3. ATS API\n\n### How to test locally\nPOST `hr-resume` with `{ \"resumeText\":\"...\", \"role\":\"Engineer\" }`\n\n### Tips\n- Keep credentials in n8n Credentials (never hardcode secrets).\n- Use **Test URL** on the Webhook while developing.\n- Activate only after credentials + destinations are configured.\n",
        "width": 560,
        "height": 560,
        "color": 5
      }
    },
    {
      "id": "624a69e4-3a8e-44e9-a289-093d336a13fe",
      "name": "⚙️ Config",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -640,
        480
      ],
      "parameters": {
        "content": "## Config map\n\n- **Webhook path:** `hr-resume`\n- **Replace** all `https://httpbin.org/...` calls with real integrations.\n- **Credentials:** create in n8n → Credentials, then select on HTTP nodes.\n- **Activate** workflow only after a successful Test execution.\n\n### Local files\nShared host folder is mounted at `/files` inside n8n.",
        "width": 560,
        "height": 320,
        "color": 2
      }
    },
    {
      "id": "015a675f-17af-4c1e-8d77-4bdf6519f306",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        0,
        200
      ],
      "webhookId": "d379806d-ea9b-42cc-879c-1ba08948893d",
      "parameters": {
        "httpMethod": "POST",
        "path": "hr-resume",
        "responseMode": "responseNode",
        "options": {}
      }
    },
    {
      "id": "e42d9500-f6bf-4298-ab3f-064e28632040",
      "name": "Build Prompt Context",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        280,
        200
      ],
      "parameters": {
        "mode": "manual",
        "duplicateItem": false,
        "assignments": {
          "assignments": [
            {
              "id": "1",
              "name": "system",
              "value": "You are an expert operator for: Resume Intake & AI Ranker",
              "type": "string"
            },
            {
              "id": "2",
              "name": "userInput",
              "value": "={{ $json.body || $json }}",
              "type": "object"
            },
            {
              "id": "3",
              "name": "model",
              "value": "gpt-4.1-mini",
              "type": "string"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "797fbccf-0b3a-491b-b17e-5473d91e0231",
      "name": "AI Transform (swap for LLM node)",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        560,
        200
      ],
      "parameters": {
        "mode": "runOnceForAllItems",
        "language": "javaScript",
        "jsCode": "const ctx = $input.first().json;\nconst input = ctx.userInput || {};\n// Placeholder \"model\" output — replace this Code node with OpenAI/Anthropic node.\nconst draft = {\n  summary: `Generated by Resume Intake & AI Ranker`,\n  bullets: Object.keys(input).slice(0, 8).map(k => `${k}: ${JSON.stringify(input[k]).slice(0,120)}`),\n  score: Math.round(60 + Math.random()*40),\n  recommendations: ['Review tone', 'Add CTA', 'Fact-check claims'],\n};\nreturn [{ json: { ...ctx, ai: draft, ready: draft.score >= 70 } }];"
      }
    },
    {
      "id": "b0611bee-d63f-49ee-ae9c-db06e35005b0",
      "name": "Quality Gate",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        840,
        200
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "42615574-d265-401f-8b13-3966c0ca52dc",
              "leftValue": "={{ $json.ready }}",
              "rightValue": true,
              "operator": {
                "type": "boolean",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      }
    },
    {
      "id": "40c73e1d-b830-4e73-8ec2-006b40e9f8bb",
      "name": "Persist / Publish",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1120,
        80
      ],
      "parameters": {
        "method": "POST",
        "url": "https://httpbin.org/post",
        "options": {},
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify($json) }}"
      }
    },
    {
      "id": "6a394665-c959-4457-9da2-0b9f6239f64b",
      "name": "Needs Human Review",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1120,
        320
      ],
      "parameters": {
        "mode": "manual",
        "duplicateItem": false,
        "assignments": {
          "assignments": [
            {
              "id": "1",
              "name": "review",
              "value": true,
              "type": "boolean"
            },
            {
              "id": "2",
              "name": "reason",
              "value": "AI quality score below threshold",
              "type": "string"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "8772a722-0ef0-460f-a610-e12959b4f523",
      "name": "Webhook Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        1400,
        200
      ],
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ $json }}",
        "options": {}
      }
    }
  ],
  "connections": {
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Build Prompt Context",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Prompt Context": {
      "main": [
        [
          {
            "node": "AI Transform (swap for LLM node)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Transform (swap for LLM node)": {
      "main": [
        [
          {
            "node": "Quality Gate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Quality Gate": {
      "main": [
        [
          {
            "node": "Persist / Publish",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Needs Human Review",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Persist / Publish": {
      "main": [
        [
          {
            "node": "Webhook Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Needs Human Review": {
      "main": [
        [
          {
            "node": "Webhook Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "callerPolicy": "workflowsFromSameOwner"
  },
  "tags": [],
  "meta": {
    "templateCredsSetupCompleted": true,
    "description": "Receives applications, extracts skills, scores vs job req, and shortlists to ATS stage."
  },
  "pinData": {}
}