From 15+ Hours of Manual Inbox Triage to Zero Case Notes Written by Hand
A US legal tech platform serving personal injury and litigation practices eliminated manual email review and document summarization by building a fully automated Salesforce pipeline powered by OpenAI GPT and AWS Textract — every matter-linked email summarized in under 60 seconds, with complete PDF and DOCX attachment coverage across all cases.
Six Document Workflow Problems That Consumed the Legal Team Every Week — and Six Fixes That Automated the Entire Process
Five Phases That Took the Email Workflow From Manual Inbox Triage to Full Automation
Mapped Every Workflow Gap Before Writing a Single Line of Code
We audited the full email-to-case-note lifecycle across the legal team — identifying where time was lost, where compliance gaps existed, and which file types required separate handling. We designed the Apex architecture, custom object schema, and GPT prompt structure before any development began.
Built the Salesforce EmailMessage Trigger and GPT Summarization Pipeline
We implemented the Salesforce Flow trigger on the EmailMessage object, the Apex callout to OpenAI GPT with a structured legal prompt, and automatic Case Note creation linked to the Matter. We built the feature-activation toggle in Custom Settings so admins can pause AI processing without a deployment.
Wired DOCX and PDF Through Separate Extraction Paths
We built type-detection logic that routes DOCX files through synchronous text extraction and PDF files through AWS Textract via async jobs — storing Textract Job IDs in a custom Salesforce object to retrieve results with a scheduled Apex job, fully within governor limits.
Made Every Failure Visible and Every Audit Instant
We built the Error Log object to capture AWS upload failures, GPT API errors, and Textract exceptions — each with error type, source, and timestamp, filterable in standard Salesforce views. We also embedded timestamped compliance checkpoints into every processed email and attachment record.
Delivered Full Admin Control With Zero Code Required to Operate
We handed over a system that legal admins can control entirely through Salesforce — enabling or pausing AI processing via a single Custom Metadata flag, monitoring errors through standard filtered views, and reviewing full summarization history on every Matter record without touching configuration or code.
Before this, every email was a task. Now the entire workflow runs itself. Our paralegals spend their time on actual legal work, not inbox triage.
— Twopir Project Lead · US Legal Tech Platform · 2024What Changed — In Numbers and in Practice
Manual case note creation eliminated — every week, permanently
The 15+ hours per week legal staff spent writing case notes by hand now runs automatically for every matter-linked email received in Salesforce.
End-to-end summarization — from inbound email to structured Case Note
The entire pipeline — email validation, GPT summarization, Case Note creation linked to the Matter — completes in under 60 seconds with no human in the loop.
Attachment coverage — every PDF and DOCX extracted and stored automatically
Both document types are handled through dedicated processing paths: DOCX synchronously, PDF via async AWS Textract with job tracking in Salesforce — no file is skipped.
Faster matter documentation from first contact to complete case record
What previously required a paralegal to read, summarize, and file manually now completes in a single automated pass, keeping Matter records current without manual intervention.
Audit readiness — compliance trail built into every processed email
Every summarized email and attachment carries a timestamped record in Salesforce, eliminating the multi-day manual reconstruction that compliance audits previously required.
Admins pause or enable AI processing with a single toggle — no deployment needed
The feature-activation flag in Custom Metadata means the legal team's Salesforce admin can manage the entire AI pipeline without touching code or raising a change request.
Running a similar legal or professional services operation with manual email workflows?
We'll audit your current email and document workflow and map out your automation in a free 5-business-day review — no commitment, no sales pitch.
The Tools and Techniques Behind This Engagement
Running a similar legal or professional services operation?
We'll audit your current email and document workflow, identify exactly where automation can eliminate manual effort, and show you what a Salesforce + GPT pipeline would look like for your caseload — findings delivered in 5 business days, no commitment required. We cover US EST, UK GMT, and AEST time zones.
Ready to Replace Manual Effort With AI-Powered Automation?
Twopir has delivered Salesforce automation for 500+ clients across the US, UK, Australia, UAE, and Canada over 12+ years. We build pipelines that run without human intervention — and stand behind them.
12+ Years · 500+ Clients · Salesforce Gold Partner · US · UK · Australia · UAE · Canada
