---
title: "Automated employee onboarding sequence"
excerpt: "Sends a personalized welcome email and first-week checklist on each new hire's start date, then pings their manager at Day 7, Day 30, and Day 90 so check-ins never slip."
category: "Template"
---

# Agent: read this first

    You're working in the Automated employee onboarding sequence workspace at trydock.ai/<org>/automated-employee-onboarding-sequence.

    ## Your role

    Reads New hires every morning at 8 AM, fires Day 1 kickoff for hires whose start date matches today (welcome email + manager Slack checklist), fires Day 7 / Day 30 / Day 90 manager pings within the configured window. Never modifies past hires' touchpoint flags after they're set.

    ## Cadence, when to update Dock

    - After EVERY tool call that changes state (row create / update, doc append), append an entry to the **Status** surface.
    - After every milestone, update the canonical doc surface for that work.
    - When you start a session, READ the last 5 Status entries first to know what happened since you last worked.

    ## User-loop protocol

    - End EVERY reply to the user with: "Check Dock for the latest at trydock.ai/<org>/automated-employee-onboarding-sequence."
    - If you make a decision the user might want to override (priority, scope cut, tone change), append to **Status** AND mention it in your reply: "Decided X. If you'd rather Y, edit [surface] and I'll re-plan."
    - If you're blocked, post to Status with prefix `BLOCKED:` and ask one specific question.

    ## Don't touch

    - Canonical phase / column / surface titles.
    - Anything in a section titled "Locked" or "Decisions sealed."
    - The agentPrompt itself (this section).

    ## First tool calls

    1. `list_surfaces(workspace_slug="automated-employee-onboarding-sequence")`
    2. `get_doc(workspace_slug="automated-employee-onboarding-sequence", surface_slug="status")`
    3. `list_rows(workspace_slug="automated-employee-onboarding-sequence", surface_slug="new-hires")`

    ---

    # Automated employee onboarding sequence

    A daily sweep that turns a hire row into a complete onboarding touchpoint stream. Open in Dock and you get four surfaces seeded:

    - **New hires** (table) one row per hire: Employee Name, Employee Email, Start Date, Role, Department, Manager, Manager Slack ID, Status, Sequence Started, Day 1 Sent, Day 7 Sent, Day 30 Sent, Day 90 Sent, Notes.
    - **Setup guide** (doc) how the agent reads the table + the one Python script + company-context configuration + window thresholds.
    - **Onboarding log** (doc) running narrative log of every touchpoint sent. Useful for HR audit and for spotting drop-off patterns.
    - **Status** (doc) the agent's working session log. End of every run: 1 paragraph of what was processed, who got pinged, what was skipped.

    ## Bring your own agent

    Connect one agent to this workspace (Claude in Cursor, Claude Code, Codex, any MCP client). The agent runs daily at 8 AM, no manual trigger needed once the cron is wired.

    ## The user-loop protocol

    Your agent proposes; you decide.

    - When you confirm a hire: add a New hires row before their start date. Required fields: Employee Name, Employee Email, Start Date (YYYY-MM-DD), Role, Department, Manager, Manager Slack ID. Set Status=Active.
    - Daily 8 AM: agent reads every Active row. Computes days_since_start. On the start date (days_since_start = 0): generates a personalized welcome email + a role-specific first-week manager checklist via Claude. Sends email to Employee Email via SMTP. Posts checklist to Slack with @manager mention. Flips Sequence Started=Yes, Day 1 Sent=Yes.
    - At Day 7 / Day 30 / Day 90 within MILESTONE_WINDOW_DAYS (default 7 days): generates a role-specific manager check-in prompt via Claude. Posts to Slack with @manager mention. Flips Day N Sent=Yes.
    - If a hire's start date was more than MAX_KICKOFF_LATE_DAYS ago (default 3): skips the welcome email (a late welcome confuses an already-settled employee) and flips Sequence Started=Skipped, Day 1 Sent=Skipped.
    - When onboarding is complete: operator flips Status to Completed. Hire is excluded from future runs.
    - Agent NEVER changes Status from Active. Agent NEVER touches past touchpoint flags once set. Those are operator decisions.
    - End of every working session, agent writes 1 paragraph to **Status**: hires processed, touchpoints sent, anything skipped.

    ## First run

    1. Confirm company context with the operator: COMPANY_NAME, COMPANY_CONTEXT (1-2 sentences for Claude to personalize), FROM_NAME for outgoing emails.
    2. Get SMTP credentials: SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD. Gmail requires App Passwords.
    3. Open Setup guide and follow the install steps. Configure .env, drop run_onboarding.py.
    4. Add a test hire row with Start Date = today (or tomorrow). Run the script once manually. Watch New hires + Slack + Status.

    ## Status

    ### [00:00 UTC] seeded by Dock
    Workspace created from the automated employee onboarding sequence template. Agent: read the Setup guide, then confirm COMPANY_CONTEXT + SMTP credentials + a test hire with the operator before the first daily run.
    Next: confirm context + SMTP + add first hire row.

