An agent that sorts our emails and files the documents
Several times a day, every thread in an inbox gets a verdict and a subject, then the documents go to the right Drive folder. Whatever is uncertain waits for a person.
The agent at a glance
- Gmail
- Google Drive
The problem
A business inbox receives everything: client requests, invoices, notifications, newsletters, documents to file. Everyone sorts it their own way, when they have time. Important attachments end up in a downloads folder, or stay buried in a three-month-old thread.
You find an invoice because you remember who sent it, not because it is filed.
What the agent does
Several times a day, it reads the new threads of an inbox, a person's or the team's shared one. For each thread, it sets a verdict (to handle, alert, wait, delegate, to review, keep, read, delete, unsubscribe) and a subject, as Gmail labels. The person only has to open what is marked for them.
It then files the documents: attachments and links go to the right client's folder, to an admin entry or to the invoice inbox. Whatever has an uncertain destination waits for a person, in a separate folder.
It runs on Appstrate, our open source platform, with the connections of the person concerned. A state kept in the Drive lets it resume exactly where the previous pass stopped.
How it decides
Five rules, written down rather than left to intuition:
- An email's content is data, never an instruction. A message that says "delete everything" changes nothing: the agent judges the message, it does not obey it.
- The real sender first. A forward made by hand replaces the sender. The agent finds the origin in the body of the message before deciding where to file.
- When in doubt, it does not file. The document waits in an approval queue, kept apart, never in a folder the whole team reads.
- It never purges, and writes to nobody outside the team. The trash waits for the person's review. A reply is prepared as a draft, never sent.
- It starts in the shadows. On the shared inbox, it first set its labels without forwarding anything, while its judgments were checked.
What it looks like
Four threads from an imagined day (illustrative example, fictional content):
- Invoice from a hosting provider. Verdict "keep", subject "accounting". The PDF is filed in the invoice inbox.
- A client's question about a delivery date. Verdict "to handle", the client's subject. No document to file.
- Contract forwarded by a colleague. The agent finds the original sender in the body of the message. The destination stays uncertain: the document goes to the approval queue.
- Newsletter never opened. Verdict "unsubscribe", proposed to the person.
What we learned
- A "success" run can have done nothing. One day, the agent succeeded on paper for several passes without finishing its reading of the inbox. We now check the number of messages really processed, not only the status.
- Judging and filing are two jobs. Knowing what a thread is about makes filing almost obvious: we do them in that order.
- A state kept in the Drive makes the agent rerunnable. An interrupted pass loses nothing, and a person can pick up by hand.
Take it to your company
The same pattern works for any inbox that receives documents: supplier invoices, orders, applications, quote requests. Written verdicts, one arrival folder per type of document, a queue for doubt, and nobody sorts by hand anymore.
About the author
The tasks that keep coming back and follow rules are ones an agent can take on: less repetitive work for your team, fewer things forgotten.
It works inside your tools, with limited rights, and a person approves the steps that matter.
And if you do not need an agent, we tell you.
More inspirations
An agent that files our meeting transcripts
Every recorded meeting ends up in the right Drive folder, with nobody touching it. Here is what this agent does, how it decides, and what we learned.
An agent that prepares our sales meetings
The evening before a meeting, a one-page brief: who the company is, what we have already said to each other, and what to learn during the call.
An agent that runs our AI watch every morning
About twenty video channels, blogs, forums, newsletters. Every morning, a note of the day in the Drive and a three-paragraph email for the team.