{
  "name": "Automate Candidate Screening with LlamaIndex & GPT for Email Responses",
  "nodes": [
    {
      "id": "68b38626-5c34-4c5a-8e6a-ce6711af9b82",
      "name": "☁️ Upload PDF to LlamaIndex",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        700,
        -760
      ]
    },
    {
      "id": "441843b0-35cc-4ddf-bb84-a43c900fa8f2",
      "name": "⏳ Check Parsing Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        920,
        -760
      ]
    },
    {
      "id": "7f16b44d-4a83-4e7d-9c14-0bd3492f4877",
      "name": "🔁 Condition: Was Parsing Successful?",
      "type": "n8n-nodes-base.if",
      "position": [
        1140,
        -760
      ]
    },
    {
      "id": "7dc90ea4-53e9-4f34-877d-2c3fcfd88cf2",
      "name": " ⏱ Delay Before Recheck",
      "type": "n8n-nodes-base.wait",
      "position": [
        1380,
        -720
      ]
    },
    {
      "id": "adb0df03-21fa-42d1-8644-c2e33f548664",
      "name": " 📥 Get Parsed Markdown Result",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1380,
        -900
      ]
    },
    {
      "id": "38208667-9c49-413f-97aa-03ba37a0b30b",
      "name": " 🧼 Clean Markdown Text",
      "type": "n8n-nodes-base.code",
      "position": [
        1620,
        -900
      ]
    },
    {
      "id": "206f38e7-57f0-4b74-8160-f80201c62539",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        480,
        -340
      ]
    },
    {
      "id": "d300455f-ef89-4161-a573-94551f1fa7d7",
      "name": "Gmail Trigger - Incoming Applications",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -440,
        -280
      ]
    },
    {
      "id": "6e02a179-9a8d-4ff1-88a7-f09b2cf73762",
      "name": "\tSet Job Criteria Text",
      "type": "n8n-nodes-base.set",
      "position": [
        -200,
        -280
      ]
    },
    {
      "id": "b36435fc-4e5d-4016-89bb-e1965cf19705",
      "name": "\tExtract Email Body Text",
      "type": "n8n-nodes-base.set",
      "position": [
        0,
        -280
      ]
    },
    {
      "id": "496375c2-c627-4128-9c2d-2a710c068ce9",
      "name": "\tCheck Subject Validity",
      "type": "n8n-nodes-base.if",
      "position": [
        220,
        -280
      ]
    },
    {
      "id": "b47142e2-d94e-4d55-a591-66d105e6d408",
      "name": "Check If PDF Attachment Exists",
      "type": "n8n-nodes-base.if",
      "position": [
        480,
        -560
      ]
    },
    {
      "id": "10936540-f4f6-47c5-bbba-2d10dd062653",
      "name": "\tPrepare Data for OpenAI",
      "type": "n8n-nodes-base.set",
      "position": [
        1820,
        -540
      ]
    },
    {
      "id": "e5df09b6-b015-4b26-b766-a59bfcc9284b",
      "name": "\tEvaluate Candidate with OpenAI",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        660,
        -240
      ]
    },
    {
      "id": "e2b4f1b2-9288-401d-9424-8ab92191e3b3",
      "name": "\tFinal Decision Check",
      "type": "n8n-nodes-base.if",
      "position": [
        980,
        -240
      ]
    },
    {
      "id": "c8d6083c-a97e-4566-b1fb-0a6297a2f4a5",
      "name": "\tSend Acceptance",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1200,
        -340
      ]
    },
    {
      "id": "fb11ce15-8477-477e-8174-906575bf3041",
      "name": "\tSend Rejection",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1200,
        -140
      ]
    },
    {
      "id": "0e41269a-4a62-4714-ab78-afa3ebb28bf0",
      "name": "\tMark as Accepted",
      "type": "n8n-nodes-base.set",
      "position": [
        1380,
        -340
      ]
    },
    {
      "id": "8024bdc5-d109-42ce-88fe-0c45cfbd11e7",
      "name": "\tMark as Rejected",
      "type": "n8n-nodes-base.set",
      "position": [
        1380,
        -140
      ]
    },
    {
      "id": "afa7ef69-24c6-4cc4-a59e-a24030ce3587",
      "name": "\tUpdate Candidate Status on Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1640,
        -220
      ]
    },
    {
      "id": "552c28ef-ddea-4078-bc88-feeb1963dfd3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        420,
        -1020
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "da02b312-49ad-4195-8a1d-451828e63c57",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        440,
        -940
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "2db2d480-71b2-4489-b4c8-451a33e354c2",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        -1020
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "3ed78cbd-9c40-46a7-9a34-ad8ab22b0ee2",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        -940
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "eb61b244-2a80-40a9-9d3a-d138d3a7fd77",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        420,
        -380
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "58bd8748-4e8f-4929-950f-730391688d40",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        460,
        -100
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "8f486468-7fb1-4f17-a5a9-7ddbf82c1aa1",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1720,
        -580
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "6998f74d-8bb7-466a-97db-7afee60ef13c",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        60
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "1b0336dc-77fa-48d2-aafb-953785753948",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -200,
        60
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "f0c872a8-efb9-4ece-add5-f85036730e40",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        60
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    }
  ],
  "connections": {
    "\tSend Rejection": {
      "main": [
        [
          {
            "node": "\tMark as Rejected",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\tSend Acceptance": {
      "main": [
        [
          {
            "node": "\tMark as Accepted",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\tMark as Accepted": {
      "main": [
        [
          {
            "node": "\tUpdate Candidate Status on Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\tMark as Rejected": {
      "main": [
        [
          {
            "node": "\tUpdate Candidate Status on Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\tFinal Decision Check": {
      "main": [
        [
          {
            "node": "\tSend Acceptance",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "\tSend Rejection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\tSet Job Criteria Text": {
      "main": [
        [
          {
            "node": "\tExtract Email Body Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\tCheck Subject Validity": {
      "main": [
        [
          {
            "node": "Check If PDF Attachment Exists",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\tExtract Email Body Text": {
      "main": [
        [
          {
            "node": "\tCheck Subject Validity",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\tPrepare Data for OpenAI": {
      "main": [
        [
          {
            "node": "\tEvaluate Candidate with OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "⏳ Check Parsing Status": {
      "main": [
        [
          {
            "node": "🔁 Condition: Was Parsing Successful?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    " ⏱ Delay Before Recheck": {
      "main": [
        [
          {
            "node": "⏳ Check Parsing Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    " 🧼 Clean Markdown Text": {
      "main": [
        [
          {
            "node": "\tPrepare Data for OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check If PDF Attachment Exists": {
      "main": [
        [
          {
            "node": "☁️ Upload PDF to LlamaIndex",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "\tPrepare Data for OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\tEvaluate Candidate with OpenAI": {
      "main": [
        [
          {
            "node": "\tFinal Decision Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "☁️ Upload PDF to LlamaIndex": {
      "main": [
        [
          {
            "node": "⏳ Check Parsing Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    " 📥 Get Parsed Markdown Result": {
      "main": [
        [
          {
            "node": " 🧼 Clean Markdown Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail Trigger - Incoming Applications": {
      "main": [
        [
          {
            "node": "\tSet Job Criteria Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔁 Condition: Was Parsing Successful?": {
      "main": [
        [
          {
            "node": " 📥 Get Parsed Markdown Result",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": " ⏱ Delay Before Recheck",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}