An hourly Gmail triage engine. It guarantees the label system exists, has Claude classify every new email, files and archives accordingly, pre-drafts replies for anything that needs one, and once a day, sweeps aged Awaiting Reply threads to close them out or draft a nudge.
Both triggers land in Setup Config, which holds the mode toggle and settings. The flow fetches every existing Gmail label, diffs it against the required set, and, only if any are missing, splits them out and creates each one. It then re-fetches labels and builds a name → labelId map every downstream node uses.
New emails are fetched and batched into one Classify Emails prompt. Parsed results fan out three ways: Apply Labels tags every message; Should Archive? pulls noise out of the inbox; and draft candidates loop through a second Claude call that writes a reply, saved as a Gmail draft on the thread, never auto-sent.
Once a day (detailed mode only), the sweep pulls threads still labeled Awaiting Reply past the age threshold. Each thread is re-read and assessed: if the other side replied, the label is removed and the thread marked actioned; if not, Claude drafts a polite follow-up nudge and the thread is marked nudged so it isn't nudged twice.
simple keeps three labels, Needs Reply · Needs Review · Not Important. detailed expands the taxonomy and unlocks the daily Awaiting-Reply sweep. One value in Setup Config switches everything.
The assistant never sends mail, every reply and nudge lands as a draft for human review. Archiving only removes the INBOX label; nothing is deleted. Marker labels (Actioned, Nudged) make every run idempotent.