An inbox is not
one prompt.
An incoming message can be a support issue, a commercial enquiry, a factual question, a newsletter or something that should be set aside. This system separates classification, response preparation and operational action.
The requirement was not to automate sending. It was to make initial handling repeatable while preserving human control over customer-facing communication.
Correct routing
Support, Sales, Information, Spam/Newsletter and Other require different permitted actions.
Business context
Company details, policies, FAQs and style settings must be editable without rebuilding routes.
Safe output
A draft needs a valid subject and body, and must remain reviewable before it is sent.
Traceable operation
Successful runs, failures and evaluation results require records beyond an individual execution.
A controlled routing system
around Gmail.
The v1.0 workflow distinguishes normal message processing, error handling and evaluation rather than treating them as one happy path.
Processed Create missing labels · skip already-processed messagesSeparate error route: normalize failure → write to Logs and Errors sheets → apply Gmail Error label → optional Telegram notification.
Five categories; explicit
permitted actions.
The classifier includes a fallback and automatic parsing correction, while the action for every branch remains explicit.
The workflow prepares communication.
It does not send it.
Every AI-generated reply is a Gmail draft. Staff can inspect, edit or discard it before any external communication happens.
Draft, never send
There is no automatic AI-email send step in the workflow.
Structured validation
Required response fields are checked before a draft can be created.
Answerability gate
Information messages receive a draft only when CanAnswer: true.
Bounded context
Agents are instructed not to invent prices, policies, timelines, guarantees or procedures.
Input isolation
Inbound email content is handled as user data, not as instructions that can alter the workflow.
Restricted advice
Documented agent instructions refuse legal, medical, financial, tax and accounting advice requests.
Actions are recorded
outside the canvas.
Successful executions append a Google Sheets row with timestamps, status, category, action, received and output email content, workflow and execution identifiers, saved-time estimate and version.
The error route normalizes an error message and node name, writes failure records to Logs and Errors, and applies a Gmail Error label. Telegram notification is present but disabled in v1.0 until configured.
Test workflow paths
and AI quality.
The implementation documents a pre-activation test matrix and includes an evaluation sub-workflow that can run against historical test data.
Duplicate: skip an already Processed email
Branches: Support, Sales, Information, Spam and Other
Context: reply within an existing thread
Failure: bad payload or simulated error
Expected category, action, answerability and draft fields
Actual classifier category and generated draft fields
Google Sheets evaluation cases
Expected vs actual classification
LLM-as-a-judge factual similarity score from 1 to 5
Results appended to Evaluations Results
Business data is separate
from routing logic.
A five-step setup wizard collects company details, AI behaviour settings, business information, FAQs/knowledge and email signature. It normalizes and stores them in the Configuration sheet for the workflow to load dynamically.
Boundaries of the v1.0 reference system.
— It creates Gmail drafts; it does not automatically send AI-generated email.
— Draft quality depends on business configuration, provider selection and human review.
— Information questions outside configured knowledge intentionally receive no AI draft.
— Logs include received and generated email content, so deployment needs an appropriate privacy and access policy.
— Telegram alerting is optional and disabled in the inspected v1.0 workflow.
— No retry mechanism is configured in the inspected v1.0 workflow; failures are logged and surfaced.
— Credentials, labels and sheet destinations must be tested before live activation.
— Saved-time values are configured estimates, not measured client impact.
