Back to Work Samples
Google WorkspaceDraft-onlyHuman reviewAI-assisted

Flagship automation case study

AI writes the draft. Your team always sends the email.

This Gmail responder makes ready-to-review customer-reply drafts with the right business context. It never sends a customer email on its own: a human reviews, edits if needed, and presses Send every time.

That boundary is enforced in production, not left to a prompt. The service checks whether a message is eligible, validates the draft recommendation, and sends uncertain cases straight to review.

At a glance

Fast drafts, clear boundaries, and six separate business voices

6

separate business profiles

Each inbox has its own facts, writing voice, and operating rules.

60s

default inbox check

A dedicated worker checks each configured inbox on a regular interval.

15 min

repeat-sender pause

The system avoids preparing repeated replies to the same sender too quickly.

Always

human sends

Production creates Gmail drafts only. A person must press Send.

The problem

Customers deserve a prompt reply. Your team needs control over the promise.

A busy inbox creates a difficult choice. You can answer quickly but risk a rushed, inconsistent response, or you can read every thread carefully and lose time before even writing a first draft.

The dangerous version of email automation takes the send button away. This design does the useful work before that moment, then deliberately stops at a Gmail draft where the relationship owner makes the final call.

The promise to your team

It can save time on the blank-page problem without ever emailing a customer by itself. Every outbound message still has a named human decision behind it.

How it works

From a new email to a draft your team can trust

The system does not hand every raw email to AI. It first removes obvious non-work, adds the right context, asks for a structured recommendation, and only then creates a draft for human review.

01

Start with only the emails worth considering

A dedicated inbox worker looks for new customer messages that have not already been handled. It leaves out routine system mail, messages your team has labeled, and messages that clearly do not need a reply.

Produces
A small, relevant list for review instead of every message in the mailbox.
If something goes wrong
If Gmail cannot be read, the worker records the problem and slows down before trying again rather than repeatedly hitting the inbox.
Exactly how the inbox avoids duplicate or unsuitable workshow

Each Python watcher runs for one inbox and checks Gmail at its configured interval. The query excludes mail with earlier responder labels before the message is read.

Deterministic skip checks also exclude user-labeled mail, configured sender lists and Gmail categories, no-reply traffic, and automated-response headers. Errors are logged; repeated polling failures back off with a capped delay.

02

Give each draft the right business context

For an eligible message, the system reads the conversation, notices attachments, checks whether the sender was contacted recently, and brings in the facts and tone for that specific business profile.

Produces
A prepared request that reflects the customer conversation and the correct company guidance.
If something goes wrong
A missing conversation identifier or unreadable message is marked for attention instead of being guessed at.
03

Ask for a structured recommendation, not free-form behavior

The drafting service proposes what the message means, why it reached that conclusion, how confident it is, and a candidate reply. It is told to use the supplied business facts rather than make up an answer.

Produces
A reviewable recommendation with a draft, reasons, and a confidence signal.
If something goes wrong
Incomplete or invalid answers are rejected. A bad response does not become a customer-facing message.
How the AI response is checked before it can be usedshow

The portable responder skill receives a structured payload and is instructed to use supplied site facts, treat unsent drafts as not-yet-answered, return JSON only, and provide intent, reasons, confidence, citations, and a candidate reply.

The watcher validates the envelope and rejects malformed, incomplete, non-finite, or out-of-range values. Provider calls have timeouts, retry attempts, audit records, and fail closed when output is invalid.

04

Turn the recommendation into a Gmail draft

Safety rules check confidence, paused or test mode, attachments, sender cooldowns, and any higher-risk mailbox action. In production, the outcome is always a labeled Gmail draft for a person to read and send.

Produces
A visible draft in the familiar Gmail workflow, ready for human judgment.
If something goes wrong
When the decision is uncertain or the service is paused, it takes the safer path: a reviewable draft rather than an automatic action.
05

Keep a record and watch the service

The system records what happened, adds visible mailbox labels, and checks that the inbox workers are healthy. If a worker fails, it is restarted; if health changes, the operator receives a useful alert.

Produces
An operating trail that explains what happened to a message and whether the service is healthy.
If something goes wrong
A 15-minute health check sends one incident alert for a real issue and one recovery alert when it is resolved, avoiding repeated noise.
How the service stays observable after deploymentshow

Decisions write audit events, mailbox labels, and tracked-draft snapshots. systemd restarts a worker after failure and also manages daily digests and the health timer.

The timer runs every 15 minutes and checks processes, authorization, disk, load, and queue state. Persistent incident state deduplicates alerts and emits a distinct recovery notification.

What the workflow changes

Instead of giving AI control of customer correspondence, it gives your team a prepared starting point. The repetitive reading and first-draft work shrink; the relationship judgment stays with people.

Delivery is deliberately last

The final state is a draft, not an automated send.

The system makes inbox work easier to act on without hiding the moment when a person commits to the customer.

01Customer email
02Context and safety checks
03Gmail draft
04Human presses Send

How the pieces fit together

Separate responsibilities make the inbox easier to operate

Each layer has one job: watch the inbox, bring the right guidance, prepare a draft, remember what happened, or keep the service healthy.

Inbox checking

One Python worker per inbox

Separate workers keep each inbox running independently and make the source of a problem clear.

Mailbox workspace

Google Workspace Gmail

