{
  "id": "Skm63zutzEydN6nw",
  "name": "HR for sale",
  "tags": [
    {
      "id": "fI7K6zBuwoYhcQW0",
      "name": "sell",
      "createdAt": "2025-06-30T05:55:15.161Z",
      "updatedAt": "2025-06-30T05:55:15.161Z"
    }
  ],
  "nodes": [
    {
      "id": "bb7a0922-78e8-4f0c-a7cc-ade59a2716de",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -1140,
        380
      ],
      "parameters": {
        "options": {},
        "formTitle": "Please Upload your resume ",
        "formFields": {
          "values": [
            {
              "fieldType": "file",
              "fieldLabel": "Resume",
              "multipleFiles": false,
              "requiredField": true,
              "acceptFileTypes": ".pdf"
            },
            {
              "fieldType": "email",
              "fieldLabel": "Email",
              "requiredField": true
            },
            {
              "fieldType": "number",
              "fieldLabel": "Phone Number",
              "placeholder": "+1234567890",
              "requiredField": true
            },
            {
              "fieldLabel": "Name",
              "requiredField": true
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "727942d9-89d2-4478-b118-c9345cd67613",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -460,
        600
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"name\": \"John Doe\",\n  \"summary\": \"The candidate holds a Master\u2019s degree and over 9 years of enterprise software experience. They demonstrate strong leadership in microservices and DevOps, but lack direct exposure to safety and compliance workflows.\",\n  \"match_score\": 8.3,\n  \"job_match\": {\n    \"masters_degree\": true,\n    \"8+_years_experience\": true,\n    \"microservices_expertise\": true,\n    \"full_stack_development\": true,\n    \"cloud_native_architecture\": true,\n    \"cross_functional_leadership\": true,\n    \"interpersonal_and_mentoring_skills\": true\n  },\n  \"aramco_critical_fit\": {\n    \"education_and_technical_skills\": true,\n    \"industry_or_energy_experience\": true,\n    \"safety_and_compliance_mindset\": false,\n    \"global_or_crossfunctional_team_experience\": true,\n    \"innovation_and_ownership\": true\n  },\n  \"decision\": \"Proceed\",\n  \"justification\": \"The candidate meets all essential technical and leadership requirements. Despite a minor gap in compliance exposure, their strong experience with cloud, microservices, and team management supports proceeding to the next stage.\"\n\n\n}\n"
      },
      "typeVersion": 1.3
    },
    {
      "id": "7c86337e-43b1-4876-a092-810e5f838ba6",
      "name": "OpenAI 4o",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -740,
        600
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "gpt-4o"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "ede9f19f-2710-478b-b105-341743bd68cc",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        80,
        480
      ],
      "parameters": {
        "columns": {
          "value": {
            "Q1": "={{ $json.output.aramco_critical_fit.education_and_technical_skills }}",
            "Q2": "={{ $json.output.aramco_critical_fit.industry_or_energy_experience }}",
            "Q3": "={{ $json.output.aramco_critical_fit.safety_and_compliance_mindset }}",
            "Q4": "={{ $json.output.aramco_critical_fit.global_or_crossfunctional_team_experience }}",
            "Q5": "={{ $json.output.aramco_critical_fit.innovation_and_ownership }}",
            "NAME": "={{ $json.output.name }}",
            "Email": "={{ $('On form submission').item.json.Email.toLowerCase() }}",
            "SUMMARY ": "={{ $json.output.summary }}",
            "Phone Number": "={{ $('On form submission').item.json['Phone Number'] }}",
            "JUSTIFICATION ": "={{ $json.output.justification }}"
          },
          "schema": [
            {
              "id": "NAME",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "NAME",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone Number",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Phone Number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "JUSTIFICATION ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "JUSTIFICATION ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "SUMMARY ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "SUMMARY ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Q1",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Q1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Q2",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Q2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Q3",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Q3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Q4",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Q4",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Q5",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Q5",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 839612147,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/18vvSKGbAiodQvNsdNTJ1pBuhEcv2ADAmQKtDNAK7VQY/edit#gid=839612147",
          "cachedResultName": "Rejected"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "18vvSKGbAiodQvNsdNTJ1pBuhEcv2ADAmQKtDNAK7VQY",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/18vvSKGbAiodQvNsdNTJ1pBuhEcv2ADAmQKtDNAK7VQY/edit?usp=drivesdk",
          "cachedResultName": "Resumes"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "04ff4b98-64fc-46a4-88e4-fb369b06a454",
      "name": "Google Sheets2",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        80,
        280
      ],
      "parameters": {
        "columns": {
          "value": {
            "Q1": "={{ $json.output.aramco_critical_fit.education_and_technical_skills }}",
            "Q2": "={{ $json.output.aramco_critical_fit.industry_or_energy_experience }}",
            "Q3": "={{ $json.output.aramco_critical_fit.safety_and_compliance_mindset }}",
            "Q4": "={{ $json.output.aramco_critical_fit.global_or_crossfunctional_team_experience }}",
            "Q5": "={{ $json.output.aramco_critical_fit.innovation_and_ownership }}",
            "NAME": "={{ $json.output.name }}",
            "Email": "={{ $('On form submission').item.json.Email.toLowerCase() }}",
            "SUMMARY ": "={{ $json.output.summary }}",
            "Phone Number": "={{ $('On form submission').item.json['Phone Number'] }}",
            "JUSTIFICATION ": "={{ $json.output.justification }}"
          },
          "schema": [
            {
              "id": "NAME",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "NAME",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone Number",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Phone Number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "JUSTIFICATION ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "JUSTIFICATION ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "SUMMARY ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "SUMMARY ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Q1",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Q1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Q2",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Q2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Q3",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Q3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Q4",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Q4",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Q5",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Q5",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/18vvSKGbAiodQvNsdNTJ1pBuhEcv2ADAmQKtDNAK7VQY/edit#gid=0",
          "cachedResultName": "Accepted"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "18vvSKGbAiodQvNsdNTJ1pBuhEcv2ADAmQKtDNAK7VQY",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/18vvSKGbAiodQvNsdNTJ1pBuhEcv2ADAmQKtDNAK7VQY/edit?usp=drivesdk",
          "cachedResultName": "Resumes"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "46667a81-0149-4630-806a-c9cf6bde3572",
      "name": "Text Classifier",
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "position": [
        -320,
        380
      ],
      "parameters": {
        "options": {},
        "inputText": "={{ $json.output.decision }}",
        "categories": {
          "categories": [
            {
              "category": "Accepted",
              "description": "if the decision is Proceed "
            },
            {
              "category": "Rejected ",
              "description": "if the decision is rejct "
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "2d223346-0aa4-4493-91a4-4fda74fc844a",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -240,
        600
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "f021f6fb-3b64-4de7-8bee-39f467533335",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1240,
        180
      ],
      "parameters": {
        "content": "## Input\n**First the user will submit pdf file of his resume, name and email**, phone can be switched to option "
      },
      "typeVersion": 1
    },
    {
      "id": "458b4c36-c72c-4495-b38d-9d836dd15810",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -840,
        -320
      ],
      "parameters": {
        "color": 3,
        "width": 680,
        "height": 620,
        "content": "\u2705 AI Resume Evaluator \u2013 Setup Instructions\n\n\ud83e\udde0 What This Does:\nAutomatically checks if a resume matches your job requirements and gives a decision: Proceed or Reject.\n\n\ud83d\udd27 What You Need to Edit:\nReplace the bold parts in the AI Agent prompt:\n\u2022 COMPANY NAME \u2192 e.g. \"Saudi Aramco\"\n\u2022 ROLE NAME \u2192 e.g. \"Digital Solutions Lead\"\n\u2022 ROLE DESCRIPTION \u2192 1\u20132 lines about the role\n\u2022 CRITERIA 1\u20135 \u2192 must requirements (e.g. Microservices, Cloud,Master degree in CS, 10 years of experience, etc. MA)\n\u2022 QUESTIONS 1\u20135 \u2192 HR fit questions (e.g. \"Has worked in energy industry?\")\n\u2022 THRESHOLD \u2192 Minimum score out of 100 to pass (e.g. 75)\n\n\ud83d\udee0 How It Works:\n1. Candidate uploads their resume (PDF)\n2. AI reads it and scores based on your inputs\n3. If score meets the threshold \u2192 \u2705 Proceed\n4. If not \u2192 \u274c Reject\n5. A clear summary and reason is added to the sheet\n\n\ud83d\udca1 Tips:\n\u2022 Be clear and simple with your criteria\n\u2022 Use numeric scoring (e.g. 20 points per skill)\n\u2022 Test it with a sample resume first "
      },
      "typeVersion": 1
    },
    {
      "id": "40823f88-db29-48eb-946a-c4f3c3b0075e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        60
      ],
      "parameters": {
        "width": 320,
        "height": 200,
        "content": "**Google Sheet**\nconnect google to your account \n\ncreate a document and than add the header accordingly \n\nAdd one sheet { Accepted } and one as rejected "
      },
      "typeVersion": 1
    },
    {
      "id": "0b3952bb-47c8-48f0-b936-f3b3b2855247",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        40
      ],
      "parameters": {
        "color": 4,
        "width": 340,
        "height": 200,
        "content": "## Gmail \nConnect your gmail API\n\nyou can edit the message below to any format \n\nthe subject is generated by AI or you can use your own"
      },
      "typeVersion": 1
    },
    {
      "id": "a9c3f185-df13-4a13-813d-b021ff29f977",
      "name": "Extracting CV data",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -900,
        380
      ],
      "parameters": {
        "options": {},
        "operation": "pdf",
        "binaryPropertyName": "Resume"
      },
      "typeVersion": 1
    },
    {
      "id": "197bd717-b337-4a79-a82d-66a68c9503a8",
      "name": "Screening & Evaluating Resume's",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "onError": "continueRegularOutput",
      "position": [
        -660,
        380
      ],
      "parameters": {
        "text": "=This is my CV \"{{ $json.text }}\"",
        "options": {
          "systemMessage": "=You are a senior technical recruiter at {{COMPANY_NAME}}.\n\nEvaluate the following resume for the role: **{{ROLE_NAME}}**.\n\nThis role focuses on {{ROLE_DESCRIPTION}}.\n\n---\n\nEvaluate the resume across **two layers** using a score system (0\u201310 per item):\n\n---\n\n### \ud83d\udd39 Layer 1: Role-Specific Match (Total: 50 Points)\n\nEvaluate the resume against these **must-have qualifications**. Give each a score from 0 to 10.\n\n1. {{CRITERIA_1}}  \n2. {{CRITERIA_2}}  \n3. {{CRITERIA_3}}  \n4. {{CRITERIA_4}}  \n5. {{CRITERIA_5}}  \n\n---\n\n### \ud83d\udd39 Layer 2: Strategic Cultural Fit (Total: 50 Points)\n\nThese are optional but important soft factors. Again, score each from 0 to 10.\n\n1. {{Q1}}  \n2. {{Q2}}  \n3. {{Q3}}  \n4. {{Q4}}  \n5. {{Q5}}  \n\n---\n\nIf the **combined score is above {{THRESHOLD}}**, return:\n\n- **Decision**: Proceed  \n- **Justification**: Why they passed\n\nIf below:\n\n- **Decision**: Reject  \n- **Justification**: What they lacked\n\nAlways return a structured JSON like:\n\n```json\n{\n  \"name\": \"Candidate Name\",\n  \"summary\": \"Short summary of evaluation.\",\n  \"score_layer1\": 40,\n  \"score_layer2\": 35,\n  \"decision\": \"Proceed\",\n  \"justification\": \"They meet the majority of qualifications and show good cultural alignment.\"\n}\n"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2
    },
    {
      "id": "f9c63dfc-1f53-4f15-ad1e-1b1e606590a9",
      "name": "Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        420,
        480
      ],
      "parameters": {
        "sendTo": "={{ $('On form submission').item.json.Email.toLowerCase() }}",
        "message": "=<p>Dear <strong>{{ $('On form submission').item.json.Name }}</strong>,</p>\n\n<p>\nThank you for your interest in joining our team. We truly appreciate the time and effort you put into your application.\n</p>\n\n<p>\nAfter careful consideration, we regret to inform you that you have not been selected to move forward in the hiring process.\n</p>\n\n<p>\n<span style=\"color: red;\"><strong>Note:</strong></span> This decision was made after a thorough review of all applications, and it does not reflect negatively on your skills or qualifications.\n</p>\n\n<p>\nWe will keep your information on file and may reach out for future opportunities that better align with your profile.\n</p>\n\n<p>\nThank you once again for your interest in our company.\n</p>\n\n<p>\nBest wishes in your job search and future endeavors.\n</p>\n\n<p>\nSincerely,<br>\n<strong>HR Department</strong>\n</p>\n",
        "options": {},
        "subject": "Hiring Process"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "5828c10a-ae5d-4a1f-bb3a-2351b888a139",
      "name": "Gmail3",
      "type": "n8n-nodes-base.gmail",
      "position": [
        420,
        280
      ],
      "parameters": {
        "sendTo": "={{ $('On form submission').item.json.Email.toLowerCase() }}",
        "message": "=<p>Dear <strong>{{ $('On form submission').item.json.Name }}</strong>,</p>  <p> We are pleased to inform you that you have been selected from among many applicants for the next step in our hiring process. </p>  <p> To proceed, please schedule a meeting with our team using the link below: </p>  <p> \ud83d\udc49 <a href=\"https://cal.com/abdulaziz-saeed-lpurih/job-interview\" target=\"_blank\"><strong>Schedule Your Interview</strong></a> </p>  <p> <span style=\"color: red;\"><strong>Important:</strong> Please register using the same email address where you received this message. If a different email is used, the meeting will be canceled.</span> </p>  <p> We look forward to speaking with you soon. </p>  <p> Best regards,<br> <strong>HR Department</strong> </p>",
        "options": {
          "senderName": "HR Dept"
        },
        "subject": "Hiring Process"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "b2677df6-b8fc-4b1d-b2d4-e77803233bc3",
  "connections": {
    "OpenAI 4o": {
      "ai_languageModel": [
        [
          {
            "node": "Screening & Evaluating Resume's",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets": {
      "main": [
        [
          {
            "node": "Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets2": {
      "main": [
        [
          {
            "node": "Gmail3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Text Classifier": {
      "main": [
        [
          {
            "node": "Google Sheets2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Text Classifier",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Extracting CV data": {
      "main": [
        [
          {
            "node": "Screening & Evaluating Resume's",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Extracting CV data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "Screening & Evaluating Resume's",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Screening & Evaluating Resume's": {
      "main": [
        [
          {
            "node": "Text Classifier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}