{
  "name": "AI recruiter – analyze multiple CVs vs job description using OpenAI GPT",
  "nodes": [
    {
      "id": "613e9242-0f92-40a4-a31b-2437c4d71c78",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1808,
        16
      ]
    },
    {
      "id": "7f7a7318-cb2f-4c47-bc6f-108e307f04d1",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1008,
        -128
      ]
    },
    {
      "id": "6330221c-ec10-4c28-a05e-8a1c8640a3ad",
      "name": "AI Recruiter Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        432,
        -128
      ]
    },
    {
      "id": "b417a559-5741-410e-ad42-89d88cd63f31",
      "name": "Parse Recruiter Output",
      "type": "n8n-nodes-base.code",
      "position": [
        784,
        -128
      ]
    },
    {
      "id": "d87866a2-c309-45dc-9d6f-187eda5caac0",
      "name": "List_File",
      "type": "n8n-nodes-base.code",
      "position": [
        -1584,
        16
      ]
    },
    {
      "id": "32e65a79-c7e0-4f75-8f7b-72226f4f166e",
      "name": "Detect PDF Type",
      "type": "n8n-nodes-base.code",
      "position": [
        -1360,
        16
      ]
    },
    {
      "id": "4c49c7f6-7657-4453-985c-bc378849a09e",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -1136,
        16
      ]
    },
    {
      "id": "64cdfed3-cba0-490b-8119-e90a3273632b",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        504,
        96
      ]
    },
    {
      "id": "471ff4c6-bb44-45b8-bc9c-c8ef9e0aea45",
      "name": "Extract from File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -464,
        -128
      ]
    },
    {
      "id": "508b522e-4eee-4104-9703-f3f4097d4ac9",
      "name": "Convert Base64 to Binary",
      "type": "n8n-nodes-base.code",
      "position": [
        -912,
        16
      ]
    },
    {
      "id": "e9e7a983-9130-4f12-bfc5-c0d4163172c3",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -688,
        16
      ]
    },
    {
      "id": "1f286db8-2495-4359-9db0-7d0a60c61201",
      "name": "Replace Me",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -464,
        64
      ]
    },
    {
      "id": "4cbf8ff2-9884-46f9-b21d-207a880392f7",
      "name": "Reattach_Metadata_After_Extract",
      "type": "n8n-nodes-base.code",
      "position": [
        -240,
        -128
      ]
    },
    {
      "id": "c664f25b-3f3c-446e-832c-8a7df09334b4",
      "name": "Combine_Candidates_For_AI",
      "type": "n8n-nodes-base.code",
      "position": [
        -16,
        -128
      ]
    },
    {
      "id": "f249f3d8-524e-4e46-97a9-5577fde7a46b",
      "name": "Preprocess_CV_Names",
      "type": "n8n-nodes-base.code",
      "position": [
        208,
        -128
      ]
    },
    {
      "id": "f8aff173-8caf-428a-8aae-e5ac8203edb5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1920,
        -368
      ],
      "parameters": {
        "width": null,
        "height": 320,
        "content": "🟩 Step 1: Upload Files (JD + CVs)\n- Webhook node receives one JD and multiple CV files.\n- List_File node extracts filenames and base64 data.\n- Detect PDF Type node determines whether each file is text"
      }
    },
    {
      "id": "c3c11827-e7f5-4753-914a-cf1a312fc5e3",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -784,
        -368
      ],
      "parameters": {
        "width": null,
        "height": 304,
        "content": "🟨 Step 2: Extract & Merge Text\n- Convert Base64 to Binary → prepares each CV for text extraction.\n- Extract From File → extracts readable text from PDF.\n- Reattach_Metadata_After_Extract → restores JD"
      }
    },
    {
      "id": "7e966941-fecf-4a79-ac74-104abe8cf9c5",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        416,
        -464
      ],
      "parameters": {
        "width": null,
        "height": 288,
        "content": "🟦 Step 3: AI Analysis & Output\n- AI Recruiter Agent compares JD vs. each CV and generates structured insights (fit_score, strengths, weaknesses, recommendation).\n- Parse Recruiter Output selects the t"
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Convert Base64 to Binary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "List_File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List_File": {
      "main": [
        [
          {
            "node": "Detect PDF Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Replace Me": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Detect PDF Type": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Replace Me",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "Reattach_Metadata_After_Extract",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Recruiter Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Recruiter Agent": {
      "main": [
        [
          {
            "node": "Parse Recruiter Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Respond to Webhook": {
      "main": [
        []
      ]
    },
    "Preprocess_CV_Names": {
      "main": [
        [
          {
            "node": "AI Recruiter Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Recruiter Output": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert Base64 to Binary": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine_Candidates_For_AI": {
      "main": [
        [
          {
            "node": "Preprocess_CV_Names",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reattach_Metadata_After_Extract": {
      "main": [
        [
          {
            "node": "Combine_Candidates_For_AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}