Automatisation du processus de départ des employés avec JotForm et GPT-4 pour l'analyse des entretiens de sortie

Avancé

Ceci est uncontenant 20 nœuds.Utilise principalement des nœuds comme If, Set, Code, Gmail, GoogleSheets. Automatisation du processus de départ des employés avec GPT-4 pour l'analyse et JotForm pour les entretiens de sortie

Prérequis
  • Compte Google et informations d'identification Gmail API
  • Informations d'identification Google Sheets API
  • Clé API OpenAI

Catégorie

-
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "meta": {
    "instanceId": "277842713620d9f5554de3b1518b865a152c8c4db680008bd8aec536fc18b4a8",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "6d7688d5-8162-40d8-a707-9c95343e5e3d",
      "name": "Analyser les données de départ",
      "type": "n8n-nodes-base.code",
      "position": [
        -1344,
        160
      ],
      "parameters": {
        "jsCode": "const formData = $input.first().json;\n\nreturn {\n  json: {\n    offboardingId: formData.submissionID || 'OFF-' + Date.now(),\n    submissionDate: new Date().toISOString(),\n    employeeName: formData.employeeName || formData.q3_employeeName,\n    employeeEmail: formData.employeeEmail || formData.q4_employeeEmail,\n    employeeId: formData.employeeId || formData.q5_employeeId,\n    department: formData.department || formData.q6_department,\n    position: formData.position || formData.q7_position,\n    manager: formData.manager || formData.q8_manager,\n    managerEmail: formData.managerEmail || formData.q9_managerEmail,\n    lastWorkingDay: formData.lastWorkingDay || formData.q10_lastWorkingDay,\n    resignationReason: formData.resignationReason || formData.q11_resignationReason,\n    newEmployer: formData.newEmployer || formData.q12_newEmployer || 'Not disclosed',\n    willingToReturn: formData.willingToReturn || formData.q13_willingToReturn || 'Maybe',\n    overallSatisfaction: formData.overallSatisfaction || formData.q14_overallSatisfaction || '3',\n    managerRating: formData.managerRating || formData.q15_managerRating || '3',\n    workEnvironmentRating: formData.workEnvironmentRating || formData.q16_workEnvironmentRating || '3',\n    compensationFair: formData.compensationFair || formData.q17_compensationFair || 'Somewhat',\n    careerGrowth: formData.careerGrowth || formData.q18_careerGrowth || 'Limited',\n    wouldRecommend: formData.wouldRecommend || formData.q19_wouldRecommend || 'Maybe',\n    whatWorkedWell: formData.whatWorkedWell || formData.q20_whatWorkedWell || '',\n    improvementAreas: formData.improvementAreas || formData.q21_improvementAreas || '',\n    reasonForLeaving: formData.reasonForLeaving || formData.q22_reasonForLeaving || '',\n    additionalFeedback: formData.additionalFeedback || formData.q23_additionalFeedback || '',\n    hasLaptop: formData.hasLaptop || formData.q24_hasLaptop || 'no',\n    laptopSerialNumber: formData.laptopSerialNumber || formData.q25_laptopSerialNumber || '',\n    hasMobile: formData.hasMobile || formData.q26_hasMobile || 'no',\n    mobileNumber: formData.mobileNumber || formData.q27_mobileNumber || '',\n    hasKeyCard: formData.hasKeyCard || formData.q28_hasKeyCard || 'no',\n    hasCreditCard: formData.hasCreditCard || formData.q29_hasCreditCard || 'no',\n    otherEquipment: formData.otherEquipment || formData.q30_otherEquipment || '',\n    replacementName: formData.replacementName || formData.q31_replacementName || 'TBD',\n    replacementEmail: formData.replacementEmail || formData.q32_replacementEmail || '',\n    criticalProjects: formData.criticalProjects || formData.q33_criticalProjects || '',\n    documentationLocation: formData.documentationLocation || formData.q34_documentationLocation || '',\n    keyContacts: formData.keyContacts || formData.q35_keyContacts || '',\n    status: 'initiated'\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "29cfc4d5-2cff-444e-ab0f-756ccc0476aa",
      "name": "Analyse IA de l'entretien de départ",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1104,
        240
      ],
      "parameters": {
        "text": "=You are an expert HR analyst. Analyze this exit interview:\n\n**Employee:** {{ $json.employeeName }} - {{ $json.position }} ({{ $json.department }})\n**Manager:** {{ $json.manager }}\n**Last Day:** {{ $json.lastWorkingDay }}\n**Reason:** {{ $json.resignationReason }}\n**New Employer:** {{ $json.newEmployer }}\n\n**Ratings:**\n- Overall Satisfaction: {{ $json.overallSatisfaction }}/5\n- Manager: {{ $json.managerRating }}/5\n- Environment: {{ $json.workEnvironmentRating }}/5\n- Compensation Fair: {{ $json.compensationFair }}\n- Career Growth: {{ $json.careerGrowth }}\n- Would Recommend: {{ $json.wouldRecommend }}\n- Willing to Return: {{ $json.willingToReturn }}\n\n**Feedback:**\nWorked Well: {{ $json.whatWorkedWell }}\nImprovements: {{ $json.improvementAreas }}\nLeaving Reason: {{ $json.reasonForLeaving }}\nAdditional: {{ $json.additionalFeedback }}\n\nProvide JSON analysis:\n{\n  \"retentionAnalysis\": {\"flightRisk\": \"voluntary|pushout|retirement\", \"primaryReason\": \"compensation|career|management|culture\", \"preventable\": true|false, \"preventabilityScore\": 0-100, \"reasoning\": \"\"},\n  \"sentimentAnalysis\": {\"overallSentiment\": \"positive|neutral|negative\", \"sentimentScore\": 0-100, \"keyEmotions\": [], \"toneDescription\": \"\"},\n  \"managerPerformance\": {\"managerIssue\": true|false, \"managementConcerns\": [], \"managerActionRequired\": true|false, \"managerCoaching\": \"\"},\n  \"departmentInsights\": {\"departmentIssues\": [], \"culturalConcerns\": [], \"processImprovements\": [], \"teamImpact\": \"\"},\n  \"compensationInsights\": {\"compensationIssue\": true|false, \"marketCompetitiveness\": \"below|at|above\", \"benefitsAdequate\": true|false, \"recommendedAdjustment\": \"\"},\n  \"retentionRecommendations\": [{\"recommendation\": \"\", \"priority\": \"critical|high|medium\", \"targetAudience\": \"\", \"expectedImpact\": \"\"}],\n  \"boomerangPotential\": {\"likelyToReturn\": true|false, \"returnProbability\": 0-100, \"rehireRecommendation\": \"strongly_recommend|recommend|neutral\", \"rehireNotes\": \"\"},\n  \"knowledgeTransferRisk\": {\"criticalKnowledgeRisk\": \"low|medium|high\", \"documentationStatus\": \"excellent|good|poor\", \"transferComplexity\": \"simple|moderate|complex\", \"transferPlan\": []},\n  \"competitorIntelligence\": {\"competitorMoving\": true|false, \"competitorName\": \"\", \"competitorAdvantages\": [], \"competitiveThreat\": \"low|medium|high\"},\n  \"redFlags\": {\"hasRedFlags\": true|false, \"flaggedIssues\": [], \"requiresInvestigation\": true|false, \"urgency\": \"immediate|high|low\", \"escalationRequired\": true|false},\n  \"actionItems\": [{\"action\": \"\", \"owner\": \"\", \"deadline\": \"\", \"priority\": \"critical|high|medium\"}],\n  \"executiveSummary\": \"\",\n  \"hrPriority\": 1-5\n}",
        "options": {
          "systemMessage": "You are an expert HR analyst specializing in employee retention and organizational development."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.6
    },
    {
      "id": "e0705b20-98fb-4cc9-8158-8b714e6397bf",
      "name": "Extraire l'analyse IA",
      "type": "n8n-nodes-base.set",
      "position": [
        -752,
        112
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "aiAnalysis",
              "name": "aiAnalysis",
              "type": "string",
              "value": "={{ $json.output }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "86beba39-71ae-4d75-b0b6-73fa0ddc8372",
      "name": "Fusionner l'analyse de départ",
      "type": "n8n-nodes-base.code",
      "position": [
        -512,
        224
      ],
      "parameters": {
        "jsCode": "const offboardingData = $input.first().json;\nconst aiAnalysisRaw = offboardingData.aiAnalysis;\n\nlet aiAnalysis;\ntry {\n  aiAnalysis = JSON.parse(aiAnalysisRaw);\n} catch (e) {\n  aiAnalysis = {\n    retentionAnalysis: {flightRisk: 'voluntary', primaryReason: 'personal', preventable: false, preventabilityScore: 30, reasoning: 'Personal reasons'},\n    sentimentAnalysis: {overallSentiment: 'neutral', sentimentScore: 50, keyEmotions: ['professional'], toneDescription: 'Professional'},\n    managerPerformance: {managerIssue: false, managementConcerns: [], managerActionRequired: false, managerCoaching: 'None'},\n    departmentInsights: {departmentIssues: [], culturalConcerns: [], processImprovements: [], teamImpact: 'Minimal'},\n    compensationInsights: {compensationIssue: false, marketCompetitiveness: 'at', benefitsAdequate: true, recommendedAdjustment: 'None'},\n    retentionRecommendations: [],\n    boomerangPotential: {likelyToReturn: true, returnProbability: 50, rehireRecommendation: 'recommend', rehireNotes: 'Good performer'},\n    knowledgeTransferRisk: {criticalKnowledgeRisk: 'medium', documentationStatus: 'good', transferComplexity: 'moderate', transferPlan: ['Document processes']},\n    competitorIntelligence: {competitorMoving: false, competitorName: 'Unknown', competitorAdvantages: [], competitiveThreat: 'low'},\n    redFlags: {hasRedFlags: false, flaggedIssues: [], requiresInvestigation: false, urgency: 'low', escalationRequired: false},\n    actionItems: [],\n    executiveSummary: 'Standard voluntary departure.',\n    hrPriority: 3\n  };\n}\n\nconst lastDay = new Date(offboardingData.lastWorkingDay);\nconst today = new Date();\nconst daysUntilLastDay = Math.ceil((lastDay - today) / (1000 * 60 * 60 * 24));\n\nconst equipmentList = [];\nif (offboardingData.hasLaptop === 'yes') equipmentList.push('Laptop: ' + offboardingData.laptopSerialNumber);\nif (offboardingData.hasMobile === 'yes') equipmentList.push('Mobile: ' + offboardingData.mobileNumber);\nif (offboardingData.hasKeyCard === 'yes') equipmentList.push('Key Card');\nif (offboardingData.hasCreditCard === 'yes') equipmentList.push('Corporate Card');\nif (offboardingData.otherEquipment) equipmentList.push('Other: ' + offboardingData.otherEquipment);\n\nreturn {\n  json: {\n    ...offboardingData,\n    daysUntilLastDay: daysUntilLastDay,\n    equipmentList: equipmentList,\n    equipmentCount: equipmentList.length,\n    flightRisk: aiAnalysis.retentionAnalysis.flightRisk,\n    primaryReason: aiAnalysis.retentionAnalysis.primaryReason,\n    preventable: aiAnalysis.retentionAnalysis.preventable,\n    preventabilityScore: aiAnalysis.retentionAnalysis.preventabilityScore,\n    retentionReasoning: aiAnalysis.retentionAnalysis.reasoning,\n    overallSentiment: aiAnalysis.sentimentAnalysis.overallSentiment,\n    sentimentScore: aiAnalysis.sentimentAnalysis.sentimentScore,\n    keyEmotions: aiAnalysis.sentimentAnalysis.keyEmotions,\n    toneDescription: aiAnalysis.sentimentAnalysis.toneDescription,\n    managerIssue: aiAnalysis.managerPerformance.managerIssue,\n    managementConcerns: aiAnalysis.managerPerformance.managementConcerns,\n    managerActionRequired: aiAnalysis.managerPerformance.managerActionRequired,\n    managerCoaching: aiAnalysis.managerPerformance.managerCoaching,\n    departmentIssues: aiAnalysis.departmentInsights.departmentIssues,\n    culturalConcerns: aiAnalysis.departmentInsights.culturalConcerns,\n    processImprovements: aiAnalysis.departmentInsights.processImprovements,\n    teamImpact: aiAnalysis.departmentInsights.teamImpact,\n    compensationIssue: aiAnalysis.compensationInsights.compensationIssue,\n    marketCompetitiveness: aiAnalysis.compensationInsights.marketCompetitiveness,\n    benefitsAdequate: aiAnalysis.compensationInsights.benefitsAdequate,\n    salaryRecommendation: aiAnalysis.compensationInsights.recommendedAdjustment,\n    retentionRecommendations: aiAnalysis.retentionRecommendations,\n    likelyToReturn: aiAnalysis.boomerangPotential.likelyToReturn,\n    returnProbability: aiAnalysis.boomerangPotential.returnProbability,\n    rehireRecommendation: aiAnalysis.boomerangPotential.rehireRecommendation,\n    rehireNotes: aiAnalysis.boomerangPotential.rehireNotes,\n    knowledgeRisk: aiAnalysis.knowledgeTransferRisk.criticalKnowledgeRisk,\n    documentationStatus: aiAnalysis.knowledgeTransferRisk.documentationStatus,\n    transferComplexity: aiAnalysis.knowledgeTransferRisk.transferComplexity,\n    transferPlan: aiAnalysis.knowledgeTransferRisk.transferPlan,\n    movingToCompetitor: aiAnalysis.competitorIntelligence.competitorMoving,\n    competitorName: aiAnalysis.competitorIntelligence.competitorName,\n    competitorAdvantages: aiAnalysis.competitorIntelligence.competitorAdvantages,\n    competitiveThreat: aiAnalysis.competitorIntelligence.competitiveThreat,\n    hasRedFlags: aiAnalysis.redFlags.hasRedFlags,\n    flaggedIssues: aiAnalysis.redFlags.flaggedIssues,\n    requiresInvestigation: aiAnalysis.redFlags.requiresInvestigation,\n    flagUrgency: aiAnalysis.redFlags.urgency,\n    escalationRequired: aiAnalysis.redFlags.escalationRequired,\n    actionItems: aiAnalysis.actionItems,\n    executiveSummary: aiAnalysis.executiveSummary,\n    hrPriority: aiAnalysis.hrPriority\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "e1eef5b4-5a69-4820-9d13-e6558a9cf570",
      "name": "Drapeaux rouges ?",
      "type": "n8n-nodes-base.if",
      "position": [
        -272,
        320
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "condition1",
              "operator": {
                "type": "boolean",
                "operation": "true"
              },
              "leftValue": "={{ $json.hasRedFlags }}",
              "rightValue": true
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "ec33fccb-989c-4a04-8966-b0fb7f202a60",
      "name": "Envoyer une alerte de drapeau rouge",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -144,
        144
      ],
      "webhookId": "965ee19b-d0c0-45d9-aefa-bf82b4963f11",
      "parameters": {
        "sendTo": "hr-director@company.com",
        "message": "=🚨 CRITICAL EXIT INTERVIEW ALERT\n\n**Employee:** {{ $json.employeeName }}\n**Position:** {{ $json.position }}\n**Department:** {{ $json.department }}\n**Manager:** {{ $json.manager }}\n**Last Day:** {{ $json.lastWorkingDay }}\n\n⚠️ **RED FLAGS:**\n{{ $json.flaggedIssues.map((flag, i) => `${i + 1}. ${flag.toUpperCase()}`).join('\\n') }}\n\n**Urgency:** {{ $json.flagUrgency.toUpperCase() }}\nRequires Investigation: {{ $json.requiresInvestigation ? 'YES' : 'NO' }}\nEscalation: {{ $json.escalationRequired ? 'YES - Executive Level' : 'HR Level' }}\n\n**AI Summary:**\n{{ $json.executiveSummary }}\n\n**Primary Reason:** {{ $json.primaryReason.replace('_', ' ').toUpperCase() }}\nPreventable: {{ $json.preventable ? 'YES (' + $json.preventabilityScore + '%)' : 'NO' }}\n\n{{ $json.managerIssue ? 'MANAGER ISSUE DETECTED: ' + $json.managementConcerns.join(', ') : '' }}\n\n**Ratings:**\n- Satisfaction: {{ $json.overallSatisfaction }}/5\n- Manager: {{ $json.managerRating }}/5\n- Environment: {{ $json.workEnvironmentRating }}/5\n\n**Immediate Actions:**\n{{ $json.actionItems.filter(item => item.priority === 'critical').map((item, i) => `${i + 1}. ${item.action} (${item.owner})`).join('\\n') }}\n\nConfidential - Handle Immediately\n\n---\nAI-Powered Exit Interview System",
        "options": {},
        "subject": "=🚨 URGENT: Exit Interview Red Flags - {{ $json.employeeName }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "PIMDNhXNj8Zyiz3G",
          "name": "Gmail account - Deepanshi"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "f8168232-a4f2-4194-8697-b709e1b2345b",
      "name": "Envoyer la checklist employé",
      "type": "n8n-nodes-base.gmail",
      "position": [
        368,
        560
      ],
      "webhookId": "7bff5bb9-913c-4d54-b6e5-9f0051d03e3f",
      "parameters": {
        "sendTo": "={{ $('Jotform Trigger').item.json['Employee Email'] }}",
        "message": "=Hi {{ $('Jotform Trigger').item.json['Employee Name'].first }},\n\nThank you for your service. Here's your offboarding checklist:\n\n**Last Working Day:** {{ $('Jotform Trigger').item.json['Last Working Day '] }}\n\n📦 **EQUIPMENT TO RETURN:**\n\n\nReturn by: {{ $('Jotform Trigger').item.json['Last Working Day '] }}\nShip to: IT Department, [Company Address]\n\n🔑 **ACCESS DEACTIVATION:**\nAll access will be automatically revoked on {{ $('Jotform Trigger').item.json['Last Working Day '] }}:\n• Email account\n• Company systems\n• Building access\n• VPN\n\n📄 **KNOWLEDGE TRANSFER:**\n{{ $json.replacementName !== 'TBD' ? 'Your replacement: ' + $json.replacementName : 'Replacement TBD' }}\n\nPlease ensure:\n• Project documentation updated\n• Passwords transferred to manager\n• Critical contacts documented\n• Ongoing work status documented\n\n💰 **FINAL PAYCHECK:**\n• Date: {{ $('Jotform Trigger').item.json['Last Working Day '] }}\n• Unused PTO: Included\n• COBRA info: Mailed in 14 days\n• 401(k) rollover: Separate email\n\n📧 **BEFORE YOUR LAST DAY:**\n1. Return all equipment\n2. Forward personal emails\n3. Download personal files\n4. Complete knowledge transfer\n\nQuestions? Contact hr@company.com\n\n{{ $json.willingToReturn === 'Yes' ? 'We hope to work together again someday!' : 'Best wishes in your next role!' }}\n\nHR Team",
        "options": {},
        "subject": "=Offboarding Checklist - Equipment & Access"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "PIMDNhXNj8Zyiz3G",
          "name": "Gmail account - Deepanshi"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "8b39327d-4763-4903-938d-fa05d810ac65",
      "name": "Envoyer les actions du manager",
      "type": "n8n-nodes-base.gmail",
      "position": [
        336,
        256
      ],
      "webhookId": "1b42fa79-4f3f-4bee-b4a1-961106e7bcb5",
      "parameters": {
        "sendTo": "={{ $('Jotform Trigger').item.json['Manager Email'] }}",
        "message": "=Hi {{ $('Jotform Trigger').item.json.Manager }} ,\n\n{{ $('Jotform Trigger').item.json['Employee Name'].first }} is leaving. Here's what you need to do:\n\n**Employee:** {{ $('Jotform Trigger').item.json['Employee Name'].first }}\n**Last Day:** {{ $('Jotform Trigger').item.json['Last Working Day '] }}\n**Days Remaining:** {{ $json.daysUntilLastDay }}\n**Reason:** {{ $('Jotform Trigger').item.json.resignationReason }}\n\n🤖 **AI INSIGHTS:**\n{{ $json.executiveSummary }}\n\n**Preventability:** {{ $json.preventable ? 'YES (' + $json.preventabilityScore + '%)' : 'NO' }}\n**Primary Reason:** {{ $json.primaryReason.replace('_', ' ') }}\n\n{{ $json.managerIssue ? '⚠️ MANAGEMENT FEEDBACK: ' + $json.managementConcerns.join(', ') + '\\nHR will follow up.' : '' }}\n\n**Ratings:**\n- Satisfaction: {{ $('Jotform Trigger').item.json.overallSatisfaction }}/5\n- Your Rating: {{ $('Jotform Trigger').item.json.managerRating }}/5\n- Environment: {{ $('Jotform Trigger').item.json.workEnvironmentRating }}/5\n\n📋 **YOUR ACTION ITEMS:**\n\n**1. Knowledge Transfer ({{ $json.knowledgeRisk.toUpperCase() }} RISK)**\nComplexity: {{ $json.transferComplexity }}\nReplacement: {{ $('Jotform Trigger').item.json.replacementName }}\n\nPlan:\n{{ $json.transferPlan.map((step, i) => `${i + 1}. ${step}`).join('\\n') }}\n\n**2. Critical Projects:**\n{{ $json.criticalProjects || 'Please identify with employee' }}\n\n**3. Documentation:**\nLocation: {{ $json.documentationLocation || 'TBD' }}\n\n**4. Key Contacts:**\n{{ $json.keyContacts || 'TBD' }}\n\n**5. Schedule Transfer Sessions:**\nDeadline: {{ $('Jotform Trigger').item.json['Last Working Day '] }}\n{{ $json.daysUntilLastDay < 10 ? '⚠️ URGENT - Limited time!' : '' }}\n\n**6. Team Communication:**\nAnnounce departure and transition plan\n\n**7. Access Review:**\nConfirm all shared passwords documented\n\n{{ $json.compensationIssue ? '💰 COMPENSATION NOTE: Exit interview indicated comp concerns. Consider for team retention.' : '' }}\n\n**Retention Recommendations:**\n{{ $json.retentionRecommendations.slice(0, 3).map((rec, i) => `${i + 1}. ${rec.recommendation} (${rec.priority})`).join('\\n') }}\n\n**Boomerang Potential:** {{ $json.returnProbability }}%\n{{ $json.likelyToReturn ? 'Keep door open - they may return!' : '' }}\n\nContact HR with questions.\n\nHR Team",
        "options": {},
        "subject": "=Action Required: Offboarding -  {{ $('Jotform Trigger').item.json['Employee Name'].first }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "PIMDNhXNj8Zyiz3G",
          "name": "Gmail account - Deepanshi"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "0cf711cd-fa20-466d-8975-0f5bc7e2712b",
      "name": "Envoyer le départ IT",
      "type": "n8n-nodes-base.gmail",
      "position": [
        512,
        64
      ],
      "webhookId": "37c95c12-43c4-476c-ac58-7bd040c26369",
      "parameters": {
        "sendTo": "it@company.com",
        "message": "=IT Offboarding Request\n\n**Employee:** {{ $json.employeeName }}\n**ID:** {{ $json.employeeId }}\n**Email:** {{ $json.employeeEmail }}\n**Department:** {{ $json.department }}\n**Last Day:** {{ $json.lastWorkingDay }}\n**Days Until:** {{ $json.daysUntilLastDay }}\n\n🔒 **ACCESS TO REVOKE ON {{ $json.lastWorkingDay }}:**\n• Email account ({{ $json.employeeEmail }})\n• All company systems\n• VPN access\n• Building access card\n• Any admin privileges\n\n📦 **EQUIPMENT TO RECOVER:**\n{{ $json.equipmentList.length > 0 ? $json.equipmentList.map((item, i) => `${i + 1}. ${item}`).join('\\n') : 'No equipment listed' }}\n\n📧 **EMAIL FORWARDING:**\nForward to: {{ $json.manager }} ({{ $json.managerEmail }})\nDuration: 30 days\n\n💾 **DATA TRANSFER:**\n• Backup employee files\n• Transfer to: {{ $json.replacementName !== 'TBD' ? $json.replacementName + ' (' + $json.replacementEmail + ')' : $json.manager }}\n• Document location: {{ $json.documentationLocation || 'TBD' }}\n\n📋 **CHECKLIST:**\n[ ] Revoke all system access\n[ ] Disable email account\n[ ] Forward emails to manager\n[ ] Backup user files\n[ ] Transfer critical data\n[ ] Deactivate VPN\n[ ] Disable badge access\n[ ] Confirm equipment return\n[ ] Remove from distribution lists\n[ ] Update org chart systems\n\n{{ $json.daysUntilLastDay < 7 ? '⚠️ URGENT - Less than 1 week!' : '' }}\n\nSchedule access revocation for EOD {{ $json.lastWorkingDay }}\n\nHR Team",
        "options": {},
        "subject": "=IT Offboarding: {{ $json.employeeName }} - {{ $json.lastWorkingDay }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "PIMDNhXNj8Zyiz3G",
          "name": "Gmail account - Deepanshi"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "faae0f0c-322c-4415-8360-d73bb308584d",
      "name": "Journaliser dans Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        848,
        240
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "Employee Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Employee Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Employee Email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Employee Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Address",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Address",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Start Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Start Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Position",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Position",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Department",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Department",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Manager Email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Manager Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Employee Type",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Employee Type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Laptop Type",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Laptop Type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Software Access",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Software Access",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone Needed",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Phone Needed",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Experience Level",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Experience Level",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Emergency Contact",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Emergency Contact",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Shirt Size",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Shirt Size",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Dietary Restrictions",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Dietary Restrictions",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "id",
              "defaultMatch": true,
              "canBeUsedToMatch": true
            },
            {
              "id": "threadId",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "threadId",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "labelIds",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "labelIds",
              "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/1pwrTx5GXB7mAg5eJQ9q0I9tsgSI9keZ2W4iuTZi7wF8/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1pwrTx5GXB7mAg5eJQ9q0I9tsgSI9keZ2W4iuTZi7wF8",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1pwrTx5GXB7mAg5eJQ9q0I9tsgSI9keZ2W4iuTZi7wF8/edit?usp=drivesdk",
          "cachedResultName": "Employee Onboarding"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "Kz2DdSp11rxqwlFt",
          "name": "Google Sheets account - Deepanshi"
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "71b9e82f-c9d8-4b33-a415-0696f80142c9",
      "name": "Note adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1680,
        48
      ],
      "parameters": {
        "height": 240,
        "content": "📩 **TRIGGER**\nCaptures resignation\nand exit interview data\nvia Jotform\nCreate your form for free on [Jotform using this link](https://www.jotform.com/?partner=mediajade)"
      },
      "typeVersion": 1
    },
    {
      "id": "797528ee-89eb-4bde-97ed-99a0af58a3f1",
      "name": "Note adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1408,
        48
      ],
      "parameters": {
        "height": 240,
        "content": "🧾 **PARSE**\nNormalizes all\noffboarding data"
      },
      "typeVersion": 1
    },
    {
      "id": "bee1b348-6fc4-4660-a812-5854140d48b2",
      "name": "Note adhésive2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1120,
        48
      ],
      "parameters": {
        "height": 640,
        "content": "🤖 **AI ANALYSIS**\nAnalyzes exit interview\nfor retention insights,\nred flags, and trends"
      },
      "typeVersion": 1
    },
    {
      "id": "71087237-b7f3-4489-aa99-0cbdd3c1c845",
      "name": "Note adhésive3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -864,
        0
      ],
      "parameters": {
        "height": 240,
        "content": "🔗 **EXTRACT**\nExtracts structured\nJSON from AI"
      },
      "typeVersion": 1
    },
    {
      "id": "d1a2d1bb-275f-4462-a880-41aeba329d84",
      "name": "Note adhésive4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -608,
        80
      ],
      "parameters": {
        "height": 240,
        "content": "🧩 **MERGE**\nCombines AI insights\nwith offboarding data\nand calculates metrics"
      },
      "typeVersion": 1
    },
    {
      "id": "c41d3858-26fb-4b6b-b8fb-a2a9fa9d129c",
      "name": "Note adhésive5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -352,
        96
      ],
      "parameters": {
        "width": 352,
        "height": 416,
        "content": "⚠️ **RED FLAG CHECK**\nRoutes serious issues\nto HR/Legal immediately"
      },
      "typeVersion": 1
    },
    {
      "id": "1d71ecc7-886c-462b-8dc0-b4380655160d",
      "name": "Note adhésive6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        32,
        16
      ],
      "parameters": {
        "width": 640,
        "height": 736,
        "content": "📧 **NOTIFICATIONS**\nSends automated emails to:\n• Employee (checklist)\n• Manager (action items)\n• IT (access revocation)\n• HR (alerts if red flags)"
      },
      "typeVersion": 1
    },
    {
      "id": "864a4f22-2ed4-433e-9846-d16ab2aac05e",
      "name": "Note adhésive7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        768,
        96
      ],
      "parameters": {
        "height": 240,
        "content": "📊 **LOGGING**\nComplete audit trail\nwith AI insights for\nretention analytics"
      },
      "typeVersion": 1
    },
    {
      "id": "1f9c4d10-9a3a-4578-9844-3eca072b5554",
      "name": "Modèle de chat OpenAI",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1120,
        464
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "8IkhtT3EbXygnvcr",
          "name": "Klinsman OpenAI"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "032e0843-0db5-4d76-869e-a10f9905fcf0",
      "name": "Déclencheur Jotform",
      "type": "n8n-nodes-base.jotFormTrigger",
      "position": [
        -1632,
        192
      ],
      "webhookId": "employee-offboarding",
      "parameters": {
        "form": "252852702090453"
      },
      "credentials": {
        "jotFormApi": {
          "id": "W7O1b225FpOwkwDT",
          "name": "JotForm account-Deepanshi"
        }
      },
      "typeVersion": 1
    }
  ],
  "pinData": {
    "Jotform Trigger": [
      {
        "Manager": "me",
        "Position": "manager",
        "hasLaptop": "",
        "hasMobile": "",
        "Department": "IT",
        "Shirt Size": "",
        "Laptop Type": "hp",
        "employee Id": "223",
        "New Employer": "mo",
        "Phone Needed": "35915",
        "careerGrowth": "nil",
        "Employee Name": {
          "last": "Singhal",
          "first": "Deepanshi"
        },
        "Employee Type": "Full Type",
        "Manager Email": "Deep@gmail.com",
        "managerRating": "2",
        "Employee Email": "deepashirig@gmail.com",
        "whatWorkedWell": "nothing",
        "wouldRecommend": "no",
        "Software Access": "070249",
        "replacementName": "",
        "willingToReturn": "never",
        "Experience Level": "mid level",
        "compensationFair": "2",
        "criticalProjects": "",
        "improvementAreas": "",
        "reasonForLeaving": "",
        "replacementEmail": "",
        "Emergency Contact": {
          "full": ""
        },
        "Last Working Day ": {
          "day": "18",
          "year": "2025",
          "month": "10"
        },
        "resignationReason": "Due t o limited growth and poor organization culture",
        "additionalFeedback": "",
        "laptopSerialNumber": "",
        "overallSatisfaction": "1",
        "Dietary Restrictions": "",
        "documentationLocation": "",
        "workEnvironmentRating": "1"
      }
    ]
  },
  "connections": {
    "e1eef5b4-5a69-4820-9d13-e6558a9cf570": {
      "main": [
        [
          {
            "node": "ec33fccb-989c-4a04-8966-b0fb7f202a60",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "8b39327d-4763-4903-938d-fa05d810ac65",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "032e0843-0db5-4d76-869e-a10f9905fcf0": {
      "main": [
        [
          {
            "node": "6d7688d5-8162-40d8-a707-9c95343e5e3d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1f9c4d10-9a3a-4578-9844-3eca072b5554": {
      "ai_languageModel": [
        [
          {
            "node": "29cfc4d5-2cff-444e-ab0f-756ccc0476aa",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "e0705b20-98fb-4cc9-8158-8b714e6397bf": {
      "main": [
        [
          {
            "node": "86beba39-71ae-4d75-b0b6-73fa0ddc8372",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "86beba39-71ae-4d75-b0b6-73fa0ddc8372": {
      "main": [
        [
          {
            "node": "e1eef5b4-5a69-4820-9d13-e6558a9cf570",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0cf711cd-fa20-466d-8975-0f5bc7e2712b": {
      "main": [
        [
          {
            "node": "faae0f0c-322c-4415-8360-d73bb308584d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ec33fccb-989c-4a04-8966-b0fb7f202a60": {
      "main": [
        [
          {
            "node": "8b39327d-4763-4903-938d-fa05d810ac65",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6d7688d5-8162-40d8-a707-9c95343e5e3d": {
      "main": [
        [
          {
            "node": "29cfc4d5-2cff-444e-ab0f-756ccc0476aa",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f8168232-a4f2-4194-8697-b709e1b2345b": {
      "main": [
        [
          {
            "node": "0cf711cd-fa20-466d-8975-0f5bc7e2712b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8b39327d-4763-4903-938d-fa05d810ac65": {
      "main": [
        [
          {
            "node": "f8168232-a4f2-4194-8697-b709e1b2345b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "29cfc4d5-2cff-444e-ab0f-756ccc0476aa": {
      "main": [
        [
          {
            "node": "e0705b20-98fb-4cc9-8158-8b714e6397bf",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Avancé

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Avancé
Nombre de nœuds20
Catégorie-
Types de nœuds9
Description de la difficulté

Adapté aux utilisateurs avancés, avec des workflows complexes contenant 16+ nœuds

Auteur
Jitesh Dugar

Jitesh Dugar

@jiteshdugar

AI Automation Specialist - OpenAI, CRM & Automation Expert with a solid understanding of various tools that include Zapier, Make, Zoho CRM, Hubspot, Google Sheets, Airtable, Pipedrive, Google Analytics, and more.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34