{
  "id": "mvUbYpf0JBicQBvw",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Resume JD Matching",
  "tags": [],
  "nodes": [
    {
      "id": "db2d8b58-0e38-4129-a763-2ce5c6eddff9",
      "name": "Upload to LlamaParse",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1120,
        1340
      ],
      "parameters": {
        "url": "https://api.cloud.llamaindex.ai/api/parsing/upload",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "file",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "attachment_0"
            }
          ]
        },
        "genericAuthType": "httpBearerAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        },
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "e85dfcc0-a7be-4fc5-af9a-7d3851f868e9",
      "name": "Get Processing Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1420,
        1345.5
      ],
      "parameters": {
        "url": "=https://api.cloud.llamaindex.ai/api/parsing/job/{{ $json.id }}",
        "options": {},
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        },
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "88766e05-f6a9-4408-ae96-ff6de11d9bfd",
      "name": "Wait to stay within service limits",
      "type": "n8n-nodes-base.wait",
      "position": [
        1860,
        1445.5
      ],
      "parameters": {
        "amount": 1
      },
      "typeVersion": 1.1
    },
    {
      "id": "49019c47-61a5-4ed0-acd8-14e65899f997",
      "name": "Is Job Ready?",
      "type": "n8n-nodes-base.switch",
      "position": [
        1640,
        1239
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "SUCCESS",
              "conditions": {
                "options": {
                  "version": 1,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "300fce8c-b19a-4d0c-86e8-f62853c70ce2",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.status }}",
                    "rightValue": "SUCCESS"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "ERROR",
              "conditions": {
                "options": {
                  "version": 1,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "e6058aa0-a3e2-4ce3-9bed-6ff41a5be052",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.status }}",
                    "rightValue": "ERROR"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "CANCELED",
              "conditions": {
                "options": {
                  "version": 1,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "ceb6338f-4261-40ac-be11-91f61c7302ba",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.status }}",
                    "rightValue": "CANCELED"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "PENDING",
              "conditions": {
                "options": {
                  "version": 1,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "0fa97d86-432a-409a-917e-5f1a002b1ab9",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.status }}",
                    "rightValue": "PENDING"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {
          "allMatchingOutputs": true
        }
      },
      "typeVersion": 3
    },
    {
      "id": "6c7d7c3a-abd0-48d2-8ca6-3856269ce36e",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        2200,
        1600
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-2.5-flash-preview-05-20"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "5f7fd100-5bf2-448c-863d-3b24e3158446",
      "name": "Gmail Trigger",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        860,
        1340
      ],
      "parameters": {
        "simple": false,
        "filters": {
          "q": "subject: Job application for SDR, has:attachment"
        },
        "options": {
          "downloadAttachments": true
        },
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "673bb220-7207-43a7-af7e-62a49e7c9916",
      "name": "Personal Information Extractor",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        2180,
        1380
      ],
      "parameters": {
        "text": "={{ $('Get Parsed Resume').item.json.markdown }}",
        "options": {
          "systemPromptTemplate": "You are an expert extraction algorithm.\nOnly extract relevant information from the text.\nIf you do not know the value of an attribute asked to extract, you may omit the attribute's value."
        },
        "attributes": {
          "attributes": [
            {
              "name": "MObile No.",
              "type": "number",
              "required": true,
              "description": "Extract Mobile Number / Telephone no."
            },
            {
              "name": "City",
              "description": "Extract the city in which candidate is currently residing"
            },
            {
              "name": "Full Name",
              "required": true,
              "description": "Extract the full name of candidate"
            },
            {
              "name": "Email",
              "required": true,
              "description": "Extract the email of the candidate only."
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "89486e38-a7f7-42f2-8330-a3c4a2d3eab4",
      "name": "Professional Information Extractor",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        2180,
        1060
      ],
      "parameters": {
        "text": "={{ $json.markdown }}",
        "options": {},
        "attributes": {
          "attributes": [
            {
              "name": "Job History",
              "required": true,
              "description": "Work history summary, mentioning all companies and duration worked, focusing major impactful achievements and work done. "
            },
            {
              "name": "Skills",
              "required": true,
              "description": "Extract the candidate\u2019s technical skills. What software, frameworks, functional, business skills they are proficient in. Make a bulleted list."
            },
            {
              "name": "Title & Employer",
              "required": true,
              "description": "Extract all Job Title and Employer with working years. For Example Job Title- Account Executive , Employer - SAP, Working Years - 2 Year, Job Title- Account Manager , Employer - Salesforce, Working Years - 3 Year. Combine the experience by Employer."
            },
            {
              "name": "Work Experience",
              "required": true,
              "description": "Extract years of experience and group experience by job function or role type. Format Example: Total Years Exp: 7 - Account Executive: 2 years - Sales Development Representative: 2 years - Account Manager: 3 years"
            },
            {
              "name": "Promotions Checker",
              "type": "number",
              "description": "For an employees, check if candidates designation has changed. Count total number of senior changes (i.e advancement in position) across the entire working experience."
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "a8071415-31f1-4aba-950b-b8088f09abea",
      "name": "Educational Information Extractor",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        2180,
        1220
      ],
      "parameters": {
        "text": "={{ $('Get Parsed Resume').item.json.markdown }}",
        "options": {},
        "attributes": {
          "attributes": [
            {
              "name": "Education Information",
              "required": true,
              "description": "Create a tabular list of colleges, schools attended along with graduation degree, certification, passing year and any notable achievement in education."
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b61314b4-0ba0-4384-8ec7-1260ca19501a",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        2560,
        1140
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineAll"
      },
      "typeVersion": 3.2
    },
    {
      "id": "54be9de2-e9e6-4b7f-8724-8e66af7c2fc0",
      "name": "Merge1",
      "type": "n8n-nodes-base.merge",
      "position": [
        2560,
        1360
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineAll"
      },
      "typeVersion": 3.2
    },
    {
      "id": "2a990238-9bbf-4f23-ac81-a53dbf69e803",
      "name": "Get Parsed Resume",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1860,
        1210
      ],
      "parameters": {
        "url": "=https://api.cloud.llamaindex.ai/api/parsing/job/{{ $json.id }}/result/markdown",
        "options": {
          "redirect": {
            "redirect": {}
          }
        },
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth"
      },
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        },
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "58d87539-c87a-49d2-a5a9-7e621e735e1b",
      "name": "Get Job Profile",
      "type": "n8n-nodes-base.notion",
      "position": [
        2780,
        1360
      ],
      "parameters": {
        "pageId": {
          "__rl": true,
          "mode": "url",
          "value": "https://www.notion.so/JD-Sales-Development-Representative-21fba38fe659800dbf53e3ec004bc1e9"
        },
        "simple": false,
        "resource": "databasePage",
        "operation": "get"
      },
      "credentials": {
        "notionApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "0ecebc39-e817-4919-8f9b-b21ebef11883",
      "name": "HR Expert LLM",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        2960,
        1360
      ],
      "parameters": {
        "text": "=Job Profile: {{ $json.url }}\n\nCandidate Profile: {{ $('Merge1').item.json.output['Job History'] }},{{ $('Merge1').item.json.output.Skills }},{{ $('Merge1').item.json.output['Title & Employer'] }},{{ $('Merge1').item.json.output['Work Experience'] }},{{ $('Merge1').item.json.output['Education Information'] }},{{ $('Merge1').item.json.output['Full Name'] }},{{ $('Merge1').item.json.output.City }}",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "You are an HR expert and you need to understand if the candidate  profile aligns with the job profile sought by the company. You must give a overall score from 1 to 10, where 1 means the candidate does not align with what is required, while 10 means they are the ideal candidate because they fully reflect the desired profile. Also, score on education qualification requirement, skills required and role and responsibility match from 1 to 10, where 1 means the lowest match. Furthermore, in the 'consideration' field, explain the reasoning behind your score in 100 words. "
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "b0a0decd-27f4-4b19-a5fc-e9da07c2efe0",
      "name": "Update Gsheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3320,
        1360
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "id",
              "defaultMatch": true,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "companyName",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "companyName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "companyLinkedinUrl",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "companyLinkedinUrl",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "location",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "location",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "poster name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "poster name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "poster url",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "poster url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "sector",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "sector",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "application count",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "application count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "standardizedTitle",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "standardizedTitle",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "applyUrl",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "applyUrl",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "descriptionText",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "descriptionText",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "postedAtTimestamp",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "postedAtTimestamp",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "addressLocality",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "addressLocality",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "companyWebsite",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "companyWebsite",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1sFuU0RA8_8t_lW24WW7jyxRzMol6RRURiWZNKbjgrxU/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1sFuU0RA8_8t_lW24WW7jyxRzMol6RRURiWZNKbjgrxU",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1sFuU0RA8_8t_lW24WW7jyxRzMol6RRURiWZNKbjgrxU/edit?usp=drivesdk",
          "cachedResultName": "LinkedIn Jobs Data"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "15cbd22a-485f-4cb0-8413-e1abc6d08ac2",
      "name": "Add label to message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        3540,
        1360
      ],
      "parameters": {
        "labelIds": [
          "Label_9"
        ],
        "messageId": "={{ $('Gmail Trigger').item.json.id }}",
        "operation": "addLabels"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "a0781eee-c1c9-44b2-b2f5-a446530c4592",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        760,
        1180
      ],
      "parameters": {
        "height": 340,
        "content": "## Step 1: Waiting for Resume.\nThis node is fetching resumes from Emails basis the specific Subject every hour."
      },
      "typeVersion": 1
    },
    {
      "id": "3431e185-71f9-4134-a6b4-4f8952e3fcc4",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1080,
        1180
      ],
      "parameters": {
        "color": 4,
        "width": 980,
        "height": 480,
        "content": "## Step 2: Parsing the Resume"
      },
      "typeVersion": 1
    },
    {
      "id": "5c39a357-41eb-4c6d-8ee5-6fbde1fbc961",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2100,
        960
      ],
      "parameters": {
        "color": 6,
        "width": 640,
        "height": 780,
        "content": "## Data Extraction from Resume\nThis mode will identify personal, educational and professional info from Resume"
      },
      "typeVersion": 1
    },
    {
      "id": "e697c583-9e7d-4c33-9b89-d2543c9ad23c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2940,
        1240
      ],
      "parameters": {
        "color": 3,
        "width": 300,
        "height": 300,
        "content": "## HR Expert to score the Candidate fitment"
      },
      "typeVersion": 1
    },
    {
      "id": "1454a95d-bc5f-4bb9-9c14-8e196a9daee8",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3280,
        1180
      ],
      "parameters": {
        "width": 400,
        "height": 360,
        "content": "## Updating the Gsheet and Label to avoid duplication"
      },
      "typeVersion": 1
    },
    {
      "id": "d62a78c5-55b0-42c4-9f28-1f7a38f68977",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2760,
        1280
      ],
      "parameters": {
        "color": 2,
        "width": 160,
        "height": 260,
        "content": "## Getting Job Profile"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "08cd1c65-c18d-4105-b7fb-84ae97caaa45",
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Get Job Profile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "Upload to LlamaParse",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HR Expert LLM": {
      "main": [
        [
          {
            "node": "Update Gsheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Job Ready?": {
      "main": [
        [
          {
            "node": "Get Parsed Resume",
            "type": "main",
            "index": 0
          }
        ],
        [],
        [],
        [
          {
            "node": "Wait to stay within service limits",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Gsheet": {
      "main": [
        [
          {
            "node": "Add label to message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Job Profile": {
      "main": [
        [
          {
            "node": "HR Expert LLM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Parsed Resume": {
      "main": [
        [
          {
            "node": "Professional Information Extractor",
            "type": "main",
            "index": 0
          },
          {
            "node": "Educational Information Extractor",
            "type": "main",
            "index": 0
          },
          {
            "node": "Personal Information Extractor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload to LlamaParse": {
      "main": [
        [
          {
            "node": "Get Processing Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Processing Status": {
      "main": [
        [
          {
            "node": "Is Job Ready?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Personal Information Extractor",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Professional Information Extractor",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Educational Information Extractor",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "HR Expert LLM",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Personal Information Extractor": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Educational Information Extractor": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Professional Information Extractor": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait to stay within service limits": {
      "main": [
        [
          {
            "node": "Get Processing Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}