line

Automated Onboarding for New Employees

This Workflow allows a company to automate their employee onboarding process by scheduling meetings, creating accounts for software tools, and sending documents to read. The employees also receive personalize onboarding content via an onboarding form.

Visual of Workflow

This flowchart is a visual representation of the different tasks in the workflow.
line

Workflow Steps

  • Prepare paperwork of the employee
  • If the paperwork has been received, then schedule a pre-onboarding meeting
  • A form must be completed by the employee
  • When it has been completed, required accounts are created
  • Wait until the first day and then send a welcome email to the employee
  • Based on the entries in the employee's form, provide the relevant credentials and required readings
  • Finally, schedule another onboarding meeting
  • If the paperwork was never been received, cancel the onboarding

Workflow Code

This workflow is the code that orchestrates tasks (through the Zenaton workflow engine) and executes them on your servers.

const { workflow, duration } = require("zenaton");

module.exports = workflow("OnboardingWorkflow", {
  *handle(employee) {
    const slack = this.connector('slack', 'your-slack-connector-id');
    const sendgrid = this.connector('sendgrid', 'your-sendgrid-connector-id');

    this.run.task("PreparePaperwork", employee)

    const paperworkEvent = yield this.wait.event("PaperworkEvent");

    if (paperworkEvent.success) {
      this.run.task("SchedulePreOnboardingMeeting", employee)

      const form = yield this.wait.event("OnboardingFormEvent");

      accounts = yield this.run.task("CreateAccounts", employee, form.tools)

      this.run.task("OfficeManagement", employee, form)

      yield this.wait.for(duration.timestamp(form.onboardingDay));
      
      sendgrid.post('/mail/send', {body: {"template_id": "welcome", ...}})
      sendgrid.post('/mail/send', {body: {"template_id": "credentials", ...}})
      slack.post('/api/chat.postMessage', {body: {"channel": "...", ...}})
      sendgrid.post('/mail/send', {body: {"template_id": "onboarding_meetings", ...}})
    } else {
      this.run.task('CancelOnboarding', employee);
    }
  }
});

Workflow Executions

View the real-time tasks executions of this workflow.
line