{
  "name": "Automated new hire appointment letters with Google Docs, HR approval & Gmail",
  "nodes": [
    {
      "id": "a780c025-f915-4707-a754-432f57574201",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -816,
        -176
      ]
    },
    {
      "id": "2335a0b2-1feb-41ca-95ec-b1433f0c0c7b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -896,
        -368
      ],
      "parameters": {
        "width": 224,
        "height": 432,
        "content": "Use the form fields to update the Appointment letter template and create a candidate specific appointment letter in PDF format on the Goolge drive"
      }
    },
    {
      "id": "51bfaaee-9198-4c5d-8a8a-0aab475ba5a5",
      "name": "Create a candidate copy of the appointment letter template",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -608,
        -176
      ]
    },
    {
      "id": "44743441-aa57-4c5e-a74b-7890b547e1d0",
      "name": "Update the candidate appointment letter with offer details",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        -336,
        -176
      ]
    },
    {
      "id": "395f9d2d-9422-4e37-885c-ced8b5eabc27",
      "name": "Download the appointment letter as a PDF",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -96,
        -176
      ]
    },
    {
      "id": "faf3bb5d-7cd7-4223-ac14-c0ad2e1e2d1b",
      "name": "Upload the PDF to Google drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        128,
        -176
      ]
    },
    {
      "id": "412d294d-e441-490c-9341-6343a52dad30",
      "name": "Send message and wait for response",
      "type": "n8n-nodes-base.gmail",
      "position": [
        368,
        -176
      ]
    },
    {
      "id": "8e080cbf-ed7d-4812-929b-8091557fd976",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        624,
        -176
      ]
    },
    {
      "id": "7641c843-0176-4dc3-a9a9-58cc1dea6d2c",
      "name": "Download file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        800,
        -336
      ]
    },
    {
      "id": "135e5e92-69d3-4226-a1ca-85c62c2d6833",
      "name": "Send a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        976,
        -336
      ]
    },
    {
      "id": "700b3e39-8143-4d7d-9048-d3a56fc71fd6",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        -368
      ],
      "parameters": {
        "width": 928,
        "height": 432,
        "content": "Create a candidate specific version of the appointment letter and create a PDF version of it. Store this on the Google Drive"
      }
    },
    {
      "id": "6dce69ae-fff6-463a-80f1-e7480a20597b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        -368
      ],
      "parameters": {
        "width": 288,
        "height": 432,
        "content": "Human-In-The-Loop step - Send an email to the HR manager requesting to review the appointment letter and \"Approve\"or \"Reject\""
      }
    },
    {
      "id": "fec624e5-c0d1-4533-b705-397eb9304a5c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        768,
        -432
      ],
      "parameters": {
        "width": 384,
        "height": 256,
        "content": "If the HR manager approves, send an email to the candidate with the appointment letter as a PDF attachment"
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Download file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download file": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Create a candidate copy of the appointment letter template",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload the PDF to Google drive": {
      "main": [
        [
          {
            "node": "Send message and wait for response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send message and wait for response": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download the appointment letter as a PDF": {
      "main": [
        [
          {
            "node": "Upload the PDF to Google drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a candidate copy of the appointment letter template": {
      "main": [
        [
          {
            "node": "Update the candidate appointment letter with offer details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update the candidate appointment letter with offer details": {
      "main": [
        [
          {
            "node": "Download the appointment letter as a PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}