{
  "name": "Generate and track offer letters with Google Sheets, Docs, Drive and Gmail",
  "nodes": [
    {
      "id": "9e7ab882-9b03-4513-b5f8-3c0244e8f4d2",
      "name": "Google Sheets Trigger",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        -1168,
        4944
      ]
    },
    {
      "id": "3374ad8e-05b4-4e4b-a93c-c30f18817d87",
      "name": "Copy Template1",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -720,
        4928
      ]
    },
    {
      "id": "5aba1b3c-1f81-49ed-820f-40e0b312131b",
      "name": "Update a offer letter1",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        -496,
        4928
      ]
    },
    {
      "id": "b6a6774f-8872-4335-ba0b-ec64cc732c20",
      "name": "Document to PDF1",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -272,
        4928
      ]
    },
    {
      "id": "7a24da3b-ca2c-43c9-a592-7e4e6325b7b8",
      "name": "Save PDF to drive1",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -48,
        4928
      ]
    },
    {
      "id": "036d133c-a3ab-41f6-902b-54cff3624d71",
      "name": "Assign Sharing Rights1",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        176,
        4928
      ]
    },
    {
      "id": "5038c36b-f769-4f54-b5b3-d88447e6dfc3",
      "name": "Send a message1",
      "type": "n8n-nodes-base.gmail",
      "position": [
        400,
        4928
      ]
    },
    {
      "id": "51b33e0f-c82d-40e3-83bb-4277f43d21d9",
      "name": "Webhook1",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1168,
        5600
      ]
    },
    {
      "id": "28f0c6ae-7eb1-49c3-be87-9541cf5dd92c",
      "name": "Thank you to Candidate2",
      "type": "n8n-nodes-base.gmail",
      "position": [
        176,
        5600
      ]
    },
    {
      "id": "5c67bd57-4f07-437a-8421-cbfe38e63b07",
      "name": "Ack. Hr1",
      "type": "n8n-nodes-base.gmail",
      "position": [
        176,
        5216
      ]
    },
    {
      "id": "5961482e-9cf8-48d0-92b4-a9b19c4c1f31",
      "name": "Ack. Candidate1",
      "type": "n8n-nodes-base.gmail",
      "position": [
        176,
        5408
      ]
    },
    {
      "id": "764c789e-a5f1-4de1-ba79-6fb51a4f044e",
      "name": "Switch1",
      "type": "n8n-nodes-base.switch",
      "position": [
        -272,
        5584
      ]
    },
    {
      "id": "e1d70fb9-8f56-4b3b-98c2-e4d4e2cbc4f3",
      "name": "Thank you to Candidate3",
      "type": "n8n-nodes-base.gmail",
      "position": [
        176,
        5792
      ]
    },
    {
      "id": "169f90ac-1dfc-4ca6-8258-c368fee6d705",
      "name": "Update status in sheet1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        624,
        4928
      ]
    },
    {
      "id": "c8019b87-e7d2-45d7-ba2a-6eaaa15cf919",
      "name": "Update Status to Accepted1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -48,
        5312
      ]
    },
    {
      "id": "fbde6213-0dca-410f-9995-f3966f22ab85",
      "name": "Update Status to Rejected1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -48,
        5600
      ]
    },
    {
      "id": "a367c3cf-474c-4b20-bb95-b9ae03b19ebd",
      "name": "Update Status Timeout1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -48,
        5792
      ]
    },
    {
      "id": "6a916f1b-685c-46d9-a199-6566aae24ff0",
      "name": "Check Response is Locked?1",
      "type": "n8n-nodes-base.if",
      "position": [
        -720,
        5600
      ]
    },
    {
      "id": "37710648-5c5b-405e-ad1c-d78e0ad8f71f",
      "name": "If4",
      "type": "n8n-nodes-base.if",
      "position": [
        -944,
        4944
      ]
    },
    {
      "id": "714966fe-6645-4840-8ba9-ca231dfbdc98",
      "name": "Code in JavaScript3",
      "type": "n8n-nodes-base.code",
      "position": [
        -496,
        5600
      ]
    },
    {
      "id": "d6241d20-1153-436a-9dfe-d048fbb05381",
      "name": "Get row(s) in sheet2",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -944,
        5600
      ]
    },
    {
      "id": "59534eff-c940-43fc-b187-b9d8d4765119",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2176,
        4720
      ],
      "parameters": {
        "width": 832,
        "height": 1248,
        "content": "## Automated Offer Letter & Response Tracking Workflow\n\n### How it works\nThis workflow automates the complete offer letter lifecycle.  \nWhen a new candidate row is added to Google Sheets with a **Pend"
      }
    },
    {
      "id": "6fa85b0e-dd6f-485b-b1e2-44f87247d34c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1296,
        4720
      ],
      "parameters": {
        "width": 2096,
        "height": 432,
        "content": "## 1. Generate & Send Offer Letter\n\n• Watches Google Sheets for new Pending entries  \n• Creates offer letter from template  \n• Converts to PDF, saves to Drive  \n• Sends email with Accept / Decline but"
      }
    },
    {
      "id": "e0957e0d-bcca-4ff9-887b-dcf8574bbc19",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1296,
        5184
      ],
      "parameters": {
        "width": 2112,
        "height": 784,
        "content": "## 2. Capture Response & Follow-Up\n\n• Receives candidate response via webhook  \n• Checks response validity & deadline  \n• Updates final status in Google Sheets  \n• Sends follow-up emails to candidate "
      }
    }
  ],
  "connections": {
    "If4": {
      "main": [
        [
          {
            "node": "Copy Template1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch1": {
      "main": [
        [
          {
            "node": "Update Status to Accepted1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Status to Rejected1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Status Timeout1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook1": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Copy Template1": {
      "main": [
        [
          {
            "node": "Update a offer letter1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message1": {
      "main": [
        [
          {
            "node": "Update status in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Document to PDF1": {
      "main": [
        [
          {
            "node": "Save PDF to drive1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save PDF to drive1": {
      "main": [
        [
          {
            "node": "Assign Sharing Rights1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript3": {
      "main": [
        [
          {
            "node": "Switch1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet2": {
      "main": [
        [
          {
            "node": "Check Response is Locked?1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets Trigger": {
      "main": [
        [
          {
            "node": "If4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assign Sharing Rights1": {
      "main": [
        [
          {
            "node": "Send a message1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Status Timeout1": {
      "main": [
        [
          {
            "node": "Thank you to Candidate3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update a offer letter1": {
      "main": [
        [
          {
            "node": "Document to PDF1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Response is Locked?1": {
      "main": [
        [],
        [
          {
            "node": "Code in JavaScript3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Status to Accepted1": {
      "main": [
        [
          {
            "node": "Ack. Candidate1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Ack. Hr1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Status to Rejected1": {
      "main": [
        [
          {
            "node": "Thank you to Candidate2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}