3 Claude Code Automations That Run a Service Business (No

Most "use AI in your business" tutorials skip the boring parts: invoicing, email triage, weekly client updates. That's exactly where service businesses bleed two hours a day. Here are the three Claude Code automations I built for a paying client running an invoicing operation in Serbia — running daily, on a home Ubuntu server, no SaaS.
The Setup: One CLAUDE.md to Rule Them All
Before I show the automations, the architecture matters. All three share a single CLAUDE.md at the root of the projects folder. That file is the brain. Client list, default rates, VAT rules, email tone, invoice numbering format, payment terms — everything Claude Code needs to stop being a toy demo and start being a system you trust with real money.
# Business Memory
## Clients
- ACME d.o.o. — rate €60/h, VAT 20%, terms NET 15, contact billing@acme.rs
- Northwind — rate €75/h, VAT exempt (EU reverse charge), terms NET 30
- Globex — rate €50/h, retainer 20h/mo, overage billed monthly
## Invoice rules
- Numbering: YYYY-NNNN, sequential, never skip
- Currency: EUR, two decimals
- PDF template: /srv/invoicing/templates/standard.html
- Always BCC owner@business.rs
## Email tone
- Lowercase greetings for clients on first-name basis
- No exclamation marks. Ever.
- Sign-off: "thanks, M."
## Pricing logic
- Round hours up to nearest 0.25
- Rush work (<48h notice) +25%
When the owner changes a rate, he edits one line in this file. The invoice flow, the triage flow, and the weekly report all see the new number on their next run. That's the whole trick.
Why this beats prompt-stuffing per call
- One source of truth — no drift between scripts
- Cheaper — context is loaded once per session, not duplicated across N prompts
- Auditable —
git log CLAUDE.mdshows every business rule change
Automation 1: Telegram → Invoice in 12 Seconds
This is the one that pays for itself the first week. Owner types a Telegram message:
invoice ACME 12h at 60, project Q4 audit
Twelve seconds later: PDF generated, emailed to ACME, Telegram confirmation reply with the invoice number. Before this, the owner spent 45 minutes a day on invoicing. Now it happens while the espresso machine warms up.
The flow:
Telegram bot → webhook → Claude Code session (Ubuntu)
→ parse intent from message
→ SELECT * FROM clients WHERE name LIKE 'ACME%'
→ apply pricing rules from CLAUDE.md
→ render PDF from Jinja2 template
→ SMTP send to client + BCC owner
→ reply on Telegram: "✓ Sent INV-2024-0184 to ACME (€864 incl. VAT)"
The Telegram → Claude bridge is a 40-line Python script:
from telegram.ext import Application, MessageHandler, filters
import subprocess, os
async def handle(update, context):
text = update.message.text
# Run a single Claude Code command, non-interactive
result = subprocess.run(
["claude", "-p", f"Process this business request: {text}",
"--allowed-tools", "Bash,Read,Write"],
cwd="/srv/invoicing",
capture_output=True, text=True, timeout=60
)
await update.message.reply_text(result.stdout[-500:])
app = Application.builder().token(os.environ["TG_TOKEN"]).build()
app.add_handler(MessageHandler(filters.TEXT, handle))
app.run_polling()
Claude Code itself does the heavy lifting: reads the SQLite client table, calls a generate_invoice.py helper, sends the email. The PDF generation isn't the interesting part — weasyprint or playwright handles that in 200ms. The interesting part is that Claude knows ACME's VAT rate is 20% because CLAUDE.md told it once.
| Step | Time |
|---|---|
| Telegram → server | 0.3s |
| Claude parses + DB lookup | 4-6s |
| PDF render | 0.2s |
| SMTP send | 1-2s |
| Telegram confirmation | 0.4s |
| End-to-end | ~12s |
Automation 2: Email Triage With a Tone File
Service businesses lose hours to email because every message demands a decision: real lead, client question, vendor invoice, or partnership spam. You don't need to read every email — you need Claude to read them and present three drafts you approve.
A cron job runs every 15 minutes:
*/15 6-20 * * 1-5 cd /srv/triage && claude -p "Run inbox triage. \
Pull unread from Gmail, classify into [lead, client, vendor, admin, spam], \
draft reply for lead+client in tone from tone.md, save to drafts/, \
send Telegram summary." --allowed-tools "Bash,Read,Write" >> /var/log/triage.log
For each unread email Claude does five things:
- Pulls the message via Gmail API
- Classifies into one of five buckets
- For
leadandclient— drafts a reply usingtone.mdexamples - Saves the draft as a Gmail draft (so it shows up natively on phone)
- Logs the decision to a daily JSON file for review
Then a single Telegram ping:
📥 3 drafts ready: 2 leads, 1 client question. 0 urgent. 4 archived as spam.
The owner opens Gmail, reads three drafts, sends the two that look right, edits one. Two hours of triage becomes ten minutes of approval.
What actually makes the drafts good
tone.mdcontains 20 real past replies, not curated best-of- Examples cover the boring cases: declining meetings, asking for a brief, "got it, will do tomorrow"
- After a week of corrections, drafts go out untouched ~70% of the time
A snippet of tone.md:
## Example: declining a vague pitch
Subject: re: partnership opportunity
> thanks for reaching out. not the right fit right now — we only take
> on bookkeeping work for businesses already running €200k+ in revenue.
> good luck.
> thanks, M.
## Example: confirming a meeting
> works for me. tuesday 10:00 your time, i'll send a meet link sunday night.
> thanks, M.
Twenty of these and Claude stops sounding like ChatGPT and starts sounding like the owner.
Automation 3: Weekly Client Reports in 90 Seconds
If you have recurring clients, you owe them an update — hours logged, tasks completed, next steps, blockers. Five clients × 30 minutes each = a dead afternoon every Friday. Claude Code does one client in about 90 seconds.
The flow pulls from three sources:
# pseudo of what Claude orchestrates per client
toggl_data = read_csv(f"exports/toggl_{client}_{week}.csv")
notion_data = notion.query_database(NOTION_DB, filter={"client": client})
notes = read_file(f"client_notes/{client}.md")
prompt = f"""
Write this week's update for {client} using tone.md.
Hours: {toggl_data}
Tasks: {notion_data}
Context: {notes}
Template: weekly_template.md
"""
draft = claude(prompt)
telegram_send(f"📊 {client} weekly draft ready. Approve? [Y/N]")
Owner reads it on the phone, taps Y, it goes out by email. Five clients done in under ten minutes total, including review.
The template enforces structure so the report doesn't drift week-to-week:
# {client} — Week of {date}
## Hours
- Total: {hours}h (budget: {budget}h)
- Breakdown: {by_task}
## Shipped
- {bullet list}
## In progress
- {bullet list with % complete}
## Blockers / questions for you
- {bullet list}
## Next week
- {bullet list}
The "blockers/questions for you" section is the one clients actually read. It's also the one that previously got skipped because the owner was tired by report #4.
The Real Cost: Why Not Zapier or Make
Fair question. Two reasons I went with Claude Code on a home server instead of a no-code stack.
Cost. A roughly equivalent Zapier setup — Gmail trigger, GPT step, PDF generator, email send, Telegram step — runs about 2,000-3,000 tasks/month for this client. That's the $73/month Pro plan minimum, often the $133 Team plan once you add multi-step zaps. The Claude Code stack on a home Ubuntu box runs around $18-25/month in Anthropic API costs (Sonnet, ~400 invocations/day across all three flows) plus electricity. The home server already existed.
Flexibility. When the owner wanted to add "if invoice is over €2000, also send a payment-on-account request 7 days before due date" — that was one paragraph added to CLAUDE.md and a five-line check in the invoice script. In Zapier that's a new branching zap with a delay step and a filter, billed as extra tasks every time it runs.
| Claude Code on home server | Zapier/Make equivalent | |
|---|---|---|
| Monthly cost | $18-25 | $73-133 |
| Tone control | Full (tone.md examples) | Limited (per-step prompts) |
| Shared business memory | One CLAUDE.md | Duplicated across zaps |
| Custom logic | Markdown rules | Branching zaps, extra tasks |
| Failure visibility | Logs + Telegram | Email + dashboard |
| Setup time | 1 weekend | 1 weekend |
The setup time is the same. The 5-year cost difference is roughly $3,000-6,000.
What I'd Build First If I Were Starting Today
If you run a service business and you're reading this on a Saturday morning, here's the order:
- Write CLAUDE.md first. Two hours. Dump every business rule, client, rate, and tone preference into one file. This is 60% of the work and it's not coding.
- Build the invoice automation. It pays for itself in week one. Telegram bot + Claude Code + SQLite + a PDF template. One day of focused work.
- Add email triage next week. Start with classification only — no auto-drafts. Just get the Telegram summary working. Add draft generation once you trust the classifier.
- Weekly reports last. Only worth building if you have 3+ recurring clients. Otherwise the ROI isn't there yet.
The thing nobody tells you: the home server isn't required. You can run all three on a $5/month VPS. I prefer the home box because the data (client list, past emails, invoices) stays on hardware I own. For a Serbian accountant dealing with GDPR-adjacent client data, that's not paranoia — it's the only acceptable answer.
Why bizflowai.io helps with this
The invoicing-from-Telegram flow and Gmail triage stack described above are exactly the kind of work I package for clients through bizflowai.io — same CLAUDE.md-driven architecture, adapted to the client's tools (Stripe instead of local PDF, Slack instead of Telegram, HubSpot instead of SQLite). The pattern transfers; the integrations change.
Frequently asked questions
What are the three Claude Code automations every small service business should build?
The three core automations are: (1) an invoice flow triggered from Telegram that generates and emails PDF invoices in about twelve seconds, (2) inbound email triage that classifies unread emails every fifteen minutes and drafts replies in the owner's tone, and (3) a weekly client report generator that compiles hours logged, tasks completed, next steps, and blockers in roughly ninety seconds.
Why does a CLAUDE.md file matter for service business automation?
The CLAUDE.md file sits in the project folder and tells Claude everything about the business: client list, default rates, VAT rules, email tone, invoice numbering format, and payment terms. It eliminates the need to re-explain context every time you run an automation. A well-written CLAUDE.md is the difference between a toy demo and a system you can trust with real money.
How do I automate invoicing with Claude Code and Telegram?
Send a Telegram message like 'invoice ACME twelve hours at sixty euros, project Q4 audit' to a bot. The bot forwards the text to a Claude Code session on a server. Claude reads the message, pulls the client record from a local SQLite database, applies pricing rules from CLAUDE.md, generates a PDF using a template, emails it to the client, and replies on Telegram with the invoice number.
How does Claude Code learn to write emails in your tone?
You create a tone file containing twenty of your real past replies, not handpicked best ones, just real ones. Claude learns your patterns: lowercase for casual clients, no exclamation marks, specific sign-offs. A scheduled job pulls unread emails every fifteen minutes, classifies them into five buckets, and drafts replies. After about a week of corrections, drafts go out almost untouched.
When should I use AI automations instead of building a SaaS product?
Use automations when you run a service business, like freelancing, consulting, or a small agency, and lose hours daily to invoicing, email triage, and client reports. Most Claude Code tutorials focus on building SaaS products, but service businesses don't need that. They need automations that handle the boring eighty percent of operations, freeing up time for billable work.
Want more like this?
I publish practical AI automation, GenAI engineering, and faceless content workflows on YouTube every week.
Subscribe to bizflowai.io on YouTube — never miss a new tutorial.
Planning an AI automation project or need a second opinion on your architecture?
Connect with me on LinkedIn — Lazar Milicevic, GenAI Engineer & bizflowai.io Founder.
Visit bizflowai.io for our services, case studies, and AI consulting.
Frequently asked questions
What are the three Claude Code automations every small service business should build?
The three core automations are: (1) an invoice flow triggered from Telegram that generates and emails PDF invoices in about twelve seconds, (2) inbound email triage that classifies unread emails every fifteen minutes and drafts replies in the owner's tone, and (3) a weekly client report generator that compiles hours logged, tasks completed, next steps, and blockers in roughly ninety seconds.
Why does a CLAUDE.md file matter for service business automation?
The CLAUDE.md file sits in the project folder and tells Claude everything about the business: client list, default rates, VAT rules, email tone, invoice numbering format, and payment terms. It eliminates the need to re-explain context every time you run an automation. A well-written CLAUDE.md is the difference between a toy demo and a system you can trust with real money.
How do I automate invoicing with Claude Code and Telegram?
Send a Telegram message like 'invoice ACME twelve hours at sixty euros, project Q4 audit' to a bot. The bot forwards the text to a Claude Code session on a server. Claude reads the message, pulls the client record from a local SQLite database, applies pricing rules from CLAUDE.md, generates a PDF using a template, emails it to the client, and replies on Telegram with the invoice number.
How does Claude Code learn to write emails in your tone?
You create a tone file containing twenty of your real past replies, not handpicked best ones, just real ones. Claude learns your patterns: lowercase for casual clients, no exclamation marks, specific sign-offs. A scheduled job pulls unread emails every fifteen minutes, classifies them into five buckets, and drafts replies. After about a week of corrections, drafts go out almost untouched.
When should I use AI automations instead of building a SaaS product?
Use automations when you run a service business, like freelancing, consulting, or a small agency, and lose hours daily to invoicing, email triage, and client reports. Most Claude Code tutorials focus on building SaaS products, but service businesses don't need that. They need automations that handle the boring eighty percent of operations, freeing up time for billable work.