{
  "id": "NAcFYP0gx5AC3sjJ",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Screening & auto-rating, auto reply candidate CV/resume with AI agent",
  "tags": [],
  "nodes": [
    {
      "id": "152ddb26-ecb2-456f-a351-91cd73a55263",
      "name": "Author Message",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        1184
      ],
      "parameters": {
        "color": 4,
        "width": 550,
        "height": 380,
        "content": "## Author Message\n\nHi! I am **Nguyen Thieu Toan (Jay Nguyen)** \u2014 a Verified n8n Creator and CEO/Founder of **GenStaff**.\nThank you for using this template!\n\nThis workflow is shared with you for free. If it brings value to your HR operations, optimizations, or saves you time, you can buy me a coffee here: **[My Donate Website](https://nguyenthieutoan.com/payment/)** *(PayPal, Momo, Bank Transfer)*\n\n* Website: [nguyenthieutoan.com](https://nguyenthieutoan.com)\n* Email: me@nguyenthieutoan.com\n* Company: GenStaff ([genstaff.net](https://genstaff.net))\n* Socials (Facebook / X / LinkedIn): @nguyenthieutoan\n\n*Discover more of my automation solutions:* **[Click here](https://n8n.io/creators/nguyenthieutoan/)**"
      },
      "typeVersion": 1
    },
    {
      "id": "53ebfeac-694f-46ab-80fc-2ecb551e8a7d",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3296,
        1184
      ],
      "parameters": {
        "width": 480,
        "height": 896,
        "content": "## Screening & auto-rating, auto reply candidate CV/resume with AI agent\n\n### How it works\n\nThis workflow screens job applications submitted through a form by extracting resume text from a PDF and evaluating it with an AI agent. It stores the structured candidate assessment, checks the candidate score against a threshold, and notifies HR with either a high-priority or standard message. It then sends a confirmation email to the candidate.\n\n### Setup steps\n\n- Configure the application form fields, including the candidate email and PDF resume upload field expected by the extraction node.\n- Update the Set Context node with the correct HR email, company name, job title, and job description.\n- Connect Google Gemini credentials for the AI model used by the AI CV Analyzer.\n- Configure the structured output parser to match the fields needed for candidate scoring and data table storage.\n- Set up the candidate data table schema and ensure the Save to Candidate Data Table node maps AI evaluation fields correctly.\n- Connect Gmail credentials and customize the HR notification and candidate confirmation email templates.\n- Review the score threshold in the IF node so it matches the hiring team's definition of a high-priority candidate.\n\n### Customization\n\nAdjust the job description, scoring rubric, threshold value, email wording, and stored candidate fields to match each open role or hiring process."
      },
      "typeVersion": 1
    },
    {
      "id": "4a39b392-7d7e-4738-a3fb-7964cd9bb295",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2800,
        1184
      ],
      "parameters": {
        "color": 7,
        "width": 528,
        "height": 352,
        "content": "## Collect application context\n\nReceives a candidate application through the form and adds fixed hiring context such as HR email, company name, job title, and job description for downstream evaluation."
      },
      "typeVersion": 1
    },
    {
      "id": "57ba3a50-08b7-4326-aae5-a726e8a9f740",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2256,
        1184
      ],
      "parameters": {
        "color": 7,
        "width": 688,
        "height": 752,
        "content": "## Extract and analyze CV\n\nExtracts text from the uploaded PDF resume, sends it to the AI agent for evaluation, uses Gemini as the language model, and parses the AI output into a structured assessment."
      },
      "typeVersion": 1
    },
    {
      "id": "385e684e-1c5e-405b-bba2-8159ff84f5f0",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1520,
        1184
      ],
      "parameters": {
        "color": 7,
        "width": 416,
        "height": 368,
        "content": "## Store and route score\n\nSaves the candidate evaluation to a data table, then checks whether the AI-generated score is above the configured threshold to route the application into the correct notification path."
      },
      "typeVersion": 1
    },
    {
      "id": "a8522e60-f268-461f-aaa4-2bbced1de409",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1056,
        1184
      ],
      "parameters": {
        "color": 7,
        "width": 800,
        "height": 512,
        "content": "## Send hiring notifications\n\nSends different Gmail notifications to HR depending on whether the candidate is high priority or standard, then sends a confirmation email back to the candidate."
      },
      "typeVersion": 1
    },
    {
      "id": "749e3bd8-faeb-4f1d-9d52-bb6ea6777fb8",
      "name": "When Form Submitted",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -2752,
        1360
      ],
      "parameters": {
        "options": {
          "respondWithOptions": {
            "values": {}
          }
        },
        "formTitle": "Job Application Form",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Full Name",
              "requiredField": true
            },
            {
              "fieldType": "email",
              "fieldLabel": "Email",
              "requiredField": true
            },
            {
              "fieldLabel": "Phone Number"
            },
            {
              "fieldLabel": "LinkedIn Profile URL"
            },
            {
              "fieldLabel": "Expected Salary (USD/month)",
              "placeholder": "e.g. 2000-3000",
              "requiredField": true
            },
            {
              "fieldType": "file",
              "fieldLabel": "Your Resume / CV",
              "requiredField": true,
              "acceptFileTypes": ".pdf"
            }
          ]
        },
        "formDescription": "Please fill in the details below and attach your CV/Resume (PDF only)."
      },
      "typeVersion": 2.5
    },
    {
      "id": "ddfe2f2b-ba84-458f-8c2a-0a8690add63b",
      "name": "Set HR and Job Details",
      "type": "n8n-nodes-base.set",
      "position": [
        -2528,
        1360
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "cfg-001",
              "name": "hr_email",
              "type": "string",
              "value": "user@example.com"
            },
            {
              "id": "cfg-002",
              "name": "company_name",
              "type": "string",
              "value": "Your Company Name"
            },
            {
              "id": "cfg-003",
              "name": "job_title",
              "type": "string",
              "value": "Software Engineer"
            },
            {
              "id": "cfg-004",
              "name": "job_description",
              "type": "string",
              "value": "We are looking for a Software Engineer with 2+ years of experience in Node.js, Python, or similar backend languages. Familiarity with REST APIs, databases (SQL/NoSQL), and version control (Git) is required. Experience with cloud platforms (AWS/GCP) is a plus. The candidate should demonstrate strong problem-solving skills, ability to work in a team, and eagerness to learn."
            },
            {
              "id": "cfg-005",
              "name": "score_threshold",
              "type": "number",
              "value": 7
            },
            {
              "id": "cfg-006",
              "name": "submitted_at",
              "type": "string",
              "value": "={{ $now.toFormat('dd/MM/yyyy HH:mm') }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "d305f15d-f58e-49f2-8f77-13c21b0ebffd",
      "name": "Extract CV Text",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -2144,
        1360
      ],
      "parameters": {
        "options": {},
        "operation": "pdf",
        "binaryPropertyName": "Your Resume / CV"
      },
      "typeVersion": 1.1
    },
    {
      "id": "d9863945-5d55-4c7c-ac1c-12eabc402508",
      "name": "CV Screening Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1920,
        1360
      ],
      "parameters": {
        "text": "=Please analyze the following CV for the job position.\n\n**Job Title:** {{ $('Set HR and Job Details').item.json.job_title }}\n\n**Job Description:**\n{{ $('Set HR and Job Details').item.json.job_description }}\n\n**Candidate CV Text:**\n{{ $('Extract CV Text').item.json.text }}",
        "options": {
          "systemMessage": "=You are an expert HR talent acquisition specialist and CV screening AI assistant, built by Nguyen Thieu Toan (Jay Nguyen) at GenStaff (genstaff.net).\n\nYour task is to analyze the provided CV against the job description and return a structured JSON evaluation.\n\nEvaluation criteria:\n1. **Technical skills match** \u2013 How well do the candidate's technical skills align with requirements?\n2. **Experience level** \u2013 Years of experience and relevance of past roles.\n3. **Education** \u2013 Relevant educational background.\n4. **Soft skills / Communication** \u2013 Based on how the CV is written and stated experience.\n5. **Overall fit** \u2013 Overall alignment with the role and company expectations.\n\nReturn a valid JSON object with the following structure:\n{\n  \"score\": <integer 1-10>,\n  \"recommendation\": \"<'Strong Yes' | 'Yes' | 'Maybe' | 'No'>\",\n  \"strengths\": [\"<strength 1>\", \"<strength 2>\", \"<strength 3>\"],\n  \"weaknesses\": [\"<weakness 1>\", \"<weakness 2>\"],\n  \"summary\": \"<2-3 sentence professional summary of the candidate's fit, max 100 words>\",\n  \"suggested_interview_questions\": [\"<question 1>\", \"<question 2>\", \"<question 3>\"]\n}\n\nIMPORTANT: Return ONLY the JSON object. No markdown, no preamble, no explanation outside the JSON."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "83f3063f-8632-418b-9dae-37f7cd1ce580",
      "name": "Gemini Flash Analysis",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -1984,
        1712
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "409e36f8-77e2-47eb-9b8a-cd53e6f7ddb7",
      "name": "Parse Analysis Output",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -1840,
        1584
      ],
      "parameters": {
        "autoFix": true,
        "jsonSchemaExample": "{\n  \"score\": 8,\n  \"recommendation\": \"Strong Yes\",\n  \"strengths\": [\"Strong Node.js background\", \"5 years relevant experience\", \"Good communication skills\"],\n  \"weaknesses\": [\"No AWS experience mentioned\", \"No open source contributions\"],\n  \"summary\": \"Highly qualified candidate with strong backend experience. Matches most technical requirements and shows strong problem-solving ability.\",\n  \"suggested_interview_questions\": [\"Describe your experience with REST API design.\", \"How do you handle database performance issues?\", \"Tell us about a challenging project you delivered.\"]\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "4d2731fc-60c8-447b-b577-dddb4cee363a",
      "name": "Save Candidate Info",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -1472,
        1360
      ],
      "parameters": {
        "columns": {
          "value": {
            "email": "={{ $('When Form Submitted').item.json['Email'] }}",
            "phone": "={{ $('When Form Submitted').item.json['Phone Number'] || '' }}",
            "status": "Pending Review",
            "ai_score": "={{ $('CV Screening Agent').item.json.output.score }}",
            "linkedin": "={{ $('When Form Submitted').item.json['LinkedIn Profile URL'] || '' }}",
            "full_name": "={{ $('When Form Submitted').item.json['Full Name'] }}",
            "job_title": "={{ $('Set HR and Job Details').item.json.job_title }}",
            "ai_summary": "={{ $('CV Screening Agent').item.json.output.summary }}",
            "cv_filename": "={{ $('When Form Submitted').item.json['Your Resume / CV'][0].filename }}",
            "ai_strengths": "={{ $('CV Screening Agent').item.json.output.strengths.join(', ') }}",
            "submitted_at": "={{ $('Set HR and Job Details').item.json.submitted_at }}",
            "ai_weaknesses": "={{ $('CV Screening Agent').item.json.output.weaknesses.join(', ') }}",
            "expected_salary": "={{ $('When Form Submitted').item.json['Expected Salary (USD/month)'] }}",
            "ai_recommendation": "={{ $('CV Screening Agent').item.json.output.recommendation }}",
            "ai_interview_questions": "={{ $('CV Screening Agent').item.json.output.suggested_interview_questions.join(' | ') }}"
          },
          "schema": [
            {
              "id": "full_name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "full_name",
              "defaultMatch": false
            },
            {
              "id": "email",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "email",
              "defaultMatch": false
            },
            {
              "id": "phone",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "phone",
              "defaultMatch": false
            },
            {
              "id": "linkedin",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "linkedin",
              "defaultMatch": false
            },
            {
              "id": "expected_salary",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "expected_salary",
              "defaultMatch": false
            },
            {
              "id": "cv_filename",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "cv_filename",
              "defaultMatch": false
            },
            {
              "id": "ai_score",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "ai_score",
              "defaultMatch": false
            },
            {
              "id": "ai_recommendation",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "ai_recommendation",
              "defaultMatch": false
            },
            {
              "id": "ai_summary",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "ai_summary",
              "defaultMatch": false
            },
            {
              "id": "ai_strengths",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "ai_strengths",
              "defaultMatch": false
            },
            {
              "id": "ai_weaknesses",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "ai_weaknesses",
              "defaultMatch": false
            },
            {
              "id": "ai_interview_questions",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "ai_interview_questions",
              "defaultMatch": false
            },
            {
              "id": "job_title",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "job_title",
              "defaultMatch": false
            },
            {
              "id": "submitted_at",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "submitted_at",
              "defaultMatch": false
            },
            {
              "id": "status",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "status",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "filters": {
          "conditions": [
            {
              "keyName": "=id",
              "keyValue": "={{ $('When Form Submitted').item.json['Email'] }}"
            }
          ]
        },
        "options": {},
        "operation": "upsert",
        "dataTableId": {
          "__rl": true,
          "mode": "id",
          "value": "=YOUR_DATA_TABLE_ID_HERE"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "faaed1a5-cc7e-4850-a834-6b3bd6857c53",
      "name": "Send Candidate Confirmation",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -464,
        1392
      ],
      "parameters": {
        "sendTo": "={{ $('When Form Submitted').item.json['Email'] }}",
        "message": "=Dear {{ $('When Form Submitted').item.json['Full Name'] }},\n\nThank you for applying for the <b>{{ $('Set HR and Job Details').item.json.job_title }}</b> position at <b>{{ $('Set HR and Job Details').item.json.company_name }}</b>.\n\nWe have successfully received your CV and our team will carefully review your application. You will hear from us within 3\u20135 business days.\n\nBest regards,<br>\nHR Team<br>\n{{ $('Set HR and Job Details').item.json.company_name }}",
        "options": {
          "appendAttribution": false
        },
        "subject": "=We Have Received Your Application \u2013 {{ $('Set HR and Job Details').item.json.job_title }} at {{ $('Set HR and Job Details').item.json.company_name }}",
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "cce2986e-2b31-4432-9c63-2a2190dbc922",
      "name": "Check Score Threshold",
      "type": "n8n-nodes-base.if",
      "position": [
        -1248,
        1360
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "score-condition-001",
              "operator": {
                "type": "number",
                "operation": "gte"
              },
              "leftValue": "={{ $('CV Screening Agent').item.json.output.score }}",
              "rightValue": "={{ $('Set HR and Job Details').item.json.score_threshold }}"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "dcd967ff-31fa-433d-a389-97b0b6cdc140",
      "name": "Notify HR (High Priority)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -688,
        1296
      ],
      "parameters": {
        "sendTo": "={{ $('Set HR and Job Details').item.json.hr_email }}",
        "message": "=<h2>\ud83c\udf1f High Priority Candidate Alert</h2>\n<p>A new CV has been submitted and received a high compatibility score.</p>\n\n<table style='border-collapse:collapse;width:100%'>\n  <tr><td style='padding:6px;font-weight:bold;background:#f0f4ff'>Candidate Name</td><td style='padding:6px'>{{ $('When Form Submitted').item.json['Full Name'] }}</td></tr>\n  <tr><td style='padding:6px;font-weight:bold;background:#f0f4ff'>Email</td><td style='padding:6px'>{{ $('When Form Submitted').item.json['Email'] }}</td></tr>\n  <tr><td style='padding:6px;font-weight:bold;background:#f0f4ff'>LinkedIn</td><td style='padding:6px'>{{ $('When Form Submitted').item.json['LinkedIn Profile URL'] || 'Not provided' }}</td></tr>\n  <tr><td style='padding:6px;font-weight:bold;background:#f0f4ff'>Expected Salary</td><td style='padding:6px'>{{ $('When Form Submitted').item.json['Expected Salary (USD/month)'] }}</td></tr>\n  <tr><td style='padding:6px;font-weight:bold;background:#f0f4ff'>Applied For</td><td style='padding:6px'>{{ $('Set HR and Job Details').item.json.job_title }}</td></tr>\n  <tr><td style='padding:6px;font-weight:bold;background:#f0f4ff'>Submitted At</td><td style='padding:6px'>{{ $('Set HR and Job Details').item.json.submitted_at }}</td></tr>\n</table>\n\n<h3 style='color:#1d4ed8'>\ud83e\udd16 AI Evaluation (Powered by Gemini AI)</h3>\n<table style='border-collapse:collapse;width:100%'>\n  <tr><td style='padding:6px;font-weight:bold;background:#eff6ff'>AI Score</td><td style='padding:6px'><strong style='font-size:18px;color:#1d4ed8'>{{ $('CV Screening Agent').item.json.output.score }} / 10</strong></td></tr>\n  <tr><td style='padding:6px;font-weight:bold;background:#eff6ff'>Recommendation</td><td style='padding:6px'><strong>{{ $('CV Screening Agent').item.json.output.recommendation }}</strong></td></tr>\n  <tr><td style='padding:6px;font-weight:bold;background:#eff6ff'>Summary</td><td style='padding:6px'>{{ $('CV Screening Agent').item.json.output.summary }}</td></tr>\n  <tr><td style='padding:6px;font-weight:bold;background:#eff6ff'>Strengths</td><td style='padding:6px'>{{ $('CV Screening Agent').item.json.output.strengths.join('<br>\u2022 ') }}</td></tr>\n  <tr><td style='padding:6px;font-weight:bold;background:#eff6ff'>Weaknesses</td><td style='padding:6px'>{{ $('CV Screening Agent').item.json.output.weaknesses.join('<br>\u2022 ') }}</td></tr>\n  <tr><td style='padding:6px;font-weight:bold;background:#eff6ff'>Suggested Interview Questions</td><td style='padding:6px'>{{ $('CV Screening Agent').item.json.output.suggested_interview_questions.join('<br>') }}</td></tr>\n</table>\n\n<hr>\n<small style='color:#9ca3af'>Automated by GenStaff AI System \u00b7 Built by Nguyen Thieu Toan (Jay Nguyen) \u00b7 nguyenthieutoan.com</small>",
        "options": {
          "appendAttribution": false
        },
        "subject": "=\ud83c\udf1f [HIGH PRIORITY] New CV Received \u2013 {{ $('When Form Submitted').item.json['Full Name'] }} | Score: {{ $('CV Screening Agent').item.json.output.score }}/10",
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "bbbfea8c-6878-4fa3-9208-20602ea9df35",
      "name": "Notify HR for Standard Candidate",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -688,
        1488
      ],
      "parameters": {
        "sendTo": "={{ $('Set HR and Job Details').item.json.hr_email }}",
        "message": "=<h2>New CV Submission</h2>\n<p>A new CV has been submitted for review.</p>\n\n<table style='border-collapse:collapse;width:100%'>\n  <tr><td style='padding:6px;font-weight:bold;background:#f9fafb'>Candidate Name</td><td style='padding:6px'>{{ $('When Form Submitted').item.json['Full Name'] }}</td></tr>\n  <tr><td style='padding:6px;font-weight:bold;background:#f9fafb'>Email</td><td style='padding:6px'>{{ $('When Form Submitted').item.json['Email'] }}</td></tr>\n  <tr><td style='padding:6px;font-weight:bold;background:#f9fafb'>LinkedIn</td><td style='padding:6px'>{{ $('When Form Submitted').item.json['LinkedIn Profile URL'] || 'Not provided' }}</td></tr>\n  <tr><td style='padding:6px;font-weight:bold;background:#f9fafb'>Expected Salary</td><td style='padding:6px'>{{ $('When Form Submitted').item.json['Expected Salary (USD/month)'] }}</td></tr>\n  <tr><td style='padding:6px;font-weight:bold;background:#f9fafb'>Applied For</td><td style='padding:6px'>{{ $('Set HR and Job Details').item.json.job_title }}</td></tr>\n  <tr><td style='padding:6px;font-weight:bold;background:#f9fafb'>Submitted At</td><td style='padding:6px'>{{ $('Set HR and Job Details').item.json.submitted_at }}</td></tr>\n</table>\n\n<h3>\ud83e\udd16 AI Evaluation</h3>\n<table style='border-collapse:collapse;width:100%'>\n  <tr><td style='padding:6px;font-weight:bold;background:#f9fafb'>AI Score</td><td style='padding:6px'><strong>{{ $('CV Screening Agent').item.json.output.score }} / 10</strong></td></tr>\n  <tr><td style='padding:6px;font-weight:bold;background:#f9fafb'>Recommendation</td><td style='padding:6px'>{{ $('CV Screening Agent').item.json.output.recommendation }}</td></tr>\n  <tr><td style='padding:6px;font-weight:bold;background:#f9fafb'>Summary</td><td style='padding:6px'>{{ $('CV Screening Agent').item.json.output.summary }}</td></tr>\n  <tr><td style='padding:6px;font-weight:bold;background:#f9fafb'>Strengths</td><td style='padding:6px'>{{ $('CV Screening Agent').item.json.output.strengths.join(', ') }}</td></tr>\n</table>\n\n<hr>\n<small style='color:#9ca3af'>Automated by GenStaff AI System \u00b7 Built by Nguyen Thieu Toan (Jay Nguyen) \u00b7 nguyenthieutoan.com</small>",
        "options": {
          "appendAttribution": false
        },
        "subject": "=\ud83d\udccb New CV Received \u2013 {{ $('When Form Submitted').item.json['Full Name'] }} | Score: {{ $('CV Screening Agent').item.json.output.score }}/10",
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  },
  "versionId": "8a0334f5-4d95-4fe1-a5bd-0f2ae5510b62",
  "connections": {
    "Extract CV Text": {
      "main": [
        [
          {
            "node": "CV Screening Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CV Screening Agent": {
      "main": [
        [
          {
            "node": "Save Candidate Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Candidate Info": {
      "main": [
        [
          {
            "node": "Check Score Threshold",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Form Submitted": {
      "main": [
        [
          {
            "node": "Set HR and Job Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Score Threshold": {
      "main": [
        [
          {
            "node": "Notify HR (High Priority)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Notify HR for Standard Candidate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini Flash Analysis": {
      "ai_languageModel": [
        [
          {
            "node": "CV Screening Agent",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Parse Analysis Output",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Parse Analysis Output": {
      "ai_outputParser": [
        [
          {
            "node": "CV Screening Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Set HR and Job Details": {
      "main": [
        [
          {
            "node": "Extract CV Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify HR (High Priority)": {
      "main": [
        [
          {
            "node": "Send Candidate Confirmation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify HR for Standard Candidate": {
      "main": [
        [
          {
            "node": "Send Candidate Confirmation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}