{
  "meta": {
    "instanceId": "775c0ff43917097b0e67a90dc40f8ba24c77f50a4fff62410ed9ccdb37e8a07f"
  },
  "nodes": [
    {
      "id": "7eefa653-1d50-48d2-9f3f-48323a0a1f1c",
      "name": "Google Sheets Trigger",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        -16,
        112
      ],
      "parameters": {
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/15emSCM6Ui3O7oH2BXcorZJUi2BbWpZKCTcqq-Iyn0Kk/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "15emSCM6Ui3O7oH2BXcorZJUi2BbWpZKCTcqq-Iyn0Kk",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/15emSCM6Ui3O7oH2BXcorZJUi2BbWpZKCTcqq-Iyn0Kk/edit?usp=drivesdk",
          "cachedResultName": "Onboarding Workflows"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6f075f9c-d612-4794-84c7-ed77dcdc2aa8",
      "name": "Get PDF",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        880,
        352
      ],
      "parameters": {
        "options": {},
        "operation": "fromJson"
      },
      "typeVersion": 1
    },
    {
      "id": "f9b95280-3d09-47bc-aaaa-f37f00c7c9d7",
      "name": "PDF Generate",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        704,
        352
      ],
      "parameters": {
        "url": "https://v2.convertapi.com/convert/html/to/pdf",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        },
        "sendBody": true,
        "contentType": "multipart-form-data",
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "StoreFile",
              "value": "true"
            },
            {
              "name": "File",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "data"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_TOKEN_HERE"
            }
          ]
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.2
    },
    {
      "id": "5e209a30-88c2-4515-80c1-8a8780e9f7de",
      "name": "Download PDF",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1056,
        352
      ],
      "parameters": {
        "url": "={{ $json.data.Files[0].Url }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "7d52b706-7c66-41f1-8634-8659701d6f96",
      "name": "Send a message to Manager",
      "type": "n8n-nodes-base.slack",
      "position": [
        1360,
        400
      ],
      "webhookId": "e6b41939-bc37-46f4-b536-0c8f6f4f9224",
      "parameters": {
        "text": "=📢 New Candidate Update\n\nThe offer letter for {{ $('Check Document Status(If Document Status is Pending)').item.json.Name }}({{ $('Check Document Status(If Document Status is Pending)').item.json.Profession }}) has been sent.\nThis candidate is a new joining.\n\nPlease take note and prepare for the onboarding process.",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C08QJL9GC3C",
          "cachedResultName": "new-channel"
        },
        "otherOptions": {}
      },
      "typeVersion": 2.3
    },
    {
      "id": "6717be07-c307-4b3b-bcbb-8003848c0960",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        -96
      ],
      "parameters": {
        "color": 6,
        "width": 416,
        "height": 112,
        "content": "## Sample Sheet\nhttps://docs.google.com/spreadsheets/d/15emSCM6Ui3O7oH2BXcorZJUi2BbWpZKCTcqq-Iyn0Kk/edit?gid=0#gid=0"
      },
      "typeVersion": 1
    },
    {
      "id": "5b7bc055-daf7-4061-a709-5b99b148efef",
      "name": "Check Document Status(If Document Status is Pending)",
      "type": "n8n-nodes-base.if",
      "position": [
        208,
        112
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "06e87a9e-4475-483d-a387-4656cc34760e",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json[\"Document Status\"] }}",
              "rightValue": "=Pending"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "95d22c3f-5567-4920-bf4a-7461a1e6efa2",
      "name": "Create Offer Letter",
      "type": "n8n-nodes-base.code",
      "position": [
        528,
        352
      ],
      "parameters": {
        "jsCode": "// Get first input JSON\nconst data = $input.first().json;\n\n// Formal, long, corporate Offer Letter\nconst htmlContent = `\n<!doctype html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"utf-8\" />\n  <title>Offer Letter</title>\n  <style>\n    body {\n      font-family: \"Times New Roman\", serif;\n      background: #fff;\n      color: #000;\n      padding: 60px;\n      font-size: 13pt;\n      line-height: 1.7;\n    }\n    .container {\n      max-width: 800px;\n      margin: auto;\n    }\n    header {\n      text-align: center;\n      margin-bottom: 40px;\n    }\n    header h1 {\n      font-size: 20pt;\n      margin: 0;\n      text-transform: uppercase;\n    }\n    header p {\n      margin: 4px 0;\n      font-size: 11pt;\n    }\n    .date {\n      text-align: right;\n      margin-bottom: 30px;\n    }\n    .subject {\n      font-weight: bold;\n      margin: 20px 0;\n      text-decoration: underline;\n    }\n    p {\n      margin: 12px 0;\n      text-align: justify;\n    }\n    .highlight {\n      font-weight: bold;\n    }\n    .section-title {\n      font-weight: bold;\n      margin-top: 18px;\n      text-decoration: underline;\n    }\n    .signature {\n      margin-top: 60px;\n    }\n    .signature p {\n      margin: 4px 0;\n    }\n    footer {\n      margin-top: 80px;\n      font-size: 10pt;\n      color: #555;\n      text-align: center;\n    }\n  </style>\n</head>\n<body>\n  <div class=\"container\">\n    <header>\n      <h1>infyOm Technologies</h1>\n      <p>123 Business Street, City, State, PIN</p>\n      <p>Email: user@example.com | Phone: +1234567890</p>\n    </header>\n\n    <div class=\"date\">Date: ${new Date().toLocaleDateString()}</div>\n\n    <p>To,<br>\n    <span class=\"highlight\">${data.Name || ''}</span><br>\n    Email: ${data.Email || ''}<br>\n    Phone: ${data.Phone || ''}</p>\n\n    <div class=\"subject\">Subject: Offer of Employment</div>\n\n    <p>Dear <span class=\"highlight\">${data.Name || ''}</span>,</p>\n\n    <p>We are pleased to offer you employment with <span class=\"highlight\">infyOm Technologies</span>. After a thorough evaluation of your qualifications, skills, and experience, we are confident in your ability to contribute significantly to our organization’s success. We are excited to welcome you on board.</p>\n\n    <p>Your appointment is being made for the position assigned to you by our company. The total annual compensation will be <span class=\"highlight\">${data[\"Offer Salary\"] || ''}</span>. Additional benefits, allowances, and perquisites will be applicable as per company policy.</p>\n\n    <div class=\"section-title\">1. Position & Reporting</div>\n    <p>You will be designated as <span class=\"highlight\">${data.Profession || ''}</span> and will report to your designated manager or any other authority assigned by the company. Your duties and responsibilities will be as per the job description provided to you and may be modified by the management from time to time.</p>\n\n    <div class=\"section-title\">2. Probation Period</div>\n    <p>You will be on probation for a period of six (6) months from your date of joining. Upon successful completion of this probationary period, your performance will be reviewed and your services may be confirmed in writing. During probation, your services may be terminated with one month’s notice from either side.</p>\n\n    <div class=\"section-title\">3. Working Hours</div>\n    <p>Your normal working hours will be as per company policy, subject to modifications depending upon business requirements. You may be required to work beyond standard hours in order to meet project deadlines and organizational commitments.</p>\n\n    <div class=\"section-title\">4. Leave Policy</div>\n    <p>You will be entitled to leave as per the leave policy of the company in force at the time. All leaves must be applied for and approved in advance by your reporting manager, except in cases of emergency.</p>\n\n    <div class=\"section-title\">5. Confidentiality & Non-Disclosure</div>\n    <p>You shall maintain the highest standards of confidentiality with respect to all proprietary and confidential information of the company. You shall not, under any circumstances, disclose, use, or exploit any such information without prior written consent of the management.</p>\n\n    <div class=\"section-title\">6. Termination of Employment</div>\n    <p>After confirmation, your employment may be terminated by either party by giving ninety (90) days written notice or payment of equivalent salary in lieu thereof. The company reserves the right to terminate employment immediately without notice in case of misconduct, breach of trust, or violation of company policies.</p>\n\n    <p>We look forward to a mutually rewarding association and are confident that your skills and dedication will add immense value to our organization.</p>\n\n    <p>Sincerely,</p>\n\n    <div class=\"signature\">\n      <p><strong>HR Manager</strong></p>\n      <p>InfyOm Technologies</p>\n    </div>\n\n    <footer>\n      This is a computer-generated offer letter and does not require a physical signature.\n    </footer>\n  </div>\n</body>\n</html>\n`;\n\n// Convert HTML to binary for n8n\nconst buffer = Buffer.from(htmlContent, 'utf8');\nconst binaryData = {\n  data: buffer.toString('base64'),\n  mimeType: 'text/html',\n  fileName: `Offer_Letter_${data[\"Candidate ID\"] || 'Candidate'}.html`,\n};\n\n// Attach binary to first item\nitems[0].binary = { data: binaryData };\n\nreturn items;"
      },
      "typeVersion": 2
    },
    {
      "id": "833faaf8-29d5-499d-967a-5e62339522c4",
      "name": "Send Missing Document Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        544,
        -32
      ],
      "webhookId": "9aa69d57-8095-4e30-b20d-7e26567caf8c",
      "parameters": {
        "sendTo": "={{ $json.Email }}",
        "message": "=Hello {{ $json.Name }},\n\nWe hope you are doing well.\n\nAs part of the joining process, we have reviewed your submitted documents. Currently, the following documents are still pending from your side:\n\n📌 Pending Documents:\n\n{{ $json['Pending Documents'] }}\n\n\nTo ensure smooth processing of your offer letter, we kindly request you to submit the above document(s) at the earliest.\n\nOnce we receive the pending documents, we will proceed with generating your offer letter.\n\nNext Steps:\n✅ Please upload the pending document(s) to the HR portal or reply to this email with the attachments.\n✅ Once verified, your offer letter will be shared immediately.\n\nWe appreciate your prompt action on this.\n\nBest regards,\nHR Team\ninfyOm Technologies",
        "options": {},
        "subject": "=Reminder:{{ $json.Name }} Please submit your pending documents to proceed with your offer",
        "emailType": "text"
      },
      "typeVersion": 2.1
    },
    {
      "id": "a1e8ac99-2612-46db-9652-ea91675bf6f8",
      "name": "Change Status",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        752,
        -32
      ],
      "parameters": {
        "columns": {
          "value": {
            "Candidate ID": "={{ $('Check Document Status(If Document Status is Pending)').item.json[\"Candidate ID\"] }}",
            "Candidate Status": "Documents_Pending"
          },
          "schema": [
            {
              "id": "Candidate ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Candidate ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Phone",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Pending Documents",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Pending Documents",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Submitted Documents",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Submitted Documents",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Document Status",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Document Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Offer Salary",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Offer Salary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Profession",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Profession",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Candidate Status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Candidate Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Offer Letter Link",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Offer Letter Link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Candidate ID"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/15emSCM6Ui3O7oH2BXcorZJUi2BbWpZKCTcqq-Iyn0Kk/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "15emSCM6Ui3O7oH2BXcorZJUi2BbWpZKCTcqq-Iyn0Kk",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/15emSCM6Ui3O7oH2BXcorZJUi2BbWpZKCTcqq-Iyn0Kk/edit?usp=drivesdk",
          "cachedResultName": "Onboarding Workflows"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "d7ada8e5-dd28-4b51-bbb0-0094a20a896b",
      "name": "Upload Offer Letter",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1360,
        16
      ],
      "parameters": {
        "name": "={{ $('Check Document Status(If Document Status is Pending)').item.json['Candidate ID'] }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "id",
          "value": "1bTXRNX_XaL8qy_Z2bcGVQlPaVeFDhPRq"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "769c9fcc-d4b9-470c-9d0b-0b784ecf471b",
      "name": "Add Offer Letter in Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1568,
        16
      ],
      "parameters": {
        "columns": {
          "value": {
            "Candidate ID": "={{ $('Check Document Status(If Document Status is Pending)').item.json['Candidate ID'] }}",
            "Offer Letter Link": "={{ $json.webViewLink }}"
          },
          "schema": [
            {
              "id": "Candidate ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Candidate ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Phone",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Pending Documents",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Pending Documents",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Submitted Documents",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Submitted Documents",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Document Status",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Document Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Offer Salary",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Offer Salary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Profession",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Profession",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Candidate Status",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Candidate Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Offer Letter Link",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Offer Letter Link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Candidate ID"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/15emSCM6Ui3O7oH2BXcorZJUi2BbWpZKCTcqq-Iyn0Kk/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "15emSCM6Ui3O7oH2BXcorZJUi2BbWpZKCTcqq-Iyn0Kk",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/15emSCM6Ui3O7oH2BXcorZJUi2BbWpZKCTcqq-Iyn0Kk/edit?usp=drivesdk",
          "cachedResultName": "Onboarding Workflows"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "55338c56-fce3-4857-ae43-f183fcd54190",
      "name": "Send Offer Letter To Candidate",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1360,
        208
      ],
      "webhookId": "8d1cdea2-02cb-4620-bb32-46626e18d062",
      "parameters": {
        "sendTo": "={{ $('Check Document Status(If Document Status is Pending)').item.json.Email }}",
        "message": "=✨ We are delighted to inform you that you have been selected for the position at InfyOm Technologies.\nAttached to this email, you will find your official Offer Letter 📄, which outlines your role, compensation, and other important details.\n\n🤝 We are excited to welcome you to our team and look forward to working together towards great success.\n\nIf you have any questions, feel free to reach out to us.\n\nBest Regards,\nHR Team\nInfyOm Technologies",
        "options": {
          "attachmentsUi": {
            "attachmentsBinary": [
              {}
            ]
          }
        },
        "subject": "=🎉 Congratulations! Your Offer Letter from infyOm Technologies"
      },
      "typeVersion": 2.1
    },
    {
      "id": "c18319e0-5d4d-4a47-8409-15f9bc0c58ba",
      "name": "Change Status in Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1568,
        400
      ],
      "parameters": {
        "columns": {
          "value": {
            "Candidate ID": "={{ $('Check Document Status(If Document Status is Pending)').item.json['Candidate ID'] }}",
            "Candidate Status": "Offer_Sent"
          },
          "schema": [
            {
              "id": "Candidate ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Candidate ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Phone",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Pending Documents",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Pending Documents",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Submitted Documents",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Submitted Documents",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Document Status",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Document Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Offer Salary",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Offer Salary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Profession",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Profession",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Candidate Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Candidate Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Offer Letter Link",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Offer Letter Link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Candidate ID"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/15emSCM6Ui3O7oH2BXcorZJUi2BbWpZKCTcqq-Iyn0Kk/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "15emSCM6Ui3O7oH2BXcorZJUi2BbWpZKCTcqq-Iyn0Kk",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/15emSCM6Ui3O7oH2BXcorZJUi2BbWpZKCTcqq-Iyn0Kk/edit?usp=drivesdk",
          "cachedResultName": "Onboarding Workflows"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "9a267438-fbbd-4413-8ba6-f9d96ade7956",
      "name": "Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -496,
        -96
      ],
      "parameters": {
        "width": 420,
        "height": 532,
        "content": "## How it works\nThis workflow automates candidate onboarding by monitoring a Google Sheet for new entries. When a candidate's document status is updated:\n\n- **Documents Pending**: Sends a reminder email listing missing documents and updates the candidate status\n- **Documents Complete**: Generates a personalized offer letter (HTML → PDF), uploads it to Google Drive, emails it to the candidate, and notifies the manager via Slack\n\n## Setup steps\n1. **Connect accounts**: Google Sheets, Gmail, Google Drive, Slack (all nodes show credential warnings)\n2. **Configure Google Sheet**: Use the sample sheet linked in the existing sticky note or replace with your own\n3. **Update API key**: Replace \"api_key\" in PDF Generate node with your ConvertAPI key\n4. **Set Slack channel**: Verify the manager notification channel in \"Send a message to Manager\" node\n5. **Set Drive folder**: Confirm the Google Drive folder ID for offer letter storage"
      },
      "typeVersion": 1
    },
    {
      "id": "5e6b12e8-7b5f-4bd3-b954-3ce98a90c388",
      "name": "Document Verification",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        448,
        -128
      ],
      "parameters": {
        "color": 7,
        "width": 748,
        "height": 292,
        "content": "## Send missing documents Email\n"
      },
      "typeVersion": 1
    },
    {
      "id": "7e5baf0b-4a92-4371-849d-be4456314a95",
      "name": "Offer Letter Generation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        448,
        176
      ],
      "parameters": {
        "color": 7,
        "width": 756,
        "height": 356,
        "content": "## Offer Letter Generation\nCreates HTML offer letter from candidate data, converts to PDF via ConvertAPI, and downloads the final document."
      },
      "typeVersion": 1
    },
    {
      "id": "2792c913-e716-4c98-b383-d780dcc269e1",
      "name": "Distribution & Notifications",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1216,
        -128
      ],
      "parameters": {
        "color": 7,
        "width": 556,
        "height": 724,
        "content": "## Distribution & Notifications\nUploads offer letter to Google Drive, emails candidate with PDF attachment, notifies manager via Slack, and updates sheet with final status."
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Get PDF": {
      "main": [
        [
          {
            "node": "Download PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download PDF": {
      "main": [
        [
          {
            "node": "Upload Offer Letter",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Offer Letter To Candidate",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send a message to Manager",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PDF Generate": {
      "main": [
        [
          {
            "node": "Get PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Offer Letter": {
      "main": [
        [
          {
            "node": "PDF Generate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Offer Letter": {
      "main": [
        [
          {
            "node": "Add Offer Letter in Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets Trigger": {
      "main": [
        [
          {
            "node": "Check Document Status(If Document Status is Pending)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message to Manager": {
      "main": [
        [
          {
            "node": "Change Status in Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Missing Document Email": {
      "main": [
        [
          {
            "node": "Change Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Document Status(If Document Status is Pending)": {
      "main": [
        [
          {
            "node": "Send Missing Document Email",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Offer Letter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}