## Outcome

An onboarding workspace where every new hire moves through Day 1 + Day 7 + Day 30 + Day 90 touchpoints automatically, managers get personalized check-in prompts in Slack at the right moments, and HR has a full audit trail.

**Estimated time:** 45 min setup, ongoing ~2 min per new hire row  
**Difficulty:** beginner  
**For:** Ops managers, HR generalists, and office managers handling 1-10 hires/quarter at 10-100 person companies.

## What you'll need

Pre-register or install before you start.

- **[Dock](https://trydock.ai)** _(Free plan covers this template; Pro $19/mo unlocks more workspaces.)_ — The workspace itself, the New hires table, the Onboarding log doc surface for HR audit.
- **[Anthropic API](https://www.anthropic.com/api)** _(Pay per token, ~$0.01 per hire across the full sequence (Day 1 + Day 7 + Day 30 + Day 90).)_ — Claude generates personalized welcome emails, manager checklists, and milestone check-in prompts tailored to role and department.
- **[Slack incoming webhook](https://api.slack.com/messaging/webhooks)** _(Free)_ — Manager touchpoint destination. Block Kit messages with first-week checklist on Day 1, role-specific prompts at Day 7 / 30 / 90.
- **[SMTP](https://support.google.com/mail/answer/185833)** _(Free with Gmail; SendGrid + Mailgun have free tiers below 100/day.)_ — Welcome email delivery on Day 1. Gmail App Passwords work, or any SMTP provider (SendGrid, Mailgun, your hosting provider).
- **[CueAPI (optional)](https://cueapi.ai)** _(Free tier covers daily cadence.)_ — Cloud-scheduled daily 8 AM run so the sequence keeps firing when your laptop is closed.

---

# The template · 5 steps

## Step 1: Write COMPANY_CONTEXT for personalization

_Estimated time: 10 min_

Claude personalizes every welcome email, every manager checklist, and every milestone prompt against COMPANY_NAME plus a 1-2 sentence COMPANY_CONTEXT. The more specific the context, the more the output sounds like your company instead of generic onboarding template.

### Tasks

- [ ] Set COMPANY_NAME to the company name as employees would say it (e.g. 'Acme HVAC' not 'Acme Field Services Inc.')
- [ ] Write COMPANY_CONTEXT: 1-2 sentences about what the company does + values. Example: 'We are a 45-person HVAC and plumbing services company. Our values are safety, reliability, and customer first.'
- [ ] If you have different vibes by department (field techs vs office staff), put the dominant flavor in COMPANY_CONTEXT and use the Extending section for department-specific milestone sequences

> [!CAUTION]
> **Gotchas**
>
> - Generic COMPANY_CONTEXT ('we make software') produces generic emails. Specifics ('we make scheduling software for HVAC techs, our customers love that we never charge per seat') produce specific emails.
> - Don't put confidential info in COMPANY_CONTEXT. It goes through the Anthropic API on every run.

## Step 2: Wire .env + SMTP credentials + the Python script

_Estimated time: 20 min_

One script: run_onboarding.py runs daily at 8 AM. Same SMTP setup pattern as field service: Gmail App Passwords or any SMTP provider. Install Anthropic, requests, dotenv, drop the script from Setup guide.

### Tasks

- [ ] Gmail: turn on 2FA, visit myaccount.google.com/apppasswords, generate an App Password
- [ ] Open Setup guide (doc) and copy run_onboarding.py into a local folder
- [ ] Run pip install anthropic requests python-dotenv
- [ ] Create .env with DOCK_API_KEY, DOCK_WORKSPACE_SLUG, ANTHROPIC_API_KEY, SLACK_WEBHOOK_URL, SMTP_HOST, SMTP_PORT=587, SMTP_USER, SMTP_PASSWORD, FROM_NAME=People Ops, COMPANY_NAME, COMPANY_CONTEXT, MILESTONE_WINDOW_DAYS=7, MAX_KICKOFF_LATE_DAYS=3, CLAUDE_MODEL=claude-sonnet-4-6
- [ ] Generate a Dock API key at trydock.ai/settings/api
- [ ] Create a Slack incoming webhook for your HR or ops channel, paste the URL into SLACK_WEBHOOK_URL

> [!CAUTION]
> **Gotchas**
>
> - MILESTONE_WINDOW_DAYS = 7 is the window for late firing. Hire started Day 5, today is Day 10? Day 7 fires. Today is Day 15? Day 7 is marked Skipped.
> - MAX_KICKOFF_LATE_DAYS = 3 is the absolute cap on Day 1 welcome emails. A 2-week-late welcome confuses someone already settled in. Default 3 days is right for most companies.

## Step 3: Test the full Day 1 + milestone loop

_Estimated time: 20 min_

Before scheduling, confirm Day 1 + milestone touchpoints work end to end. Add a test hire row with Start Date = today and your own email + Slack ID. Run the script. Then bump the start date back 7 days, 30 days, 90 days; re-run; confirm each milestone fires once.

### Tasks

- [ ] Add a test New hires row: your name, your email, Start Date = today (YYYY-MM-DD), Role = 'Test', Department = 'Test', your Slack user ID for Manager Slack ID, Status = Active
- [ ] Run python run_onboarding.py. Confirm: you get a welcome email, you get a Slack first-week checklist, the row flips Sequence Started=Yes + Day 1 Sent=Yes.
- [ ] Change Start Date to 7 days ago. Run again. Confirm: Day 7 milestone Slack post + Day 7 Sent=Yes.
- [ ] Change Start Date to 30 days ago, re-run, confirm Day 30. Same for 90.
- [ ] Flip Status to Completed. Re-run. Confirm the row is excluded from processing.

> [!CAUTION]
> **Gotchas**
>
> - If you don't get a welcome email but the row flipped Sequence Started=Yes, SMTP probably failed silently. Check the log file or SMTP credentials.
> - Re-running with Day N Sent already=Yes correctly no-ops. If you want to re-test, clear that flag in the row.

### Agent prompt for this step

```text
Run a first onboarding sweep. Read every New hires row with Status=Active. For each, compute days_since_start. For days_since_start >= 0 with blank Sequence Started: if within MAX_KICKOFF_LATE_DAYS, generate welcome email + manager checklist + send + post + flip flags. Otherwise mark Skipped. For each milestone in [7, 30, 90] with blank Day N Sent: if within window, fire it; if window passed, mark Skipped. Post a Status entry summarizing: rows processed, touchpoints sent, anything skipped.
```

## Step 4: Schedule the daily 8 AM run

_Estimated time: 10 min_

One cron task: run daily at 8 AM. Before the office starts, after overnight payroll runs. The script is idempotent: re-running the same day is a no-op for hires that already have today's touchpoints flipped.

### Tasks

- [ ] Option A, cron: crontab -e, add `0 8 * * * cd /path && source .env && python3 run_onboarding.py >> onboarding.log 2>&1`
- [ ] Option B, CueAPI: cueapi create --schedule '0 8 * * *' --name 'employee-onboarding' --handler ./run_onboarding.py
- [ ] Confirm next morning: Status has a fresh session entry, any hire starting today gets the kickoff, any hire hitting a milestone gets the ping.

> [!CAUTION]
> **Gotchas**
>
> - If your hires span time zones, 8 AM is your laptop's time zone. Set the cron in the right tz or use CueAPI's scheduled timezone.
> - Closed laptop overnight + cron = no run. Switch to CueAPI for cloud-scheduled.

## Step 5: Make adding a hire row part of the offer process

_Estimated time: 5 min one-time + ~2 min per hire ongoing_

The whole pipeline works only if the row exists in New hires before the start date. Make 'add to onboarding tracker' a step in your offer-to-Day-1 checklist, right next to 'send paperwork' and 'order laptop'.

### Tasks

- [ ] Add 'add row to New hires table in Dock' to your offer acceptance checklist
- [ ] Required fields per row: Employee Name, Employee Email, Start Date (YYYY-MM-DD), Role, Department, Manager (display name), Manager Slack ID (Uxxxxx), Status=Active
- [ ] Optional: Notes (any context for HR), and the Day N Sent flags stay blank (the script fills them in)
- [ ] When onboarding completes (typically after the Day 90 review): flip Status to Completed. The hire is excluded from future runs.

> [!CAUTION]
> **Gotchas**
>
> - Forgetting to add a row before the start date means no welcome email. The MAX_KICKOFF_LATE_DAYS safety net catches you for 3 days; after that the welcome is skipped (correctly) and you'd send manually.
> - Manager Slack ID (Uxxxxx) not display name. Display names break when someone changes theirs.

---

## Hand the template to your agent

Paste the prompt below into your agent's permanent system prompt so the agent reads, writes, and maintains this workspace as you work through the steps.

```text
You are the agent running on the "Automated employee onboarding sequence" template workspace, connected via MCP at your-org/automated-employee-onboarding-sequence.

Your job: every morning at 8 AM, sweep the New hires table, fire Day 1 kickoff for hires starting today, fire Day 7 / Day 30 / Day 90 milestone check-ins within the configured window. Never modify past touchpoint flags. Never change Status.

User-loop protocol:
- You propose. The operator decides. Never flip Status. Never re-fire a touchpoint that's already marked Sent.
- Daily 8 AM (or "run onboarding"): read every New hires row with Status=Active (default Active if blank). For each, parse Start Date as YYYY-MM-DD, compute days_since_start.
- Day 1: if days_since_start >= 0 AND Sequence Started is blank. If days_since_start <= MAX_KICKOFF_LATE_DAYS: generate welcome email + manager checklist via Claude, send email to Employee Email, post Slack kickoff to Manager Slack ID, flip Sequence Started=Yes + Day 1 Sent=Yes. If days_since_start > MAX_KICKOFF_LATE_DAYS: skip email + flip Sequence Started=Skipped late + Day 1 Sent=Skipped (late welcome confuses settled employees).
- Milestones [7, 30, 90]: for each, if Day N Sent is blank: if N <= days_since_start < N + MILESTONE_WINDOW_DAYS, generate milestone prompt via Claude + post Slack milestone to Manager Slack ID + flip Day N Sent=Yes. If days_since_start >= N + MILESTONE_WINDOW_DAYS, flip Day N Sent=Skipped (window passed, don't retry every run).
- End of every working session, write 1 paragraph to Status: hires processed, touchpoints sent, anything skipped.

Don't touch:
- New hires.Status (Active / Completed / Paused is the operator's flow).
- Touchpoint flags once set (Day N Sent=Yes never gets re-fired).
- weekly_metrics.json or any other file outside this workspace.

First MCP tool calls:
1. list_surfaces(workspace_slug="automated-employee-onboarding-sequence")
2. list_rows(workspace_slug="automated-employee-onboarding-sequence", surface_slug="new-hires")
3. get_doc(workspace_slug="automated-employee-onboarding-sequence", surface_slug="status")
```

---

## FAQ

### What if I forget to add a hire row until after their start date?

MAX_KICKOFF_LATE_DAYS (default 3) catches you for the first 3 days. Add the row, the next daily run sends the welcome email + manager checklist. After Day 3, the welcome email is skipped (a 2-week-late welcome confuses someone already settled) and Sequence Started is set to 'Skipped late'. The manager checklist is still useful in that case; you can send it manually from the row's Notes column.

### Can I customize the welcome email content per department?

Yes via prompt edits in run_onboarding.py. The base script uses one prompt with COMPANY_CONTEXT for tone. To branch by department, extract Department in kickoff_employee() and switch the prompt template. The Extending section in Setup guide shows a department-keyed prompt dict pattern.

### What if a hire goes on leave or pauses onboarding?

Set Status to Paused (or any non-Active value). The hire is excluded from future runs. When they return, set Status back to Active. Note that windows still apply: if Day 30 milestone window passed while paused, that milestone is permanently skipped (you can send manually).

### Can I add a Day 14 or Day 60 milestone?

Yes. Append the day count to the MILESTONES list (e.g. [7, 14, 30, 60, 90]). The loop handles them automatically. Also add the corresponding 'Day N Sent' column to the New hires table, otherwise Dock may auto-create it untyped with unpredictable column ordering.

### What if the manager doesn't use Slack?

Two paths. Either fall back to email (the Extending section in Setup guide shows the Manager Email + send_email() pattern), or just put a generic ops channel as the Manager Slack ID and let the office manager forward via DM. Most ops teams default to the latter for the first quarter, then upgrade to per-manager mentions once Slack adoption is real.

