{
  "name": "AI-Powered HR Recruitment Pipeline",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "hr-recruitment",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "c8cfc6da-ac09-4c85-91e4-31ebc8b3f13c",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        -1760,
        320
      ]
    },
    {
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "string": [
            {
              "name": "applicant_name",
              "value": "={{$json.body.applicant_name}}"
            },
            {
              "name": "email",
              "value": "={{$json.body.email}}"
            },
            {
              "name": "role",
              "value": "={{$json.body.role}}"
            },
            {
              "name": "cv_text",
              "value": "={{$json.body.cv_text}}"
            },
            {
              "name": "skills",
              "value": "={{$json.body.skills}}"
            }
          ],
          "number": [
            {
              "name": "years_experience",
              "value": "={{$json.body.years_experience}}"
            }
          ]
        },
        "options": {
          "dotNotation": false
        }
      },
      "id": "20cb5cbb-c567-4e5a-9cdf-279a06721f97",
      "name": "Extract & Clean Fields",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        -1536,
        320
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 1
          },
          "conditions": [
            {
              "id": "cv_check",
              "leftValue": "={{$json.cv_text}}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "notEmpty"
              }
            },
            {
              "id": "email_check",
              "leftValue": "={{$json.email}}",
              "rightValue": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
              "operator": {
                "type": "string",
                "operation": "regex"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "da5d85f8-ac97-4ad4-b6d9-7c1be74c6a60",
      "name": "Validate Required Fields",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        -1328,
        320
      ]
    },
    {
      "parameters": {
        "jsCode": "const jobDescriptions = {\n  'AI/ML Engineer': 'We are hiring an AI/ML Engineer with strong Python, experience building and deploying ML models, familiarity with LLM tooling (LangChain/LangGraph), and at least 1-2 years of relevant project or internship experience. Strong communication and portfolio of applied projects required.',\n  'Data Scientist': 'Seeking a Data Scientist skilled in Python, SQL, statistical modeling, and data visualization (Power BI/Tableau). 2+ years experience preferred. Strong storytelling with data and stakeholder communication required.',\n  'Backend Developer': 'Looking for a Backend Developer proficient in Node.js or Python, REST API design, databases (SQL/NoSQL), and cloud deployment (Docker/AWS). 2+ years experience preferred.'\n};\n\nconst role = $input.item.json.role;\nconst jd = jobDescriptions[role] || 'General role: strong technical skills, relevant project experience, and clear communication required.';\n\nreturn {\n  ...$input.item.json,\n  job_description: jd\n};"
      },
      "id": "9333da34-bd20-45ed-9454-8c4b5bccd312",
      "name": "Load Job Description",
      "type": "n8n-nodes-base.code",
      "typeVersion": 1,
      "position": [
        -1104,
        224
      ]
    },
    {
      "parameters": {
        "model": "gpt-4o-mini",
        "options": {
          "temperature": 0.2
        }
      },
      "id": "3c288ea6-ed2f-4ccd-9b74-2dba4a85f276",
      "name": "OpenAI Model - Screening",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1,
      "position": [
        -1088,
        400
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "Job Description:\n{{$json.job_description}}\n\nCandidate Name: {{$json.applicant_name}}\nYears of Experience (self-reported): {{$json.years_experience}}\nSkills (self-reported): {{$json.skills}}\n\nCV Text:\n{{$json.cv_text}}\n\nScore this candidate against the job description.",
        "options": {
          "systemMessage": "You are a rigorous, unbiased CV screening agent for a technical recruitment pipeline. Compare the candidate's CV against the job description and output ONLY a valid JSON object (no markdown fences, no extra text) with exactly these 8 fields:\noverall_score (integer 0-100, weighted composite: 40% skills_match, 35% experience_match, 25% culture_fit),\nskills_match (integer 0-100),\nexperience_match (integer 0-100),\nculture_fit (integer 0-100, based on communication style, achievements, and soft indicators in the CV),\ndecision (string: exactly 'Shortlisted' if overall_score>=75, 'Under Review' if 50-74, 'Rejected' if <50),\nrationale (string, 2-3 sentences, plain English explanation of the score),\nred_flags (array of strings, any concerns or missing requirements detected, empty array if none),\nstrengths (array of strings, top 3 standout qualities from the CV).\nBe consistent and evidence-based. Do not fabricate CV content that isn't present."
        }
      },
      "id": "cb38ae79-12bf-4a05-95c3-38c531bc52b1",
      "name": "CV Screening Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        -928,
        352
      ]
    },
    {
      "parameters": {
        "jsCode": "const item = $input.item.json;\nlet parsed;\ntry {\n  let raw = item.output || item.text || item;\n  if (typeof raw === 'string') {\n    raw = raw.replace(/```json|```/g, '').trim();\n    parsed = JSON.parse(raw);\n  } else {\n    parsed = raw;\n  }\n} catch (e) {\n  return { json: { ...item, error: true, error_type: 'malformed_json', error_message: 'Screening Agent did not return valid JSON: ' + e.message } };\n}\n\nconst requiredFields = ['overall_score','skills_match','experience_match','culture_fit','decision','rationale','red_flags','strengths'];\nconst missing = requiredFields.filter(f => !(f in parsed));\nif (missing.length > 0) {\n  return { json: { ...item, error: true, error_type: 'missing_score_fields', error_message: 'Missing fields: ' + missing.join(', ') } };\n}\n\nreturn {\n  json: {\n    applicant_name: $('Extract & Clean Fields').item.json.applicant_name,\n    email: $('Extract & Clean Fields').item.json.email,\n    role: $('Extract & Clean Fields').item.json.role,\n    submitted_at: $('Extract & Clean Fields').item.json.submitted_at,\n    overall_score: parsed.overall_score,\n    skills_match: parsed.skills_match,\n    experience_match: parsed.experience_match,\n    culture_fit: parsed.culture_fit,\n    decision: parsed.decision,\n    rationale: parsed.rationale,\n    red_flags: parsed.red_flags,\n    strengths: parsed.strengths,\n    cv_text: $('Extract & Clean Fields').item.json.cv_text,\n    error: false\n  }\n};"
      },
      "id": "726dca98-4a72-46ca-9444-6879b541a99b",
      "name": "Parse Screening Output",
      "type": "n8n-nodes-base.code",
      "typeVersion": 1,
      "position": [
        -656,
        224
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 1
          },
          "conditions": [
            {
              "id": "err1",
              "leftValue": "={{$json.error}}",
              "rightValue": true,
              "operator": {
                "type": "boolean",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "23c298d7-4dc2-4c64-9506-5af53760f2fd",
      "name": "IF Screening Error",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        -448,
        384
      ]
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 1
                },
                "conditions": [
                  {
                    "leftValue": "={{$json.overall_score}}",
                    "rightValue": 75,
                    "operator": {
                      "type": "number",
                      "operation": "gte"
                    },
                    "id": "fafa852b-b912-41c1-8c17-b2ac24385a83"
                  }
                ],
                "combinator": "and"
              }
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 1
                },
                "conditions": [
                  {
                    "leftValue": "={{$json.overall_score}}",
                    "rightValue": 50,
                    "operator": {
                      "type": "number",
                      "operation": "gte"
                    },
                    "id": "dfadc971-d01b-4d01-902f-26b7b562b238"
                  },
                  {
                    "leftValue": "={{$json.overall_score}}",
                    "rightValue": 75,
                    "operator": {
                      "type": "number",
                      "operation": "lt"
                    },
                    "id": "e4a0c533-9935-45ea-85ee-de74a3a1d9be"
                  }
                ],
                "combinator": "and"
              }
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 1
                },
                "conditions": [
                  {
                    "leftValue": "={{$json.overall_score}}",
                    "rightValue": 50,
                    "operator": {
                      "type": "number",
                      "operation": "lt"
                    },
                    "id": "affd9ea5-5819-42ea-8a25-cd158e00e99b"
                  }
                ],
                "combinator": "and"
              }
            }
          ]
        },
        "options": {
          "fallbackOutput": "none"
        }
      },
      "id": "18e079af-4e5e-4abf-82be-fe50b954f336",
      "name": "Route by Score",
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3,
      "position": [
        -224,
        224
      ]
    },
    {
      "parameters": {
        "model": "gpt-4o-mini",
        "options": {
          "temperature": 0.6
        }
      },
      "id": "b3baac59-2ff4-473e-abf6-a8cf21d43e33",
      "name": "OpenAI Model - Emails",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1,
      "position": [
        -304,
        -96
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "Candidate: {{$json.applicant_name}}\nRole: {{$json.role}}\nScore: {{$json.overall_score}}\nStrengths: {{$json.strengths}}\nRationale: {{$json.rationale}}\n\nWrite the outreach email body (plain text, no subject line) inviting them to interview.",
        "options": {
          "systemMessage": "You are the Shortlisted Email Agent. Write a warm, professional, genuinely enthusiastic outreach email to a candidate who scored 75 or above. Reference 1-2 specific strengths from the CV to make it feel personal, not templated. Mention that an interview slot will be shared shortly via calendar invite. Keep it under 150 words. Sign off as 'The Talent Acquisition Team'."
        }
      },
      "id": "f7bc5f90-6f3a-4a53-90fe-fc52cb4abcb7",
      "name": "Shortlisted Email Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        0,
        112
      ]
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "Candidate: {{$json.applicant_name}}\nRole: {{$json.role}}\nScore: {{$json.overall_score}}\nRationale: {{$json.rationale}}\n\nWrite a holding email body (plain text, no subject line).",
        "options": {
          "systemMessage": "You are the Under Review Email Agent. Write a courteous holding email letting the candidate know their application is still under active review, with a decision expected within 5 business days. Keep tone warm and honest, not falsely encouraging. Under 120 words. Sign off as 'The Talent Acquisition Team'."
        }
      },
      "id": "df1bac69-a72a-442d-8c6b-c1dcb5e0920d",
      "name": "Under Review Email Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        0,
        272
      ]
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "Candidate: {{$json.applicant_name}}\nRole: {{$json.role}}\nRationale: {{$json.rationale}}\n\nWrite a rejection email body (plain text, no subject line).",
        "options": {
          "systemMessage": "You are the Rejected Email Agent. Write a warm, respectful, encouraging rejection email. Do not restate a numeric score. Thank them for their time, note the role wasn't the right fit this time, and invite them to apply for future roles. Never mention red flags directly. Under 120 words. Sign off as 'The Talent Acquisition Team'."
        }
      },
      "id": "110c104f-abe3-4f8e-b224-15f83c8fbb2c",
      "name": "Rejected Email Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        0,
        432
      ]
    },
    {
      "parameters": {
        "resource": "message",
        "subject": "=Great news about your {{$('Parse Screening Output').item.json.role}} application",
        "message": "={{$json.output}}",
        "toList": [
          "=={{ $('Parse Screening Output').item.json.email }}"
        ],
        "additionalFields": {}
      },
      "id": "91290284-22af-441f-9724-372bf9ec42b9",
      "name": "Send Shortlisted Email",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 1,
      "position": [
        224,
        112
      ],
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "message",
        "subject": "=Update on your {{$('Parse Screening Output').item.json.role}} application",
        "message": "={{$json.output}}",
        "toList": [
          "=={{ $('Parse Screening Output').item.json.email }}"
        ],
        "additionalFields": {}
      },
      "id": "b208e48f-3e2b-4301-96a0-cc0570470b59",
      "name": "Send Under Review Email",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 1,
      "position": [
        224,
        272
      ],
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "message",
        "subject": "=Update on your {{$('Parse Screening Output').item.json.role}} application",
        "message": "={{$json.output}}",
        "toList": [
          "=={{ $('Parse Screening Output').item.json.email }}"
        ],
        "additionalFields": {}
      },
      "id": "cb3f95f0-adfb-45ab-be7b-f57f4ae8f619",
      "name": "Send Rejected Email",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 1,
      "position": [
        224,
        432
      ],
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "calendar": {
          "__rl": true,
          "value": "primary",
          "mode": "list"
        },
        "start": "={{$now.plus({days: 2}).set({hour: 11, minute: 0, second: 0}).toISO()}}",
        "end": "={{$now.plus({days: 2}).set({hour: 12, minute: 0, second: 0}).toISO()}}",
        "additionalFields": {
          "attendees": "={{[{email: $('Parse Screening Output').item.json.email}]}}",
          "description": "=Auto-scheduled interview. Screening score: {{$('Parse Screening Output').item.json.overall_score}}. Rationale: {{$('Parse Screening Output').item.json.rationale}}",
          "summary": "=Interview: {{$('Parse Screening Output').item.json.applicant_name}} - {{$('Parse Screening Output').item.json.role}}"
        }
      },
      "id": "714f0726-e566-4d92-9782-7ce8a1cc515c",
      "name": "Book Interview - Google Calendar",
      "type": "n8n-nodes-base.googleCalendar",
      "typeVersion": 1,
      "position": [
        448,
        112
      ],
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "mode": "chooseBranch",
        "numberInputs": 3
      },
      "id": "f8da9fc1-ac72-4ba2-bda4-73b22604231a",
      "name": "Merge Branches",
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3,
      "position": [
        672,
        272
      ]
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "operation": "append",
        "sheetId": "1RqMD4hPB3cw7HU5vOl25r5hif93I_m5NkFZCPlTZGco",
        "range": "Candidates!A:I",
        "options": {
          "usePathForKeyRow": true,
          "valueInputMode": "USER_ENTERED"
        }
      },
      "id": "aff3150d-fe25-44e6-b661-aa0893c8a5bc",
      "name": "Log to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 1,
      "position": [
        880,
        272
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "databasePage",
        "databaseId": {
          "__rl": true,
          "mode": "id",
          "value": "39deae682f0c809ca50fff942039012f",
          "__regex": "^([0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12})"
        },
        "propertiesUi": {
          "propertyValues": [
            {},
            {}
          ]
        },
        "blockUi": {
          "blockValues": [
            {},
            {}
          ]
        },
        "options": {}
      },
      "id": "20ba2e99-ec7b-4d3a-b1dc-072f1ea00d18",
      "name": "Create Notion Candidate Card",
      "type": "n8n-nodes-base.notion",
      "typeVersion": 1,
      "position": [
        1104,
        272
      ],
      "credentials": {
        "notionApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ { status: 'processed', decision: $('Parse Screening Output').item.json.decision, overall_score: $('Parse Screening Output').item.json.overall_score } }}",
        "options": {}
      },
      "id": "4db63da5-20a9-48f0-a2d3-bb11b4b9ee7c",
      "name": "Respond Success",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        1328,
        272
      ]
    },
    {
      "parameters": {
        "jsCode": "return {\n  json: {\n    error: true,\n    error_type: 'invalid_input',\n    error_message: 'Missing or invalid required field (cv_text empty or email malformed).',\n    applicant_name: $json.applicant_name || 'unknown',\n    timestamp: new Date().toISOString()\n  }\n};"
      },
      "id": "81e41964-2090-44ec-86d5-efc107532558",
      "name": "Error Handler - Invalid Input",
      "type": "n8n-nodes-base.code",
      "typeVersion": 1,
      "position": [
        -1104,
        544
      ]
    },
    {
      "parameters": {
        "jsCode": "return {\n  json: {\n    error: true,\n    error_type: $json.error_type || 'screening_agent_error',\n    error_message: $json.error_message || 'CV Screening Agent failed or returned malformed output.',\n    applicant_name: $json.applicant_name || 'unknown',\n    timestamp: new Date().toISOString()\n  }\n};"
      },
      "id": "dfa08287-a545-4e4a-9f0a-3088241c3d01",
      "name": "Error Handler - Screening Failure",
      "type": "n8n-nodes-base.code",
      "typeVersion": 1,
      "position": [
        -224,
        544
      ]
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "operation": "append",
        "sheetId": "1RqMD4hPB3cw7HU5vOl25r5hif93I_m5NkFZCPlTZGco",
        "range": "Errors!A:D",
        "options": {
          "usePathForKeyRow": true,
          "valueInputMode": "USER_ENTERED"
        }
      },
      "id": "255f50a5-c9cb-43d5-8c04-fee13acddf83",
      "name": "Log Error to Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 1,
      "position": [
        16,
        688
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ { status: 'error', error_type: $json.error_type, error_message: $json.error_message } }}",
        "options": {}
      },
      "id": "2a9b84dd-3013-494f-8bb9-c40a2ae2ffd4",
      "name": "Respond Error",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        224,
        544
      ]
    }
  ],
  "connections": {
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Extract & Clean Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract & Clean Fields": {
      "main": [
        [
          {
            "node": "Validate Required Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Required Fields": {
      "main": [
        [
          {
            "node": "Load Job Description",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Error Handler - Invalid Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Load Job Description": {
      "main": [
        [
          {
            "node": "CV Screening Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CV Screening Agent": {
      "main": [
        [
          {
            "node": "Parse Screening Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Screening Output": {
      "main": [
        [
          {
            "node": "IF Screening Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF Screening Error": {
      "main": [
        [
          {
            "node": "Error Handler - Screening Failure",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Route by Score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Score": {
      "main": [
        [
          {
            "node": "Shortlisted Email Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Under Review Email Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Rejected Email Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Shortlisted Email Agent": {
      "main": [
        [
          {
            "node": "Send Shortlisted Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Under Review Email Agent": {
      "main": [
        [
          {
            "node": "Send Under Review Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rejected Email Agent": {
      "main": [
        [
          {
            "node": "Send Rejected Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Shortlisted Email": {
      "main": [
        [
          {
            "node": "Book Interview - Google Calendar",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Book Interview - Google Calendar": {
      "main": [
        [
          {
            "node": "Merge Branches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Under Review Email": {
      "main": [
        [
          {
            "node": "Merge Branches",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Send Rejected Email": {
      "main": [
        [
          {
            "node": "Merge Branches",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Merge Branches": {
      "main": [
        [
          {
            "node": "Log to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log to Google Sheets": {
      "main": [
        [
          {
            "node": "Create Notion Candidate Card",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Notion Candidate Card": {
      "main": [
        [
          {
            "node": "Respond Success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error Handler - Invalid Input": {
      "main": [
        [
          {
            "node": "Log Error to Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error Handler - Screening Failure": {
      "main": [
        [
          {
            "node": "Log Error to Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Error to Sheets": {
      "main": [
        [
          {
            "node": "Respond Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Screening": {
      "ai_languageModel": [
        [
          {
            "node": "CV Screening Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Emails": {
      "ai_languageModel": [
        [
          {
            "node": "Shortlisted Email Agent",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Under Review Email Agent",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Rejected Email Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "versionId": "bb2dfa10-eb0e-48c8-855e-2b82df3733dc",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodeGroups": [],
  "id": "H7pb3qDT72ynNURv",
  "tags": []
}