👋 Onboarding Workflows
🎯 Mục tiêu bài học
Sau bài học này, bạn sẽ:
✅ Xây dựng complete pre-boarding automation
✅ Tạo Day 1 experience workflow tự động
✅ Implement training assignment và check-in surveys
✅ Thiết kế offboarding process automation
Great onboarding sets new hires up for success. Bài này hướng dẫn automate entire onboarding process để consistent và efficient.
🔍 Onboarding Automation Overview
Complete Onboarding Lifecycle:
Checkpoint
Onboarding lifecycle bao gồm mấy giai đoạn chính?
⚡ Workflow 1: Pre-Boarding Automation
New Hire Trigger:
Pre-Boarding Setup
Parse New Hire Data:
1const newHire = $input.item.json;23// Calculate dates4const startDate = new Date(newHire.startDate);5const today = new Date();6const daysUntilStart = Math.ceil((startDate - today) / (1000 * 60 * 60 * 24));78// Determine equipment package9const equipmentPackage = getEquipmentPackage(newHire.role);1011// Generate usernames12const username = generateUsername(newHire.firstName, newHire.lastName);1314return {15 // Personal info16 firstName: newHire.firstName,17 lastName: newHire.lastName,18 fullName: `${newHire.firstName} ${newHire.lastName}`,19 personalEmail: newHire.personalEmail,20 workEmail: `${username}@company.com`,21 22 // Work info23 role: newHire.role,24 department: newHire.department,25 manager: newHire.managerEmail,26 team: newHire.team,27 location: newHire.location,28 29 // Dates30 startDate: newHire.startDate,31 daysUntilStart,32 preBoardingWindow: daysUntilStart >= 7,33 34 // Generated35 username,36 equipmentPackage,37 slackChannels: getDefaultChannels(newHire.department),38 trainingModules: getRequiredTraining(newHire.role)39};4041function generateUsername(first, last) {42 return `${first.toLowerCase()}.${last.toLowerCase()}`.replace(/[^a-z.]/g, '');43}4445function getEquipmentPackage(role) {46 const packages = {47 'Engineer': ['MacBook Pro 16"', '4K Monitor', 'Mechanical Keyboard', 'Mouse'],48 'Designer': ['MacBook Pro 16"', 'Studio Display', 'Wacom Tablet', 'Mouse'],49 'Sales': ['MacBook Air', 'Monitor', 'Keyboard', 'Mouse', 'Headset'],50 'Default': ['MacBook Air', 'Monitor', 'Keyboard', 'Mouse']51 };52 return packages[role] || packages['Default'];53}5455function getDefaultChannels(department) {56 const base = ['#general', '#announcements', '#random', '#help'];57 const deptChannels = {58 'Engineering': ['#engineering', '#dev-ops', '#code-review'],59 'Sales': ['#sales', '#deals', '#customer-success'],60 'Marketing': ['#marketing', '#content', '#social-media']61 };62 return [...base, ...(deptChannels[department] || [])];63}6465function getRequiredTraining(role) {66 const base = ['Company Overview', 'Security Training', 'HR Policies'];67 const roleTraining = {68 'Engineer': ['Git Workflow', 'Code Standards', 'CI/CD Pipeline'],69 'Sales': ['CRM Training', 'Sales Process', 'Product Demo'],70 'Manager': ['Management Fundamentals', 'HR for Managers', '1:1 Best Practices']71 };72 return [...base, ...(roleTraining[role] || [])];73}Pre-Boarding Email Sequence:
1const newHire = $input.item.json;2const daysUntilStart = newHire.daysUntilStart;34// Create email sequence5const emails = [];67// Immediate welcome8emails.push({9 sendDate: new Date().toISOString(),10 type: 'welcome',11 subject: `Welcome to ${company}! 🎉`,12 template: 'welcome_email',13 data: {14 name: newHire.firstName,15 role: newHire.role,16 startDate: newHire.startDate,17 manager: newHire.manager18 }19});2021// 1 week before: What to expect22if (daysUntilStart >= 7) {23 const oneWeekBefore = new Date();24 oneWeekBefore.setDate(oneWeekBefore.getDate() + (daysUntilStart - 7));25 26 emails.push({27 sendDate: oneWeekBefore.toISOString(),28 type: 'what_to_expect',29 subject: 'One Week Until Your Start Date! 📅',30 template: 'week_before_email',31 data: {32 name: newHire.firstName,33 schedule: 'First day schedule attached',34 whatToBring: ['ID for verification', 'Banking info'],35 parkingInfo: newHire.location === 'Office' ? 'Parking details attached' : null36 }37 });38}3940// Day before: Final reminders41const dayBefore = new Date(newHire.startDate);42dayBefore.setDate(dayBefore.getDate() - 1);4344emails.push({45 sendDate: dayBefore.toISOString(),46 type: 'day_before',47 subject: 'See You Tomorrow! 🚀',48 template: 'day_before_email',49 data: {50 name: newHire.firstName,51 startTime: '9:00 AM',52 firstMeeting: 'Orientation with HR',53 whatToExpect: 'Equipment setup, paperwork, team intro'54 }55});5657return { emails };Checkpoint
Pre-boarding automation bao gồm những tasks nào?
🔧 Workflow 2: Day 1 Automation
Day 1 Experience:
Day 1 Onboarding
Welcome Announcement:
1const newHire = $input.item.json;23const announcement = {4 channel: '#general',5 blocks: [6 {7 type: "header",8 text: {9 type: "plain_text",10 text: `🎉 Welcome ${newHire.fullName}!`11 }12 },13 {14 type: "section",15 text: {16 type: "mrkdwn",17 text: `Please join me in welcoming *${newHire.fullName}* to the team!`18 },19 accessory: newHire.photoUrl ? {20 type: "image",21 image_url: newHire.photoUrl,22 alt_text: newHire.fullName23 } : null24 },25 {26 type: "section",27 fields: [28 {29 type: "mrkdwn",30 text: `*Role:*\n${newHire.role}`31 },32 {33 type: "mrkdwn",34 text: `*Team:*\n${newHire.team}`35 },36 {37 type: "mrkdwn",38 text: `*Location:*\n${newHire.location}`39 },40 {41 type: "mrkdwn",42 text: `*Manager:*\n${newHire.manager}`43 }44 ]45 },46 newHire.funFact ? {47 type: "section",48 text: {49 type: "mrkdwn",50 text: `*Fun fact:* ${newHire.funFact}`51 }52 } : null,53 {54 type: "section",55 text: {56 type: "mrkdwn",57 text: `Say hi and give ${newHire.firstName} a warm welcome! 👋`58 }59 }60 ].filter(Boolean)61};6263return announcement;Day 1 Schedule:
1const newHire = $input.item.json;2const startDate = new Date(newHire.startDate);34const schedule = [5 {6 time: '09:00',7 duration: 60,8 title: 'Welcome & Orientation',9 with: 'HR Team',10 description: 'Company overview, policies, paperwork'11 },12 {13 time: '10:00',14 duration: 30,15 title: 'IT Setup',16 with: 'IT Support',17 description: 'Laptop setup, accounts, security'18 },19 {20 time: '10:30',21 duration: 30,22 title: 'Workspace Setup',23 with: 'Office Manager',24 description: 'Desk, access card, tour'25 },26 {27 time: '11:00',28 duration: 60,29 title: 'Meet Your Manager',30 with: newHire.manager,31 description: 'Team intro, expectations, first projects'32 },33 {34 time: '12:00',35 duration: 60,36 title: 'Team Lunch',37 with: 'Your Team',38 description: 'Get to know your colleagues!'39 },40 {41 time: '13:00',42 duration: 60,43 title: 'Meet Your Buddy',44 with: newHire.buddy || 'Assigned Buddy',45 description: 'Your go-to person for questions'46 },47 {48 time: '14:00',49 duration: 120,50 title: 'Self-Guided Setup',51 with: 'Self',52 description: 'Complete tool setups, explore resources'53 },54 {55 time: '16:00',56 duration: 30,57 title: 'End-of-Day Check-in',58 with: newHire.manager,59 description: 'Questions, wrap-up, tomorrow preview'60 }61];6263// Create calendar events64const events = schedule.map(item => ({65 summary: `[Onboarding] ${item.title}`,66 description: `${item.description}\n\nWith: ${item.with}`,67 start: new Date(`${newHire.startDate}T${item.time}:00`),68 end: new Date(`${newHire.startDate}T${item.time}:00`).setMinutes(new Date(`${newHire.startDate}T${item.time}:00`).getMinutes() + item.duration),69 attendees: [newHire.workEmail]70}));7172return { schedule, events };Checkpoint
Day 1 workflow tạo bao nhiêu calendar events?
🏗️ Workflow 3: Training Automation
Assign Training Modules:
Training Assignment
Training Module Assignment:
1const newHire = $input.item.json;23// Define training catalog4const trainingCatalog = {5 // Required for all6 'Company Overview': { duration: 30, deadline: 1, url: '/training/company-overview' },7 'Security Training': { duration: 45, deadline: 3, url: '/training/security' },8 'HR Policies': { duration: 30, deadline: 3, url: '/training/hr-policies' },9 'Communication Tools': { duration: 20, deadline: 1, url: '/training/comms-tools' },10 11 // Role-specific12 'Git Workflow': { duration: 60, deadline: 7, url: '/training/git' },13 'Code Standards': { duration: 45, deadline: 7, url: '/training/code-standards' },14 'CRM Training': { duration: 60, deadline: 5, url: '/training/crm' },15 'Sales Process': { duration: 90, deadline: 7, url: '/training/sales-process' }16};1718// Get required modules for this role19const requiredModules = newHire.trainingModules;2021// Create assignments with deadlines22const startDate = new Date(newHire.startDate);23const assignments = requiredModules.map(moduleName => {24 const module = trainingCatalog[moduleName];25 const deadline = new Date(startDate);26 deadline.setDate(deadline.getDate() + (module?.deadline || 7));27 28 return {29 employeeId: newHire.employeeId,30 employeeEmail: newHire.workEmail,31 moduleName,32 moduleUrl: module?.url || '#',33 duration: module?.duration || 30,34 assignedDate: startDate.toISOString(),35 deadline: deadline.toISOString(),36 status: 'assigned',37 reminders: [38 { date: new Date(deadline.getTime() - 2*24*60*60*1000).toISOString(), type: '2-day' },39 { date: new Date(deadline.getTime() - 1*24*60*60*1000).toISOString(), type: '1-day' }40 ]41 };42});4344// Calculate total training hours45const totalHours = assignments.reduce((sum, a) => sum + a.duration, 0) / 60;4647return {48 assignments,49 totalModules: assignments.length,50 totalHours: totalHours.toFixed(1),51 estimatedCompletion: new Date(Math.max(...assignments.map(a => new Date(a.deadline)))).toISOString()52};Checkpoint
Training module assignment tính total hours bằng cách nào?
📊 Workflow 4: Check-in Automation
Scheduled Check-ins:
Onboarding Check-ins
Check-in Survey:
1const newHire = $input.item.json;2const checkInType = $input.item.json.checkInType; // day3, week1, month1, month334const surveys = {5 day3: {6 title: 'Day 3 Check-in',7 questions: [8 { id: 'q1', question: 'How are you settling in?', type: 'rating', scale: 5 },9 { id: 'q2', question: 'Is your equipment working properly?', type: 'yesno' },10 { id: 'q3', question: 'Have you met your team members?', type: 'yesno' },11 { id: 'q4', question: 'Any immediate questions or concerns?', type: 'text' }12 ]13 },14 week1: {15 title: 'First Week Check-in',16 questions: [17 { id: 'q1', question: 'How would you rate your first week?', type: 'rating', scale: 5 },18 { id: 'q2', question: 'Do you understand your role and responsibilities?', type: 'rating', scale: 5 },19 { id: 'q3', question: 'How helpful has your onboarding buddy been?', type: 'rating', scale: 5 },20 { id: 'q4', question: 'What's been the highlight of your first week?', type: 'text' },21 { id: 'q5', question: 'What could improve your onboarding experience?', type: 'text' }22 ]23 },24 month1: {25 title: '30-Day Check-in',26 questions: [27 { id: 'q1', question: 'How confident do you feel in your role?', type: 'rating', scale: 5 },28 { id: 'q2', question: 'Do you have clear goals and expectations?', type: 'rating', scale: 5 },29 { id: 'q3', question: 'How supported do you feel by your manager?', type: 'rating', scale: 5 },30 { id: 'q4', question: 'Would you recommend working here to a friend?', type: 'nps', scale: 10 },31 { id: 'q5', question: 'What additional support or resources do you need?', type: 'text' }32 ]33 },34 month3: {35 title: '90-Day Check-in',36 questions: [37 { id: 'q1', question: 'How would you rate your overall onboarding experience?', type: 'rating', scale: 5 },38 { id: 'q2', question: 'Do you feel fully integrated into the team?', type: 'yesno' },39 { id: 'q3', question: 'Are you meeting your performance goals?', type: 'rating', scale: 5 },40 { id: 'q4', question: 'What would you change about the onboarding process?', type: 'text' },41 { id: 'q5', question: 'Any additional feedback for HR?', type: 'text' }42 ]43 }44};4546const survey = surveys[checkInType];4748return {49 employeeId: newHire.employeeId,50 employeeName: newHire.fullName,51 employeeEmail: newHire.workEmail,52 manager: newHire.manager,53 checkInType,54 survey,55 formUrl: `https://forms.company.com/onboarding/${newHire.employeeId}/${checkInType}`56};Process Survey Response:
1const response = $input.item.json;23// Analyze responses4const analysis = {5 employeeId: response.employeeId,6 checkInType: response.checkInType,7 submittedAt: new Date().toISOString(),8 scores: {},9 flags: [],10 sentiment: 'positive'11};1213// Check each rating question14for (const answer of response.answers) {15 if (answer.type === 'rating') {16 analysis.scores[answer.questionId] = answer.value;17 18 // Flag low scores19 if (answer.value <= 2) {20 analysis.flags.push({21 question: answer.question,22 score: answer.value,23 severity: 'high',24 action: 'Manager follow-up needed'25 });26 } else if (answer.value === 3) {27 analysis.flags.push({28 question: answer.question,29 score: answer.value,30 severity: 'medium',31 action: 'Monitor'32 });33 }34 }35 36 if (answer.type === 'yesno' && answer.value === false) {37 analysis.flags.push({38 question: answer.question,39 response: 'No',40 severity: 'medium',41 action: 'Follow up'42 });43 }44}4546// Calculate average score47const ratingScores = Object.values(analysis.scores);48analysis.averageScore = ratingScores.length > 0 49 ? (ratingScores.reduce((a, b) => a + b, 0) / ratingScores.length).toFixed(1)50 : null;5152// Determine sentiment53if (analysis.averageScore < 3 || analysis.flags.filter(f => f.severity === 'high').length > 0) {54 analysis.sentiment = 'needs_attention';55 analysis.alertHR = true;56 analysis.alertManager = true;57} else if (analysis.averageScore < 4) {58 analysis.sentiment = 'neutral';59 analysis.alertManager = true;60}6162return analysis;Checkpoint
Check-in surveys được gửi vào những thời điểm nào?
💡 Workflow 5: Offboarding Automation
Offboarding Process:
Employee Offboarding
Offboarding Checklist:
1const employee = $input.item.json;2const lastDay = new Date(employee.lastDay);3const today = new Date();4const daysRemaining = Math.ceil((lastDay - today) / (1000 * 60 * 60 * 24));56const checklist = {7 employee: {8 name: employee.fullName,9 email: employee.workEmail,10 department: employee.department,11 manager: employee.manager,12 lastDay: employee.lastDay,13 daysRemaining14 },15 tasks: [16 // HR Tasks17 {18 category: 'HR',19 task: 'Schedule exit interview',20 assignee: 'hr@company.com',21 deadline: new Date(lastDay.getTime() - 5*24*60*60*1000),22 status: 'pending'23 },24 {25 category: 'HR',26 task: 'Prepare final paycheck',27 assignee: 'payroll@company.com',28 deadline: lastDay,29 status: 'pending'30 },31 {32 category: 'HR',33 task: 'Benefits termination notice',34 assignee: 'hr@company.com',35 deadline: new Date(lastDay.getTime() - 3*24*60*60*1000),36 status: 'pending'37 },38 39 // IT Tasks40 {41 category: 'IT',42 task: 'Schedule account deactivation',43 assignee: 'it@company.com',44 deadline: lastDay,45 executeOn: lastDay,46 status: 'pending'47 },48 {49 category: 'IT',50 task: 'Revoke system access',51 assignee: 'it@company.com',52 deadline: lastDay,53 status: 'pending'54 },55 {56 category: 'IT',57 task: 'Equipment return tracking',58 assignee: 'it@company.com',59 deadline: new Date(lastDay.getTime() + 3*24*60*60*1000),60 status: 'pending'61 },62 63 // Manager Tasks64 {65 category: 'Manager',66 task: 'Knowledge transfer plan',67 assignee: employee.manager,68 deadline: new Date(lastDay.getTime() - 7*24*60*60*1000),69 status: 'pending'70 },71 {72 category: 'Manager',73 task: 'Reassign projects and tasks',74 assignee: employee.manager,75 deadline: new Date(lastDay.getTime() - 3*24*60*60*1000),76 status: 'pending'77 },78 {79 category: 'Manager',80 task: 'Send farewell announcement',81 assignee: employee.manager,82 deadline: lastDay,83 status: 'pending'84 }85 ]86};8788return checklist;Checkpoint
Offboarding checklist bao gồm tasks cho những nhóm nào?
📋 Best Practices
DO:
- ✅ Personalize communications (use their name!)
- ✅ Space out information (avoid overload)
- ✅ Include human touchpoints
- ✅ Gather feedback early and often
- ✅ Make resources easily accessible
DON'T:
- ❌ Automate everything (human connection matters)
- ❌ Overwhelm with too much on Day 1
- ❌ Skip check-ins
- ❌ Ignore negative feedback
- ❌ Forget offboarding is part of the cycle
Checkpoint
Tại sao không nên automate everything trong onboarding?
📝 Bài Tập Thực Hành
Build complete onboarding system:
- Create pre-boarding email sequence
- Build Day 1 welcome workflow
- Implement training assignment automation
- Set up check-in survey system
- Design offboarding checklist
Welcome new hires like a pro! 👋
Checkpoint
Bạn đã hoàn thành những challenges nào trong bài tập?
🧠 Key Takeaways
- 📋 Start early - Pre-boarding matters
- 🎯 Consistency - Same great experience for everyone
- 📊 Measure - Track completion and satisfaction
- 💬 Communicate - Keep everyone informed
- 🔄 Iterate - Improve based on feedback
Checkpoint
Tại sao Start early - Pre-boarding matters?
🚀 Bài tiếp theo
Content Curation — RSS feeds, news aggregation, và knowledge collection.
