Operations & Admin
communication
How to Create Automated Client Communication Templates
Standardize client communications with smart templates that fill automatically.
Jay Banlasan
The AI Systems Guy
Every client email should not start from scratch. I built a system to automate client communication templates that pulls client data, fills in the right details, and generates consistent, professional messages. Same quality every time, regardless of who sends it.
Templates with real data. Not mail merge with blank spots.
What You Need Before Starting
- Python 3.8+
- Client data source (CRM or database)
- An AI API key for dynamic content
- Email sending capability
Step 1: Define Template Library
TEMPLATES = {
"project_kickoff": {
"subject": "Welcome to {project_name} - Next Steps",
"required_fields": ["client_name", "project_name", "kickoff_date", "pm_name"],
"body": """Hi {client_name},
Welcome aboard. We are excited to start {project_name} with your team.
Here is what happens next:
1. Kickoff call on {kickoff_date}
2. We will send a questionnaire before the call
3. Your project manager is {pm_name}
If you have any questions before the kickoff, reply to this email.
Best,
{sender_name}"""
},
"weekly_update": {
"subject": "{project_name} - Weekly Update ({date})",
"required_fields": ["client_name", "project_name", "completed", "upcoming", "blockers"],
"body": """Hi {client_name},
Here is your weekly update for {project_name}.
Completed this week:
{completed}
Coming up next week:
{upcoming}
{blocker_section}
Let me know if you have any questions.
{sender_name}"""
},
"invoice_reminder": {
"subject": "Invoice #{invoice_number} - Payment Reminder",
"required_fields": ["client_name", "invoice_number", "amount", "due_date"],
"body": """Hi {client_name},
This is a friendly reminder that invoice #{invoice_number} for ${amount} is due on {due_date}.
You can pay via the link in the original invoice email, or reply here if you need an updated copy.
Thanks,
{sender_name}"""
}
}
Step 2: Build the Template Engine
def render_template(template_name, data):
template = TEMPLATES[template_name]
missing = [f for f in template["required_fields"] if f not in data]
if missing:
return {"error": f"Missing fields: {', '.join(missing)}"}
subject = template["subject"].format(**data)
body = template["body"].format(**data)
return {"subject": subject, "body": body}
Step 3: Add AI-Enhanced Personalization
import anthropic
client = anthropic.Anthropic()
def personalize_template(template_body, client_context):
prompt = f"""Adjust this email template to sound natural for this specific client.
Do not change the structure or facts. Just adjust tone and add one relevant personal touch.
Client context: {client_context}
Template:
{template_body}
Return the adjusted email only."""
message = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1024,
messages=[{"role": "user", "content": prompt}]
)
return message.content[0].text
Step 4: Auto-Fill from CRM Data
def prepare_weekly_update(client_id, crm_data, project_data):
client = crm_data.get(client_id, {})
completed = "\n".join(f"- {t}" for t in project_data.get("completed", []))
upcoming = "\n".join(f"- {t}" for t in project_data.get("upcoming", []))
blockers = project_data.get("blockers", [])
blocker_section = ""
if blockers:
blocker_section = "Items needing your input:\n" + "\n".join(f"- {b}" for b in blockers)
data = {
"client_name": client.get("first_name", "there"),
"project_name": client.get("project_name", "Your Project"),
"completed": completed or "- No completed tasks this week",
"upcoming": upcoming or "- Planning in progress",
"blocker_section": blocker_section,
"date": __import__('datetime').datetime.now().strftime("%B %d, %Y"),
"sender_name": "Jay"
}
return render_template("weekly_update", data)
Step 5: Send with Preview
def preview_and_send(template_name, data, recipient_email):
rendered = render_template(template_name, data)
if "error" in rendered:
return rendered
print(f"PREVIEW:")
print(f"To: {recipient_email}")
print(f"Subject: {rendered['subject']}")
print(f"Body:\n{rendered['body']}")
print("\n---")
confirm = input("Send? (y/n): ")
if confirm.lower() == "y":
send_email(recipient_email, rendered["subject"], rendered["body"])
return {"status": "sent"}
return {"status": "cancelled"}
What to Build Next
Add template performance tracking. Measure reply rates per template to see which versions get responses. A/B test subject lines. Templates should evolve based on what actually works.
Related Reading
- Building Your First Automation: A Complete Guide - automation fundamentals
- AI-Powered Reporting That Actually Gets Read - communication that gets engagement
- How to Audit Your Operations for AI Opportunities - finding communication automation opportunities
Want this system built for your business?
Get a free assessment. We will map every system your business needs and show you the ROI.
Get Your Free Assessment