{
  "id": "1vviCR37ylmqZKih",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "AI WhatsApp Recruitment Assistant",
  "tags": [
    {
      "id": "DiwTzDkTaFSX5bEX",
      "name": "recruitment",
      "createdAt": "2026-05-11T13:01:00.870Z",
      "updatedAt": "2026-05-11T13:01:00.870Z"
    },
    {
      "id": "z6mxJFPmp5Jq0Lnu",
      "name": "whatsapp",
      "createdAt": "2026-05-11T13:01:00.955Z",
      "updatedAt": "2026-05-11T13:01:00.955Z"
    },
    {
      "id": "fmYbvcTTTlbTp6aj",
      "name": "ai-powered",
      "createdAt": "2026-05-11T13:01:00.986Z",
      "updatedAt": "2026-05-11T13:01:00.986Z"
    },
    {
      "id": "s4xffeURdnx7oinT",
      "name": "hr-automation",
      "createdAt": "2026-05-11T13:01:00.986Z",
      "updatedAt": "2026-05-11T13:01:00.986Z"
    }
  ],
  "nodes": [
    {
      "id": "ec4d5a42-6b4b-432f-a816-091a850c8a28",
      "name": "Sticky Note - Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -112
      ],
      "parameters": {
        "width": 980,
        "height": 960,
        "content": "## AI WhatsApp Recruitment Assistant\n\nThis workflow automates three key recruitment processes through WhatsApp:\n1. **Candidate Screening** \u2014 AI evaluates applicants against job criteria\n2. **Interview Scheduling** \u2014 Checks availability and books meeting slots\n3. **Hiring Updates** \u2014 Notifies candidates of status changes and outcomes\n\n### Who's it for\n\u2022 HR teams handling 20+ applicants per week\n\u2022 Recruiting agencies managing multiple job roles\n\u2022 Startups automating early-stage candidate pipelines\n\n### How it works\n1. Candidate sends a WhatsApp message to apply\n2. AI screens the candidate against predefined job criteria\n3. Qualified candidates receive available interview slots\n4. Confirmed bookings are added to calendar and CRM\n5. Post-interview, hiring status is sent via WhatsApp\n6. All interactions are logged in Google Sheets / CRM\n\n### Setup Steps\n1. Import this workflow\n2. Configure credentials (Twilio/WhatsApp, OpenAI, Google Calendar, Google Sheets)\n3. Update job criteria and scoring thresholds in the AI node\n4. Set your calendar availability windows\n5. Activate the workflow\n\n### Requirements\n\u2022 Twilio WhatsApp Business API (or Meta WhatsApp Cloud API)\n\u2022 OpenAI / Anthropic API\n\u2022 Google Calendar API\n\u2022 Google Sheets (CRM tracker)\n\u2022 SendGrid or Gmail (backup notifications)\n\n### Customization\n\u2022 Adjust screening score threshold in the Filter node\n\u2022 Modify interview slot logic in the Python scheduler\n\u2022 Add more job roles by extending the AI system prompt\n\u2022 Change notification templates in the message formatting nodes"
      },
      "typeVersion": 1
    },
    {
      "id": "72f509a6-ec05-42be-b415-4de8b1e1b6c1",
      "name": "Sticky Note - Phase 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        832,
        48
      ],
      "parameters": {
        "color": 4,
        "width": 912,
        "height": 520,
        "content": "## 1. WhatsApp Intake & Candidate Identification"
      },
      "typeVersion": 1
    },
    {
      "id": "2bae1b5b-88d0-484b-a84f-61bb44e2a4d0",
      "name": "Sticky Note - Phase 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1776,
        48
      ],
      "parameters": {
        "color": 3,
        "width": 780,
        "height": 660,
        "content": "## 2. AI Screening & Qualification"
      },
      "typeVersion": 1
    },
    {
      "id": "f27c1836-3695-4c7f-9c23-092139732410",
      "name": "Sticky Note - Phase 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2624,
        48
      ],
      "parameters": {
        "color": 2,
        "width": 1740,
        "height": 696,
        "content": "## 3. Interview Scheduling"
      },
      "typeVersion": 1
    },
    {
      "id": "7d1e63ab-0738-489d-b9c3-ecbd3e9c5a47",
      "name": "Sticky Note - Phase 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4432,
        -32
      ],
      "parameters": {
        "color": 6,
        "width": 1436,
        "height": 916,
        "content": "## 4. Hiring Decision & Notifications"
      },
      "typeVersion": 1
    },
    {
      "id": "b10f6415-65f7-4183-b905-d9384a413cab",
      "name": "Webhook - WhatsApp Inbound",
      "type": "n8n-nodes-base.webhook",
      "position": [
        960,
        208
      ],
      "parameters": {
        "path": "whatsapp-recruitment-inbound",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 1.1
    },
    {
      "id": "331b2ec6-738c-48e1-9ee9-b204ffc96449",
      "name": "Poll Hiring Status Updates",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        960,
        400
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "*/15 * * * *"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "262ded1a-140c-4d32-a20d-7634c411469c",
      "name": "Normalize Candidate Message",
      "type": "n8n-nodes-base.set",
      "position": [
        1184,
        304
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "name": "candidatePhone",
              "type": "string",
              "value": "={{ $json.From || $json.body?.From || $json.WaId || '' }}"
            },
            {
              "name": "candidateName",
              "type": "string",
              "value": "={{ $json.ProfileName || $json.body?.ProfileName || 'Candidate' }}"
            },
            {
              "name": "messageBody",
              "type": "string",
              "value": "={{ $json.Body || $json.body?.Body || $json.text || '' }}"
            },
            {
              "name": "messageId",
              "type": "string",
              "value": "={{ $json.MessageSid || $json.body?.MessageSid || Date.now().toString() }}"
            },
            {
              "name": "receivedAt",
              "type": "string",
              "value": "={{ new Date().toISOString() }}"
            },
            {
              "name": "channel",
              "type": "string",
              "value": "whatsapp"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "67fe9afc-2c16-4bcc-b5ad-45e800323453",
      "name": "Python - Detect Message Intent",
      "type": "n8n-nodes-base.code",
      "position": [
        1408,
        304
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "language": "python"
      },
      "typeVersion": 2
    },
    {
      "id": "c42c655e-e340-4229-980c-b9bf107417e5",
      "name": "Filter Recruitment Messages",
      "type": "n8n-nodes-base.filter",
      "position": [
        1632,
        304
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "conditions": [
            {
              "operator": {
                "type": "boolean",
                "operation": "true"
              },
              "leftValue": "={{ $json.isRecruitmentMessage }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "d1efaf9d-d28c-4ac4-b697-503f1b38cc4b",
      "name": "Wait 1 - Rate Limit",
      "type": "n8n-nodes-base.wait",
      "position": [
        1856,
        304
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "3512dea0-db3a-46b4-ac21-594084b4d0a6",
      "name": "AI - Screen Candidate",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2080,
        304
      ],
      "parameters": {
        "text": "=You are a professional AI recruitment screener for a company. Your task is to evaluate a candidate's WhatsApp message against the job criteria below and produce a structured screening assessment.\n\n## Job Requirements\n- Role: Software Engineer / Product Manager / Data Analyst (match to {{ $json.detectedRole }})\n- Required Experience: 2+ years in relevant field\n- Key Skills: Communication, problem-solving, technical aptitude\n- Education: Bachelor's degree or equivalent experience\n- Location: Remote-friendly / On-site (specify if mentioned)\n\n## Candidate Message\nName: {{ $json.candidateName }}\nPhone: {{ $json.candidatePhone }}\nMessage: {{ $json.messageBody }}\n\n## Your Task\nAnalyze the message and respond ONLY with a valid JSON object (no markdown, no explanation) in this exact format:\n{\n  \"screeningScore\": <integer 0-100>,\n  \"qualificationStatus\": \"<qualified|maybe|unqualified>\",\n  \"detectedExperience\": \"<years or description>\",\n  \"detectedSkills\": [\"<skill1>\", \"<skill2>\"],\n  \"redFlags\": [\"<flag1 or empty array>\"],\n  \"extractedJobRole\": \"<role candidate seems to be applying for>\",\n  \"recommendedAction\": \"<schedule_interview|request_more_info|reject|follow_up>\",\n  \"personalizedReply\": \"<A warm, professional WhatsApp reply under 160 words that addresses the candidate by name, acknowledges their message, and states the next step clearly>\"\n}",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 1.6
    },
    {
      "id": "3083b8f2-f88d-4e77-a190-06600df53b08",
      "name": "JS - Parse Screening Result",
      "type": "n8n-nodes-base.code",
      "position": [
        2432,
        304
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const item = $input.item.json;\n\n// Parse AI response - handle both direct JSON and wrapped response\nlet screeningResult = {};\ntry {\n  const rawText = item.output || item.response || item.text || '{}';\n  const cleaned = rawText.replace(/```json|```/g, '').trim();\n  screeningResult = JSON.parse(cleaned);\n} catch (e) {\n  screeningResult = {\n    screeningScore: 50,\n    qualificationStatus: 'maybe',\n    detectedExperience: 'unknown',\n    detectedSkills: [],\n    redFlags: [],\n    extractedJobRole: item.detectedRole || 'general',\n    recommendedAction: 'request_more_info',\n    personalizedReply: `Hi ${item.candidateName}, thank you for reaching out! We received your message and our team will review your application shortly. We'll get back to you within 24 hours.`\n  };\n}\n\nreturn {\n  json: {\n    ...item,\n    ...screeningResult,\n    screeningTimestamp: new Date().toISOString(),\n    isQualified: screeningResult.screeningScore >= 60,\n    shouldSchedule: screeningResult.recommendedAction === 'schedule_interview'\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "d908488f-2fad-462c-8d1d-ec85256d438f",
      "name": "Route - Qualified for Interview?",
      "type": "n8n-nodes-base.filter",
      "position": [
        2656,
        304
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "conditions": [
            {
              "operator": {
                "type": "boolean",
                "operation": "true"
              },
              "leftValue": "={{ $json.shouldSchedule }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "5510fd32-6bbb-4aa7-af53-c886be1ad8f3",
      "name": "Python - Generate Interview Slots",
      "type": "n8n-nodes-base.code",
      "position": [
        2880,
        304
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "language": "python"
      },
      "typeVersion": 2
    },
    {
      "id": "5eb8eb74-c7ff-40dc-8945-8d9c34eba1e7",
      "name": "Format Schedule Message",
      "type": "n8n-nodes-base.set",
      "position": [
        3104,
        304
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "name": "whatsappTo",
              "type": "string",
              "value": "={{ 'whatsapp:' + $json.candidatePhone }}"
            },
            {
              "name": "whatsappFrom",
              "type": "string",
              "value": "whatsapp:+1234567890"
            },
            {
              "name": "messageOut",
              "type": "string",
              "value": "={{ $json.scheduleMessage || $json.personalizedReply }}"
            },
            {
              "name": "messageType",
              "type": "string",
              "value": "schedule_offer"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "30658f28-0750-4e67-9ed0-eb2aa54b83e7",
      "name": "Send WhatsApp - Interview Slots",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3328,
        304
      ],
      "parameters": {
        "url": "https://api.twilio.com/2010-04-01/Accounts/{{ $env.TWILIO_ACCOUNT_SID }}/Messages.json",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "To",
              "value": "={{ $json.whatsappTo }}"
            },
            {
              "name": "From",
              "value": "={{ $json.whatsappFrom }}"
            },
            {
              "name": "Body",
              "value": "={{ $json.messageOut }}"
            }
          ]
        },
        "genericAuthType": "httpBasicAuth"
      },
      "credentials": {
        "httpBasicAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "34fd5f4f-46db-4281-9db3-0235dccb939c",
      "name": "Format Screening Reply",
      "type": "n8n-nodes-base.set",
      "position": [
        4800,
        496
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "name": "whatsappTo",
              "type": "string",
              "value": "={{ 'whatsapp:' + $json.candidatePhone }}"
            },
            {
              "name": "whatsappFrom",
              "type": "string",
              "value": "whatsapp:+1234567890"
            },
            {
              "name": "messageOut",
              "type": "string",
              "value": "={{ $json.personalizedReply || 'Hi ' + $json.candidateName + ', thank you for your application. Unfortunately, your profile does not match our current requirements. We encourage you to apply for future openings. Best of luck!' }}"
            },
            {
              "name": "messageType",
              "type": "string",
              "value": "screening_reply"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "97df6844-90d0-40e7-84bb-d23ada7fb667",
      "name": "Send WhatsApp - Screening Reply",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5024,
        496
      ],
      "parameters": {
        "url": "https://api.twilio.com/2010-04-01/Accounts/{{ $env.TWILIO_ACCOUNT_SID }}/Messages.json",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "To",
              "value": "={{ $json.whatsappTo }}"
            },
            {
              "name": "From",
              "value": "={{ $json.whatsappFrom }}"
            },
            {
              "name": "Body",
              "value": "={{ $json.messageOut }}"
            }
          ]
        },
        "genericAuthType": "httpBasicAuth"
      },
      "credentials": {
        "httpBasicAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "cba5c75c-6ab0-4171-896e-5937a9560f6e",
      "name": "Wait 2 - Candidate Reply Buffer",
      "type": "n8n-nodes-base.wait",
      "position": [
        3552,
        304
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5c105b41-bbc3-4166-b17a-b92eedc643d8",
      "name": "Python - Validate Slot Selection",
      "type": "n8n-nodes-base.code",
      "position": [
        3776,
        304
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "language": "python"
      },
      "typeVersion": 2
    },
    {
      "id": "558bd4d7-8af5-4391-b18d-546767a69bae",
      "name": "Filter Valid Slot Selections",
      "type": "n8n-nodes-base.filter",
      "position": [
        4000,
        304
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "conditions": [
            {
              "operator": {
                "type": "boolean",
                "operation": "true"
              },
              "leftValue": "={{ $json.isValidSelection }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "108cacc2-4262-4be4-8ca2-a282fe8f1274",
      "name": "Book Calendar Event",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4224,
        208
      ],
      "parameters": {
        "url": "https://www.googleapis.com/calendar/v3/calendars/primary/events",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"summary\": \"{{ $json.calendarEventTitle }}\",\n  \"description\": \"Interview via WhatsApp Recruitment Assistant\\nCandidate: {{ $json.candidateName }}\\nPhone: {{ $json.candidatePhone }}\\nRole: {{ $json.extractedJobRole }}\\nScreening Score: {{ $json.screeningScore }}\",\n  \"start\": {\n    \"dateTime\": \"{{ $json.chosenSlot.iso }}\",\n    \"timeZone\": \"UTC\"\n  },\n  \"end\": {\n    \"dateTime\": \"{{ $json.chosenSlot.iso }}\",\n    \"timeZone\": \"UTC\"\n  },\n  \"attendees\": [\n    {\"email\": \"recruiter@yourcompany.com\"},\n    {\"displayName\": \"{{ $json.candidateName }}\"}\n  ],\n  \"conferenceData\": {\n    \"createRequest\": {\n      \"requestId\": \"{{ $json.messageId }}\",\n      \"conferenceSolutionKey\": {\"type\": \"hangoutsMeet\"}\n    }\n  },\n  \"reminders\": {\n    \"useDefault\": false,\n    \"overrides\": [\n      {\"method\": \"email\", \"minutes\": 1440},\n      {\"method\": \"popup\", \"minutes\": 30}\n    ]\n  }\n}",
        "sendBody": true,
        "specifyBody": "json"
      },
      "typeVersion": 4.2
    },
    {
      "id": "2698a3a6-be10-41ca-a0e0-b5c97063bab3",
      "name": "Send WhatsApp - Booking Confirmation",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4224,
        400
      ],
      "parameters": {
        "url": "https://api.twilio.com/2010-04-01/Accounts/{{ $env.TWILIO_ACCOUNT_SID }}/Messages.json",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "To",
              "value": "={{ 'whatsapp:' + $json.candidatePhone }}"
            },
            {
              "name": "From",
              "value": "whatsapp:+1234567890"
            },
            {
              "name": "Body",
              "value": "={{ $json.confirmationMessage }}"
            }
          ]
        },
        "genericAuthType": "httpBasicAuth"
      },
      "credentials": {
        "httpBasicAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "d77f198c-b7b8-47cb-873a-4daa53e1b173",
      "name": "AI - Generate Hiring Update",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        4448,
        304
      ],
      "parameters": {
        "text": "=You are a recruitment coordinator. Write a hiring status update message for a candidate to be sent via WhatsApp.\n\nCandidate: {{ $json.candidateName }}\nRole Applied For: {{ $json.extractedJobRole }}\nInterview Date: {{ $json.chosenSlot.display || 'N/A' }}\nCurrent Status: {{ $json.hiringStatus || 'under_review' }}\nHR Notes: {{ $json.hrNotes || 'Interview completed successfully' }}\n\nStatus options and their meaning:\n- 'moving_forward': Candidate is progressing to next round\n- 'offer_extended': Job offer is being made\n- 'rejected': Candidate was not selected\n- 'on_hold': Decision pending\n\nWrite a concise, empathetic, and professional WhatsApp message (under 140 words) appropriate for the status. Be warm, clear, and end with a clear next step. Return ONLY the message text.",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 1.6
    },
    {
      "id": "a4846286-8ff9-49fb-b62a-e58a200402be",
      "name": "JS - Format Hiring Update",
      "type": "n8n-nodes-base.code",
      "position": [
        4800,
        304
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const item = $input.item.json;\nconst hiringMsg = item.output || item.response || item.text || `Hi ${item.candidateName}, thank you for interviewing with us. We will be in touch shortly regarding next steps.`;\n\nreturn {\n  json: {\n    ...item,\n    hiringUpdateMessage: hiringMsg.trim(),\n    notificationSentAt: new Date().toISOString(),\n    finalStatus: item.hiringStatus || 'under_review'\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "e79c6351-5f8b-452d-8691-7c5952471f9e",
      "name": "Send WhatsApp - Hiring Decision",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5024,
        304
      ],
      "parameters": {
        "url": "https://api.twilio.com/2010-04-01/Accounts/{{ $env.TWILIO_ACCOUNT_SID }}/Messages.json",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "To",
              "value": "={{ 'whatsapp:' + $json.candidatePhone }}"
            },
            {
              "name": "From",
              "value": "whatsapp:+1234567890"
            },
            {
              "name": "Body",
              "value": "={{ $json.hiringUpdateMessage }}"
            }
          ]
        },
        "genericAuthType": "httpBasicAuth"
      },
      "credentials": {
        "httpBasicAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "81ed779b-f9f8-42d9-ac9a-a9c3dd66013f",
      "name": "Update CRM - Google Sheet",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5248,
        400
      ],
      "parameters": {
        "url": "https://sheets.googleapis.com/v4/spreadsheets/YOUR_RECRUITMENT_SHEET_ID/values/Candidates!A1:append?valueInputOption=USER_ENTERED",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"values\": [[\n    \"{{ $json.receivedAt.split('T')[0] }}\",\n    \"{{ $json.candidateName }}\",\n    \"{{ $json.candidatePhone }}\",\n    \"{{ $json.extractedJobRole }}\",\n    \"{{ $json.screeningScore }}\",\n    \"{{ $json.qualificationStatus }}\",\n    \"{{ $json.recommendedAction }}\",\n    \"{{ $json.chosenSlot ? $json.chosenSlot.display : 'N/A' }}\",\n    \"{{ $json.finalStatus || $json.bookingStatus || 'screened' }}\",\n    \"{{ $json.notificationSentAt || $json.screeningTimestamp }}\"\n  ]]\n}",
        "sendBody": true,
        "specifyBody": "json"
      },
      "typeVersion": 4.2
    },
    {
      "id": "20068677-2b46-496a-a8c8-257a1e7ea793",
      "name": "Webhook Response - 200 OK",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        5680,
        400
      ],
      "parameters": {
        "options": {},
        "respondWith": "json",
        "responseBody": "={ \"status\": \"ok\", \"messageId\": \"{{ $json.messageId }}\" }"
      },
      "typeVersion": 1.1
    },
    {
      "id": "04089495-18fd-4821-8e82-d0dc00a4a4cf",
      "name": "OpenAI - Screening Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2160,
        528
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {
          "maxTokens": 1000,
          "temperature": 0.4
        },
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "afa1ec8c-54ff-4913-bb85-d1c3e660ff5d",
      "name": "OpenAI - Hiring Update Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        4528,
        528
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {
          "maxTokens": 400,
          "temperature": 0.6
        },
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "4b1e5c4a-a237-4b72-a638-3fb8b41074f6",
      "name": "Wait For Finish Task",
      "type": "n8n-nodes-base.wait",
      "position": [
        5456,
        400
      ],
      "parameters": {
        "amount": 15
      },
      "typeVersion": 1.1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "34a1286d-7f58-45e6-8180-887381cbba81",
  "connections": {
    "Book Calendar Event": {
      "main": [
        [
          {
            "node": "AI - Generate Hiring Update",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 1 - Rate Limit": {
      "main": [
        [
          {
            "node": "AI - Screen Candidate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait For Finish Task": {
      "main": [
        [
          {
            "node": "Webhook Response - 200 OK",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI - Screen Candidate": {
      "main": [
        [
          {
            "node": "JS - Parse Screening Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Screening Reply": {
      "main": [
        [
          {
            "node": "Send WhatsApp - Screening Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Schedule Message": {
      "main": [
        [
          {
            "node": "Send WhatsApp - Interview Slots",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI - Screening Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI - Screen Candidate",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "JS - Format Hiring Update": {
      "main": [
        [
          {
            "node": "Send WhatsApp - Hiring Decision",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update CRM - Google Sheet": {
      "main": [
        [
          {
            "node": "Wait For Finish Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Poll Hiring Status Updates": {
      "main": [
        [
          {
            "node": "Normalize Candidate Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook - WhatsApp Inbound": {
      "main": [
        [
          {
            "node": "Normalize Candidate Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI - Generate Hiring Update": {
      "main": [
        [
          {
            "node": "JS - Format Hiring Update",
            "type": "main",
            "index": 0
          },
          {
            "node": "Format Screening Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Recruitment Messages": {
      "main": [
        [
          {
            "node": "Wait 1 - Rate Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JS - Parse Screening Result": {
      "main": [
        [
          {
            "node": "Route - Qualified for Interview?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Candidate Message": {
      "main": [
        [
          {
            "node": "Python - Detect Message Intent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Valid Slot Selections": {
      "main": [
        [
          {
            "node": "Book Calendar Event",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send WhatsApp - Booking Confirmation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI - Hiring Update Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI - Generate Hiring Update",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Python - Detect Message Intent": {
      "main": [
        [
          {
            "node": "Filter Recruitment Messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send WhatsApp - Hiring Decision": {
      "main": [
        [
          {
            "node": "Update CRM - Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send WhatsApp - Interview Slots": {
      "main": [
        [
          {
            "node": "Wait 2 - Candidate Reply Buffer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send WhatsApp - Screening Reply": {
      "main": [
        [
          {
            "node": "Update CRM - Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 2 - Candidate Reply Buffer": {
      "main": [
        [
          {
            "node": "Python - Validate Slot Selection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Python - Validate Slot Selection": {
      "main": [
        [
          {
            "node": "Filter Valid Slot Selections",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route - Qualified for Interview?": {
      "main": [
        [
          {
            "node": "Python - Generate Interview Slots",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Python - Generate Interview Slots": {
      "main": [
        [
          {
            "node": "Format Schedule Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send WhatsApp - Booking Confirmation": {
      "main": [
        [
          {
            "node": "AI - Generate Hiring Update",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}