AI Legal Document Intake Agent
An AI agent that receives documents via email, parses attachments, confirms receipt, tracks what has been submitted, and requests missing items — automating the most tedious part of legal case onboarding.
The problem
Legal document intake is a slow, manual process. When a law firm opens a new case, the client needs to submit a stack of documents — engagement letters, identification, financial records, contracts, insurance policies. These documents arrive via email in batches, often over days or weeks, with inconsistent naming, mixed formats, and missing items.
Paralegals and legal assistants spend hours tracking what has been received, what is missing, and chasing clients for outstanding documents. Each reminder email is manually composed. Each attachment is manually downloaded, renamed, and filed. When a client sends three PDFs with names like "scan001.pdf", someone has to open each one to figure out what it is.
This is exactly the kind of structured, repetitive work that an AI agent can handle — but the agent needs to receive email with attachments, parse document content, and reply in the same conversation thread. Most email APIs do not support this full workflow.
How an AI agent solves this
A legal intake agent monitors a dedicated mailbox for incoming document submissions. When a client sends an email with attachments, the agent downloads each file, classifies the document type using an LLM or document parser, updates the case checklist, confirms receipt, and tells the client exactly what is still missing. It follows up automatically when deadlines approach.
- Receives documents via email attachments — PDFs, images, Word files
- Classifies each document against the case requirements checklist
- Confirms receipt with a clear list of what was received and what is outstanding
- Sends reminders for missing documents as deadlines approach
- Maintains a single threaded conversation per case for clear audit trails
How it works with Robotomail
Robotomail gives your intake agent a dedicated mailbox with full attachment support. Clients email documents directly to the agent. Attachments are stored in Cloudflare R2 and delivered to your webhook with download URLs. The agent processes them and replies in the same thread.
Step 1: Register a webhook for incoming documents. Set up a webhook to receive all inbound messages. Each delivery is signed with HMAC-SHA256 via the X-Robotomail-Signature header.
curl -X POST https://api.robotomail.com/v1/webhooks \
-H "Authorization: Bearer rm_live_..." \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-firm.com/hooks/document-intake",
"events": ["message.received"]
}'Step 2: Receive documents and attachments. When a client emails documents, Robotomail stores the attachments in R2 and delivers the message with download URLs to your webhook. Your agent downloads each file via the attachments API and classifies the document type.
{
"event": "message.received",
"mailboxId": "mbx_legal_intake",
"message": {
"from": { "email": "[email protected]", "name": "Maria Santos" },
"subject": "Documents for Case #2026-0334",
"textBody": "Hi, please find the signed engagement letter and ID verification attached. I will send the financial statements tomorrow.",
"threadId": "thd_case_0334",
"attachments": [
{
"filename": "engagement-letter-signed.pdf",
"contentType": "application/pdf",
"size": 245000,
"url": "https://api.robotomail.com/v1/attachments/att_abc123"
},
{
"filename": "id-verification.jpg",
"contentType": "image/jpeg",
"size": 1200000,
"url": "https://api.robotomail.com/v1/attachments/att_def456"
}
]
}
}Step 3: Confirm receipt and list missing items. The agent replies in the same thread with a checklist showing what has been received and what is still outstanding. The client sees everything in one conversation.
curl -X POST https://api.robotomail.com/v1/mailboxes/{mailbox_id}/messages \
-H "Authorization: Bearer rm_live_..." \
-H "Content-Type: application/json" \
-d '{
"to": ["[email protected]"],
"subject": "Re: Documents for Case #2026-0334",
"bodyHtml": "<p>Hi Maria,</p><p>I have received and logged the following documents for Case #2026-0334:</p><ul><li>Engagement letter (signed) — confirmed</li><li>ID verification — confirmed</li></ul><p>Still outstanding:</p><ul><li>Financial statements (last 3 years)</li><li>Property deed</li><li>Insurance declarations page</li></ul><p>Please send the remaining items at your convenience. Let me know if you have any questions.</p>",
"inReplyTo": "<[email protected]>"
}'Step 4: Send deadline reminders. When documents remain outstanding as a deadline approaches, the agent sends a follow-up in the same thread — no manual tracking required.
curl -X POST https://api.robotomail.com/v1/mailboxes/{mailbox_id}/messages \
-H "Authorization: Bearer rm_live_..." \
-H "Content-Type: application/json" \
-d '{
"to": ["[email protected]"],
"subject": "Re: Documents for Case #2026-0334",
"bodyHtml": "<p>Hi Maria,</p><p>Just a friendly reminder — we are still waiting on 3 documents for Case #2026-0334:</p><ul><li>Financial statements (last 3 years)</li><li>Property deed</li><li>Insurance declarations page</li></ul><p>We need these by March 28 to stay on schedule. Can you send them this week?</p>",
"inReplyTo": "<[email protected]>"
}'Use a custom domain like [email protected] for a professional appearance. Robotomail auto-configures DKIM, SPF, and DMARC, and attachments are stored securely in R2 with access controlled through your API key.
Key benefits
- Instant acknowledgment: Clients get confirmation within seconds of submitting documents — no waiting to hear back
- Automated tracking: The agent maintains a live checklist of received and missing documents per case
- Secure attachment storage: Documents are stored in Cloudflare R2 and accessible only through authenticated API calls
- Clear audit trail: Every interaction is threaded and stored — useful for compliance and case management
- Faster case onboarding: Reduce intake time from weeks to days — read the API docs and launch post to get started
Create a free account and set up your first intake mailbox. The free tier includes 50 sends per day and full attachment support — no credit card required.
Ready to build this?
Free tier includes a platform mailbox, 50 sends per day, and webhook delivery. No credit card required.
Start building — free