Gmail agent that knows who has to act next

Diagram of the Gmail agent that knows who has to act next system: 7 steps
Steps
- New message: Every 10 minutes the script picks up conversations that changed in the last 14 days.
- Transcript built: Up to 15 messages of the thread, 3,000 characters each, as plain text.
- Who acts next?: Claude returns the state, what was promised, the next action and how sure it is.
- Confident?: Below 0.6 the conversation also gets Needs Review, and a person looks.
- Label set: New Enquiry, Company Next Step, Customer Next Step; Priority Alert after 48 hours; Official & Financial on top.
- Needs Review: The label stays until a person confirms or changes it; a hand-set label wins.
- 08:00 summary: One email: what waits on us by age, what waits on customers, what to review, each line a link.
Six labels say who has to act next; the 08:00 summary lists everything that has waited longer than 48 hours
The problem
One shared inbox holds every open matter: the enquiry nobody answered, the quotation promised on Tuesday, the documents a customer still owes. Who has to act next is known only to whoever read the thread last, and what waits quietly is noticed by the customer first.
The system
A script inside Gmail, built as a demo for a client and running on Layer02's own inbox since. Every 10 minutes it reads the conversations that changed and asks Claude one question: who has to act next, and what did we promise? The answer sets one of six labels: New Enquiry, Company Next Step, Customer Next Step, Priority Alert after 48 hours, Official & Financial for tax office, bank and insurer, Needs Review when the model is not sure. A label changed by hand stays. At 08:00 a summary email lists what is waiting on the company, by age, with the open promise and a link to each thread.
What it does now
Opening the inbox answers the question that used to take a scroll: red is what has waited too long, orange is what we owe, blue is where the customer is. Nothing moved out of Gmail, and the company's mail leaves its own Google account only for the question to the model.
Where AI checks and where it decides
| Step | Who decides |
|---|---|
| Which of the four states a conversation is in, what was promised, and whether it is sure enough to label it | AI decides |
| Every answer to a customer, every label it was not sure about, and everything older than 48 hours | A person decides |