Automate employee date tracking & reminders for HR with JavaScript
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (7)
- Manual Trigger
n8n-nodes-base.manualTrigger - Code
n8n-nodes-base.code - Gmail
n8n-nodes-base.gmail - Slack
n8n-nodes-base.slack - Google Calendar
n8n-nodes-base.googleCalendar - Edit Fields (Set)
n8n-nodes-base.set - Google Sheets
n8n-nodes-base.googleSheets
What it does
HR Date Management Automation - Complete Setup Guide 🎯 How It Works This n8n workflow transforms your HR department from reactive to proactive by automatically monitoring 5 critical employee timelines and generating smart alerts before deadlines hit. Core Components 1. Data Input → Employee information (hire dates, contracts, certifications) 1. Date Analysis Engine → Calculates days until critical events 1. Smart Categorization → Sorts employees by urgency level 1. Reminder Scheduler → Creates proactive notifications 1. Multi-Format Export → Sends alerts to your preferred systems Business Value - Prevents compliance violations ($5K-50K+ in fines) - Reduces HR workload (15-20 hours/month saved) - Improves employee experience (no missed reviews/renewals) - Provides management visibility (dashboard reporting) ----- 🚀 Quick Start Test 1. Import the Workflow 1. Download the JavascriptHr.json file 1. Open n8n and click “Import from file” 1. Select the downloaded JSON file 1. Click “Import” 2. Test with Sample Data 1. Click the “Execute Workflow” button 1. Review the sample output in each node 1. Check the final export data format What you’ll see: - 5 sample employees with different scenarios - Calculated days until contract/certification expiry - Priority levels (high/medium/low) - Scheduled reminders with recipient emails - Export data in multiple formats ----- 🔧 Real-World Integration Setup Option 1: Google Sheets Integration (Most Popular) Step 1: Prepare Your Employee Data Create a Google Sheet with these columns: | Employee ID | Name | Email | Department | Hire Date | Contract End | Certification Expiry | Last Review | Probation End | Vacation Days | Status | Sample data format: | 1 | John Smith | [email protected] | IT | 2024-01-15 | 2025-12-31 | 2025-03-20 | 2024-06-15 | 2024-07-15 | 20 | active | Step 2: Replace Sample Data Generator 1. Delete the “Sample Data Generator” node 1. Add “Google Sheets” node 1. Connect to your Google account 1. Configure these settings: - Operation: Read - Document: Your employee spreadsheet - Sheet: Employee data sheet - Range: A1:K100 (adjust for your data size) - Options: ✅ RAW data, ✅ Header row Step 3: Map Your Data Add a “Set” node after Google Sheets to standardize field names: javascript // Map your sheet columns to workflow format { "id": "{{ $json'Employee ID' }}", "name": "{{ $json'Name' }}", "email": "{{ $json'Email' }}", "department": "{{ $json'Department' }}", "hiredOn": "{{ $json'Hire Date' }}", "contractEndDate": "{{ $json'Contract End' }}", "certificationExpiry": "{{ $json'Certification Expiry' }}", "lastReviewDate": "{{ $json'Last Review' }}", "probationEndDate": "{{ $json'Probation End' }}", "vacationDays": "{{ $json'Vacation Days' }}", "status": "{{ $json'Status' }}" } Option 2: HRIS Integration (BambooHR Example) Step 1: BambooHR API Setup 1. Get your BambooHR API key from Settings > API Keys 1. Note your company subdomain (e.g., yourcompany.bamboohr.com) Step 2: Replace Sample Data Generator 1. Delete the “Sample Data Generator” node 1. Add “HTTP Request” node 1. Configure these settings: - Method: GET - URL: https://api.bamboohr.com/api/gateway.php/SUBDOMAIN/v1/employees/directory - Authentication: Basic Auth - Username: Your API key - Password: x (leave as ‘x’) - Headers: Accept: application/json Step 3: Transform BambooHR Data Add a “Code” node to transform the API response: javascript // Transform BambooHR response to workflow format const employees = ; for (const employee of $input.all()) { const emp = employee.json; employees.push({ id: emp.id, name: ${emp.firstName} ${emp.lastName}, email: emp.workEmail, department: emp.department, hiredOn: emp.hireDate, contractEndDate: emp.terminationDate || "2025-12-31", // Default if not set certificationExpiry: emp.customCertDate || "2025-12-31", lastReviewDate: emp.customReviewDate || null, probationEndDate: emp.customProbationDate || null, vacationDays: emp.paidTimeOff || 20, status: emp.employeeStatus || "active" }); } re