{
  "name": "Candidate Employment Verification",
  "nodes": [
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        224,
        80
      ],
      "id": "7e0916fc-ee74-4ffb-87b7-f6e1ae94c572",
      "name": "Loop Over Items"
    },
    {
      "parameters": {
        "sendTo": "={{ $json[\"Company email\"] }}",
        "subject": "=Employment Verification Request – {{ $json['Candidate Name'] }}",
        "message": "=<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"UTF-8\">\n  <title>Employment Verification Request</title>\n</head>\n<body style=\"font-family: Arial, sans-serif; line-height: 1.6; color: #333;\">\n\n  <p>👋 <strong>Hello {{ $json['Company name'] }}Team,</strong></p>\n\n  <p>I hope this message finds you well. ✨</p>\n\n  <p>\n    We are currently in the process of verifying the employment details of \n    <strong>{{ $json['Company name'] }}</strong>, who has applied for a position with us.  \n    As part of our standard background verification process, we kindly request your confirmation on the following:\n  </p>\n\n  <ul style=\"list-style-type: none; padding: 0;\">\n    <li>📅 <strong>Employment Period:</strong> Could you please confirm the candidate’s start and end dates of employment?</li>\n    <li>🏢 <strong>Designation/Role:</strong> What position did the candidate hold during their tenure?</li>\n    <li>📋 <strong>Key Responsibilities:</strong> What were the candidate’s primary responsibilities in this role?</li>\n    <li>🔄 <strong>Reason for Leaving:</strong> Could you share the reason for the candidate’s separation?</li>\n    <li>🌟 <strong>Overall Performance & Conduct:</strong> How would you evaluate the candidate’s overall performance and behavior at work?</li>\n    <li>✅ <strong>Eligibility for Rehire:</strong> Would this candidate be eligible for rehire at your organization (Yes/No)?</li>\n    <li>🤝 <strong>Teamwork & Collaboration:</strong> How would you describe the candidate’s ability to collaborate with colleagues and work in a team?</li>\n    <li>⏰ <strong>Reliability & Punctuality:</strong> Did the candidate demonstrate reliability and punctuality during their employment?</li>\n  </ul>\n\n  <p>\n    We assure you that all information shared will remain <strong>strictly confidential 🔒</strong>  \n    and will only be used for recruitment purposes.\n  </p>\n\n  <p>\n    Your feedback will be greatly appreciated at your earliest convenience. 🙏\n  </p>\n\n  <p>\n    Thank you for your support and cooperation.\n  </p>\n\n  <p>\n    Warm regards,<br>\n    <strong>Forgent Systems</strong>\n  </p>\n\n</body>\n</html>\n",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        448,
        0
      ],
      "id": "a0b9be14-b115-407d-9e7a-ff57d010e4be",
      "name": "Send a message",
      "webhookId": "a7237e70-a106-452e-88e1-c9089455ae99",
      "credentials": {
        "gmailOAuth2": {
          "id": "LBIbVskaBzVhN0SE",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "content": "## Data Setup\nCreate your own spreadsheet with these tabs/columns, then select it in the Google Sheets nodes:\n- **Recruitment --Background Verification → Sheet1**: `Company email`, `Status`",
        "height": 112,
        "width": 400
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        -64
      ],
      "typeVersion": 1,
      "id": "2f7b3186-5339-47b6-ac72-56f6637162fb",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "documentId": {
          "__rl": true,
          "value": "1tbIoRP0Zsf2HhJoURB40CL4g9IGFm56kr1qWRfbGjjc",
          "mode": "list",
          "cachedResultName": "Recruitment --Background Verification"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1"
        },
        "event": "rowAdded",
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "typeVersion": 1,
      "position": [
        0,
        80
      ],
      "id": "136b18fd-1ffc-40b2-9f75-7a6da79082e5",
      "name": "Get Employment List",
      "credentials": {
        "googleSheetsTriggerOAuth2Api": {
          "id": "E6WQvM7hYnupdtJo",
          "name": "Google Sheets Trigger account"
        }
      }
    },
    {
      "parameters": {
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "value": "1tbIoRP0Zsf2HhJoURB40CL4g9IGFm56kr1qWRfbGjjc",
          "mode": "list",
          "cachedResultName": "Recruitment --Background Verification"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Company email": "={{ $('Loop Over Items').item.json[\"Company email\"] }}",
            "Status": "Send_employment_verification"
          },
          "matchingColumns": [
            "Company email"
          ],
          "schema": [
            {
              "id": "Candidate Name",
              "displayName": "Candidate Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Company name",
              "displayName": "Company name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Company email",
              "displayName": "Company email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Role",
              "displayName": "Role",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        672,
        80
      ],
      "id": "79811a11-ea4e-43ea-b629-8a482b443abd",
      "name": "Status Update",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "9rJzpmHDDKlqEEe9",
          "name": "Google Sheets account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message": {
      "main": [
        [
          {
            "node": "Status Update",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Employment List": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Status Update": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "42365635-e22a-4021-a8b5-b7aa0a65392c",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "f1c26778ec36097a9722a22c47c5e9c01f00b8862dadd0121ec118026a370fa6"
  },
  "id": "k7FjkH8D0eDNBJZB",
  "tags": []
}