The service reads conversations, creates Gmail drafts, and uses labels as visible status markers.

Drafting assistant

Portable Claude skill

A shared drafting format works across inboxes while each profile supplies its own business knowledge and tone.

Business guidance

Separate profile files

Knowledge, voice, and rules stay isolated for every configured site rather than blending into one generic prompt.

History and evidence

Gmail labels, audit records, draft snapshots, and SQLite

Several records make the workflow traceable and help prevent the same message from being handled twice.

Day-to-day operations

systemd services and timers

The workers restart after a failure and scheduled checks keep watch when no one is looking at the server.

The separated configuration and operating componentsshow

Six configured site profiles keep knowledge, voice, and rules files isolated. The shared skill contract accepts JSON, while optional relationship memory is added only for the relevant site.

State is held across Gmail labels, JSONL audit logs, draft snapshots, and SQLite. Bounded batches and controlled worker shutdown keep the per-inbox long-running processes manageable.

Automations and safeguards

What keeps the wrong email from going out?

The answer is not one prompt instruction. Delivery rules, inbox filters, validation, confidence checks, and operational monitoring all work together so a risky or unclear case stays visible for human review.

A person sends every customer message

The production setting is ALWAYS_DRAFT=1. The system can prepare a reply, but it cannot send it. Your team reads, edits, and presses Send.

The same email is not handled twice

A responder label marks completed work. Future inbox checks exclude that message, so the visible label also acts as the no-repeat marker.

Uncertainty goes to review

Confidence is a decision gate. Low confidence, a paused service, or test mode shifts the result to a reviewable draft instead of a stronger action.

Attachments and rapid repeat contact get extra care

Attachment signals and a 15-minute sender cooldown are included in the routing decision, keeping unusual or repetitive exchanges reviewable.

Mailbox changes require separate permission

Archive, trash, and spam paths are separately controlled. A risky mailbox action is not quietly enabled because the drafting service ran.

Problems are visible, not hidden

Audit records, worker restarts, and a 15-minute health timer create a clear incident-and-recovery path instead of leaving a failure unnoticed.

The simple safety rule

When the system knows less than it should, it does less. It leaves a draft for someone to inspect instead of making a hidden customer-facing decision.

The exact production routing rulesshow

The production service sets ALWAYS_DRAFT=1, so even a high-confidence response is written as a Gmail draft. The router applies configured confidence thresholds, attachment and cooldown signals, plus pause and dry-run flags before delivery.

Ignore has its own higher threshold and is downgraded when uncertain, paused, or in dry-run mode. Archive, trash, and spam have separate feature gates; spam becomes trash unless reporting has been explicitly enabled.

What it replaces

From repetitive inbox labor to an auditable review queue

Manual inbox process

Review-first responder

A team member reads every inbound thread and starts each reply from a blank compose window.

Routine noise is filtered out and a context-aware first draft waits in Gmail for a person to review.

Tone and business details depend on memory, scattered documents, or old sent mail.

Each profile supplies its own knowledge, voice, and rules every time an eligible message is prepared.

A basic rule either acts blindly or offers no useful help at all.

Clear mailbox rules, a structured recommendation, confidence gates, and human review work together.

A failed inbox automation may be noticed only after a customer reports a missed reply.

Labels, audit records, automatic restarts, and incident-and-recovery alerts create an operating trail.

The point is not to remove people from customer relationships. It is to make their review time count by placing the relevant thread, context, draft, and visible status in one familiar workspace.

That makes the inbox easier to staff across busy periods, while preserving the accountability your customers expect. A manager can see the work waiting for review instead of wondering whether an automatic system already spoke for the company.

The review queue also creates a calmer handoff between staff members. People spend their time evaluating a prepared response, not rebuilding the customer story from scattered messages and informal notes.

The result is practical help without a hidden hand on the send button.

What this means for your business

Bring AI into customer operations without handing over control.

Reduce first-draft work while keeping the final customer commitment with your team.

Give each brand, business unit, or shared inbox its own facts and writing voice on a common framework.

Start sensitive email work in a low-risk draft-only mode and change policy only after review data supports it.

Give operators a clear answer to what happened to a message and why.

Apply the same review-first pattern to intake, scheduling, quoting, support follow-up, and internal requests.

The visible labels create auditability, while the 15-minute health checks provide operational monitoring without asking staff to babysit the inbox.

Plain-language glossary

Every technical term used on this page, explained without jargon.

ALWAYS_DRAFT=1
A production setting that forces every proposed reply to be saved as a Gmail draft, never sent automatically.
Audit record
A time-stamped record of what the system decided and the action it took.
Confidence gate
A minimum certainty level required before the workflow can take a stronger action.
Cooldown
A short wait period that prevents repeated handling of the same sender too quickly.
Gmail label
A visible Gmail tag used to show message status and prevent repeat handling.
JSON
A structured data format that lets software check whether an AI response has every required field.
SQLite
A small local database file used to keep operational history and control information.
systemd
The Linux service manager that keeps background workers running and schedules health checks.
Worker daemon
A background program that stays running and regularly checks one inbox for eligible mail.

Build confidence before autonomy

Want AI to make your inbox faster without making it riskier?

AK Internet Consulting can design a review-first email workflow around your policies, customer context, approval process, and operating constraints.

Discuss a project like this