Title: Automate Client Onboarding with a Simple Python Script
Tags: automation, python, productivity, beginners
Every time a new client signs, someone does the same chores: write a welcome email, create a folder, set up follow-up tasks. It's repetitive, rule-based, and perfect for a small script.
Here's a minimal version you can run today and plug into a real trigger later.
What we're building
When a new client comes in, the script:
- Creates a client folder with standard subfolders
- Generates a personalized welcome email
- Writes a task list with due dates (intake check at day 2, check-in at day 7)
No external libraries, just the standard library.
The code
import json from datetime import date, timedelta from pathlib import Path WELCOME = """Hi {name}, Welcome aboard! Here's what happens next: 1. Fill out the intake form: {intake_url} 2. Book your kickoff call: {booking_url} Talk soon, Marc""" def onboard(client, base_dir="clients"): folder = Path(base_dir) / client["company"].lower().replace(" ", "-") for sub in ("contracts", "assets", "notes"): (folder / sub).mkdir(parents=True, exist_ok=True) email = WELCOME.format(**client) (folder / "welcome_email.txt").write_text(email) today = date.today() tasks = [ {"task": "Send welcome email", "due": str(today)}, {"task": "Check intake form is done", "due": str(today + timedelta(days=2))}, {"task": "Day 7 check-in", "due": str(today + timedelta(days=7))}, ] (folder / "tasks.json").write_text(json.dumps(tasks, indent=2)) return folder if __name__ == "__main__": new_client = { "name": "Dana", "company": "Acme Analytics", "intake_url": "https://example.com/intake", "booking_url": "https://example.com/book", } print("Onboarded:", onboard(new_client)) Run it and you'll get clients/acme-analytics/ with three subfolders, a ready-to-send welcome email, and a tasks.json file with due dates.
Making it real
The script is the core logic. To turn it into a real workflow:
- Trigger: call
onboard()from a webhook when your e-signature or invoicing tool reports a signed contract or a paid invoice. - Send the email: swap the file write for your email provider's API or
smtplib. - Tasks: push the task list into your project tool or CRM through its API instead of a JSON file.
- Storage: replace local folders with Google Drive or Dropbox folder creation.
Keep onboard() small and testable, and wrap each integration in its own function so you can swap tools without touching the core.
Why bother
It saves one to two hours per client, nobody forgets a step, and every client gets the same polished first week. It's also a great first automation project, because the trigger is clear and the steps never change.
Want help building onboarding automations for your business? https://ai-automation-entrepreneur.vercel.app/
