Build the categories from last month's mail
The most common mistake happens before any code exists. Someone sits down and invents the categories. Order, question, complaint, other. It looks tidy, and it doesn't match what actually arrives.
Pull a real sample. Export the last few weeks of mail from the shared inbox. A few hundred messages is enough. Pick an ordinary stretch, not the week before Christmas and not the month of your biggest trade fair.
Sort it by hand. The person who handles the inbox today goes through the sample and puts each mail on a pile with a name. When fifty mails in a row add no new pile, you have your categories. Expect some piles nobody would have predicted. Delivery notifications nobody reads. Letters from public authorities. Customers replying to an old thread to raise something completely new.
Give every category somewhere to go. A category without a consequence is just a label. Orders go to sales and get an acknowledgment. Complaints go to quality and need a same-day reply. Supplier invoices go to accounting and need no reply at all. What happens to them there without anyone retyping a number is in the article on e-invoice automation. Spam gets moved to a folder, never deleted, so you can find the misfires.
Decide which fields matter. For each category, write down what should be extracted. For an order that's customer number, items, quantities and requested date. For a complaint it's the order number, the part and what exactly went wrong. That list becomes the template the model works from.
Keep the sorted sample. It's your test set. Every time you change the instructions, you run the same mails through again and see whether things got better or worse, instead of guessing.
The model sorts and drafts, a person sends
The pipeline has four steps. None of them sends anything.
Classify. Each new mail goes to the model with subject, body and sender. The model also gets the category list, a one-line description of each, and a couple of real examples from the sample. It returns a category name, not an essay.
Extract. In the same call, the model returns the agreed fields in a fixed structure that ordinary software can read. If a field isn't in the mail, it stays empty. The instructions say plainly that the model must not fill gaps with guesses, because a guessed quantity on an order is worse than a blank one.
Route. The category decides which folder, ticket queue or team channel the mail lands in. This part is plain code with no AI in it, and that's why you can trust it.
Draft. For categories that need a reply, the model writes one in your company's tone, using the extracted details. The draft sits in the mailbox as a draft. A person reads it, fixes what's wrong, and presses send themselves.
That last step isn't training wheels you take off after a fortnight. Language models are wrong with complete confidence, and one bad reply to an angry customer costs more than a month of saved sorting time. You can loosen it later for narrow cases, such as the plain "we've received your order" acknowledgment. Do that only after the log has shown for weeks that nobody edits those drafts anymore.
Give it a way to say "I don't know"
A model forced to put every mail somewhere will put the ones it doesn't understand in the wrong place. So give it an exit.
Add an "unclear" category. It may be the most important one you have. The model should pick it when a mail covers two topics, when an unknown sender asks for something unusual, or when there simply isn't enough text to go on. Those mails go straight to a person with no draft attached. Also have the model report how confident it is, and send everything below a threshold you choose down the same path.
Log every decision. One row per mail: time received, category, extracted fields, destination, draft, and what the person changed before sending. The changes are the column that teaches you the most. If people rewrite every draft in one category, the instructions for it are wrong. If one category keeps getting corrected, its boundaries were drawn badly.
Read the log once a week. Half an hour is enough. Misfiled mails go into the test set as new examples, and the instructions get sharper. After a few weeks the numbers show you which categories run cleanly.
Talk to the works council early. In Germany, if your company has a Betriebsrat, an elected works council with legal co-determination rights, this concerns them. Under Section 87, paragraph 1, number 6 of the Works Constitution Act, it has a say in introducing technical systems designed to monitor employee behavior or performance. A log that shows who approved which draft, when, and how much they changed comes close to that. Bring them in before you switch anything on and agree in writing what the log will and won't be used for.
Data protection basics in Germany
Every mail in that inbox contains personal data. Names, addresses, phone numbers, sometimes much more. Once you send those mails to a model run by an outside provider, that provider processes the data on your behalf, and the GDPR has rules for that. I'm not a lawyer, so treat this as a checklist for the conversation with your data protection officer, not a replacement for it.
A data processing agreement. Article 28, paragraph 3 GDPR requires processing by a processor to be governed by a contract. In German this is the Auftragsverarbeitungsvertrag, usually shortened to AVV, and in English it's called a DPA. Anthropic states that its DPA, including the EU Standard Contractual Clauses, is automatically part of its commercial terms. That covers API and business accounts. It does not cover an employee pasting customer mails into a personal chat subscription.
No training on your data. Anthropic states that by default it does not use inputs or outputs from its commercial products, including the API, to train its models. Check the equivalent statement for whichever provider you use and record where you found it.
Keep processing in the EU where you can. OpenAI offers API customers European data residency, chosen per project when the project is created. Claude models are also available through Amazon Bedrock with an EU inference profile that routes requests only to AWS regions in Europe. Where data does go to the US, the European Commission's adequacy decision on the EU-US Data Privacy Framework of 10 July 2023 covers transfers to companies certified under it.
Update your paperwork. Article 13 GDPR requires you to tell people, where applicable, who receives their data, so the model provider belongs in your privacy notice. The processing itself goes into your record of processing activities under Article 30.
Send only what's needed. The model needs the text of the mail to sort it. It doesn't need job applications, sick notes or anything with health data attached. Filter those out before they reach the model, by sender address or subject line, and let them take the old route.
The shared inbox works as a first build because nobody loses their job to it and no decision leaves human hands. The person who works through service@ every morning stops sorting and keeps the judgment. As long as a person presses send and every step lands in the log, you know what the system is doing at any moment. If you can't say that about an AI system in your company, it shouldn't be running.