MinAI - Về trang chủ
Lý thuyết
8/1345 phút
Đang tải...

Onboarding Workflows

Automate employee onboarding với n8n - account setup, training assignments, và first-day experience

👋 Onboarding Workflows

Team Onboarding

0

🎯 Mục tiêu bài học

TB5 min

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.

1

🔍 Onboarding Automation Overview

TB5 min

Complete Onboarding Lifecycle:

🔄Onboarding Automation Stages
📋Pre-Boarding (Before Day 1)
📧Welcome email series
📄Document collection
💻Equipment request
🔑Account provisioning
📣Manager notifications
🎉Day 1
📢Welcome announcement
System access verification
📅First-day schedule
🤝Buddy assignment
🚀Training kickoff
📚First Week
🎓Training modules
👥Team introductions
🔧Tool walkthroughs
💬Check-in meetings
📎Resource sharing
🎯First 30/60/90 Days
🏆Goal setting
📊Milestone check-ins
💡Feedback collection
📈Performance tracking
Probation review reminders

Checkpoint

Onboarding lifecycle bao gồm mấy giai đoạn chính?

2

⚡ Workflow 1: Pre-Boarding Automation

TB5 min

New Hire Trigger:

Pre-Boarding Setup

🔔Trigger: New Employee in HR System
👤Create User Accounts (Google, Slack, Tools, VPN)
💻Request Equipment (Laptop, Monitor, Peripherals)
📧Send Pre-Boarding Emails
📣Notify Manager & IT
📋Add to Onboarding Tracking

Parse New Hire Data:

JavaScript
1const newHire = $input.item.json;
2
3// Calculate dates
4const startDate = new Date(newHire.startDate);
5const today = new Date();
6const daysUntilStart = Math.ceil((startDate - today) / (1000 * 60 * 60 * 24));
7
8// Determine equipment package
9const equipmentPackage = getEquipmentPackage(newHire.role);
10
11// Generate usernames
12const username = generateUsername(newHire.firstName, newHire.lastName);
13
14return {
15 // Personal info
16 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 info
23 role: newHire.role,
24 department: newHire.department,
25 manager: newHire.managerEmail,
26 team: newHire.team,
27 location: newHire.location,
28
29 // Dates
30 startDate: newHire.startDate,
31 daysUntilStart,
32 preBoardingWindow: daysUntilStart >= 7,
33
34 // Generated
35 username,
36 equipmentPackage,
37 slackChannels: getDefaultChannels(newHire.department),
38 trainingModules: getRequiredTraining(newHire.role)
39};
40
41function generateUsername(first, last) {
42 return `${first.toLowerCase()}.${last.toLowerCase()}`.replace(/[^a-z.]/g, '');
43}
44
45function 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}
54
55function 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}
64
65function 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:

JavaScript
1const newHire = $input.item.json;
2const daysUntilStart = newHire.daysUntilStart;
3
4// Create email sequence
5const emails = [];
6
7// Immediate welcome
8emails.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.manager
18 }
19});
20
21// 1 week before: What to expect
22if (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' : null
36 }
37 });
38}
39
40// Day before: Final reminders
41const dayBefore = new Date(newHire.startDate);
42dayBefore.setDate(dayBefore.getDate() - 1);
43
44emails.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});
56
57return { emails };

Checkpoint

Pre-boarding automation bao gồm những tasks nào?

3

🔧 Workflow 2: Day 1 Automation

TB5 min

Day 1 Experience:

Day 1 Onboarding

Schedule: Start Date Morning
🎉Post Welcome Announcement
📢Add to All Required Channels
📅Send Day 1 Schedule
🤝Assign Onboarding Buddy
📆Schedule Week 1 Meetings
📋Create Personal Kanban Board

Welcome Announcement:

JavaScript
1const newHire = $input.item.json;
2
3const 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.fullName
23 } : null
24 },
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};
62
63return announcement;

Day 1 Schedule:

JavaScript
1const newHire = $input.item.json;
2const startDate = new Date(newHire.startDate);
3
4const 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];
62
63// Create calendar events
64const 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}));
71
72return { schedule, events };

Checkpoint

Day 1 workflow tạo bao nhiêu calendar events?

4

🏗️ Workflow 3: Training Automation

TB5 min

Assign Training Modules:

Training Assignment

🎓Day 1: After Orientation
📚Get Required Training for Role
📝Assign in LMS
Set Deadlines
📧Send Training Schedule
🔔Schedule Check-in Reminders

Training Module Assignment:

JavaScript
1const newHire = $input.item.json;
2
3// Define training catalog
4const trainingCatalog = {
5 // Required for all
6 '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-specific
12 '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};
17
18// Get required modules for this role
19const requiredModules = newHire.trainingModules;
20
21// Create assignments with deadlines
22const 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});
43
44// Calculate total training hours
45const totalHours = assignments.reduce((sum, a) => sum + a.duration, 0) / 60;
46
47return {
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?

5

📊 Workflow 4: Check-in Automation

TB5 min

Scheduled Check-ins:

Onboarding Check-ins

📅Day 3: First Check-in
📝Send Survey Form
📥Collect Responses
🚩Flag Issues to HR/Manager
🔄Repeat at Week 1, Month 1, Month 3

Check-in Survey:

JavaScript
1const newHire = $input.item.json;
2const checkInType = $input.item.json.checkInType; // day3, week1, month1, month3
3
4const 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};
45
46const survey = surveys[checkInType];
47
48return {
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:

JavaScript
1const response = $input.item.json;
2
3// Analyze responses
4const analysis = {
5 employeeId: response.employeeId,
6 checkInType: response.checkInType,
7 submittedAt: new Date().toISOString(),
8 scores: {},
9 flags: [],
10 sentiment: 'positive'
11};
12
13// Check each rating question
14for (const answer of response.answers) {
15 if (answer.type === 'rating') {
16 analysis.scores[answer.questionId] = answer.value;
17
18 // Flag low scores
19 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}
45
46// Calculate average score
47const ratingScores = Object.values(analysis.scores);
48analysis.averageScore = ratingScores.length > 0
49 ? (ratingScores.reduce((a, b) => a + b, 0) / ratingScores.length).toFixed(1)
50 : null;
51
52// Determine sentiment
53if (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}
61
62return analysis;

Checkpoint

Check-in surveys được gửi vào những thời điểm nào?

6

💡 Workflow 5: Offboarding Automation

TB5 min

Offboarding Process:

Employee Offboarding

📋Termination Notice
📅Calculate Last Day & Deadlines
🗣️Schedule Exit Interview
📚Knowledge Transfer Tasks
🔒Account Deactivation
💻Equipment Return Request
📝Final Paperwork
Deactivate & Announce

Offboarding Checklist:

JavaScript
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));
5
6const checklist = {
7 employee: {
8 name: employee.fullName,
9 email: employee.workEmail,
10 department: employee.department,
11 manager: employee.manager,
12 lastDay: employee.lastDay,
13 daysRemaining
14 },
15 tasks: [
16 // HR Tasks
17 {
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 Tasks
40 {
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 Tasks
64 {
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};
87
88return checklist;

Checkpoint

Offboarding checklist bao gồm tasks cho những nhóm nào?

7

📋 Best Practices

TB5 min
Onboarding Automation Tips

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?

8

📝 Bài Tập Thực Hành

TB5 min
Onboarding Challenge

Build complete onboarding system:

  1. Create pre-boarding email sequence
  2. Build Day 1 welcome workflow
  3. Implement training assignment automation
  4. Set up check-in survey system
  5. 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?

9

🧠 Key Takeaways

TB5 min
Remember
  • 📋 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.