The job
orders@ and invoices@ are where the work actually arrives. Someone opens each message, decides whether it’s an order, an inquiry, a chaser, or spam, saves the attachment, types the relevant bits into a system, and answers the sender. The important detail — “please hold this until the 15th” — is in the third paragraph of the email body, not in the attachment.
This recipe turns that mailbox into a queue of worked cases, with the email body treated as part of the document rather than as a wrapper around it.
What you’ll build
- Email arrives in a monitored folder; a case is created with the body and every attachment.
- The agent classifies it, extracts what the process needs, captures any special requests from the body, and either routes it onward or answers it.
- Replies are drafted, never sent unapproved.
Ingredients
Connect the mailbox
Outlook connects per project. Two ways:- Ask the agent — “Connect my Outlook account”. It returns an authentication link.
- Via Connect — open the project’s Connect panel and click Connect next to Outlook.
Via the API instead
If mail reaches you another way, post it as a case withfile_type: multipart — an RFC 822 message with its attachments as parts. The agent then sees the body and the attachments as one document. See the async run pattern for the request shape.
The starter SOP
Walkthrough
1
Connect the mailbox and route mail into it
Connect Outlook, then add the Outlook rule so the shared mailbox feeds the cloudsquid folder. Send yourself two or three test messages first.
2
Create the reconcile table
Inbox Intake, with Output Fields: message_type, customer_number, sender_status, referenced_order_number, extra_requests, attachments_summary, routing_target, reply_draft, flags. Grant Data Access to customer_master.3
Add the SOP and run a real day
Paste the starter SOP into
SOP.md. Then run one real day’s mail — a day you can still remember, so you can check the classifications against what actually happened.4
Review classification before anything else
Routing accuracy is the whole game here. Check
message_type on every case for the first few days; a misrouted order is invisible until someone chases it.What good looks like
A clean routed order:Sender kestrel-einkauf@example.com matched customer 30412 exactly. AttachmentA case the agent correctly refuses to resolve:PO-88213.pdfis a purchase order for 6 positions. Classifiedorder. Body contains one extra request: “please deliver to the Dortmund site, not the head office” — captured inextra_requests, not applied. Routed to Order Match with both files attached. No reply owed.
Message reads in full: “As discussed — the usual, but double the blue ones. Same address.” No attachment. Sender ops@example.net does not match anyAn agent that guessed “the usual” would be inventing an order. This one did every check available, found the ambiguity, and put a ten-second decision in front of a person.contact_email; the domain matches two customers (40118, 40233). There is no order number, no article reference, and no prior order I can read from this project. Classifiedunclear,sender_status: domain_only, flaggedNeeds reviewwith both candidate customers.
Iterating
Intake SOPs improve fastest, because misclassifications are obvious in review. Comment with the rule:
Remittance advices from our factoring provider keep landing as admin and getting filed — they need to route to AP. Add a rule: remittance advice from a known factoring sender routes to AP, not filing.
Then run the improvement loop after your first few hundred messages — classification rules are exactly the kind of thing that gets better from accumulated feedback.
Hardening
Feed the order process
Intake classifies and routes; PO matching does the order work. Two tables, one pipeline.
Reply approval gate
Drafted replies wait for approval. Once tone and accuracy are proven, narrow the gate to reply types that carry commitments.
Other intake channels
Zendesk tickets, webhooks, SharePoint drops — same table, different trigger.
API intake
Post messages as
file_type: multipart when mail reaches you another way.All addresses, customer numbers, and message contents in this cookbook are invented. Replace them with your own.
