Tutorial 08: Legal Automation with ChatGPT (OpenAI)
Learn to automate contract review, document processing, and legal workflows using ChatGPT, Code Interpreter, and Custom GPTs without writing code.
What You'll Learn
This tutorial shows you how to use ChatGPT with Code Interpreter and Custom GPTs to automate legal tasks—batch NDA processing, contract comparison, due diligence extraction—without writing code. You upload files and delegate multi-step workflows.
Learning Objectives
By the end of this tutorial, you will:
- Understand ChatGPT's automation capabilities for legal workflows
- Set up Code Interpreter and Custom GPTs for contract review
- Build automated legal workflows without coding
- Create professional document outputs (Excel, CSV, formatted reports)
- Extract and process tabular data at scale
- Execute batch translation workflows
- Manage document organization and naming workflows
Part 1: Understanding ChatGPT Automation for Legal
What Is ChatGPT Automation?
ChatGPT with Code Interpreter and Custom GPTs supports multi-step legal workflows—no coding required. Instead of one prompt at a time, you can:
- Execute multi-step tasks across uploaded files (upload-based; no local file system access)
- Process batches of documents in a single conversation (subject to upload limits)
- Generate structured outputs (spreadsheets, reports)
- Connect to external tools via Custom Actions (Custom GPTs)
Why This Matters for Lawyers
| Traditional ChatGPT | ChatGPT + Code Interpreter + Custom GPTs |
|---|---|
| Chat-based, one file at a time | Batch processing, multi-file workflows |
| Manual file handling | Upload folder contents, process in sequence |
| One response at a time | Multi-step execution in one thread |
| Generic outputs | Structured Excel, CSV, formatted documents |
ChatGPT vs. Harvey/Legora Automation
Capabilities and plans change. Verify current offerings at OpenAI and vendor sites before relying on comparisons.
| Feature | ChatGPT + Custom GPTs | Harvey Workflows | Legora Workflows |
|---|---|---|---|
| Coding required | No | No | No |
| Customization | Configurable instructions | Template-based | Template-based |
| Document output | Excel, CSV, text reports | PDF reports | Various |
| File access | Upload-based only (no local file system) | Cloud only | Cloud only |
| Pricing model | Per-plan (verify current plans) | Enterprise contracts | Enterprise contracts |
| Privacy | Cloud (Business/Enterprise have controls) | Cloud | Cloud |
Part 2: Setting Up ChatGPT for Legal Automation
Requirements
- ChatGPT plan that includes Code Interpreter and Custom GPTs (e.g., Plus, Pro, Business, Enterprise—verify current plans at OpenAI as offerings may change)
- Files organized locally before upload—ChatGPT has no access to your local file system
- Active internet connection
User setup required: You must manually select and upload files. ChatGPT cannot browse, scan, or access folders on your computer.
Enabling Code Interpreter
- Start a new ChatGPT conversation
- Click the "+" or model selector
- Ensure Code Interpreter (or Data Analysis, depending on the current UI) is enabled
- Upload files when prompted or via the attachment icon (subject to file upload limits)
Feature Naming
OpenAI has used "Code Interpreter," "Advanced Data Analysis," and "Data Analysis" in different contexts. The UI may show a different label—look for the capability that runs Python code in a sandbox for data analysis.
Creating a Legal Automation Custom GPT
- Go to GPT Builder or Create > Configure
- Name it (e.g., "Legal NDA Triage")
- Add instructions that encode your playbook (see Tutorial 05)
- Enable Code Interpreter as a capability
- Optionally add file upload capability for document input
ChatGPT processes uploaded files in the cloud. Do not upload privileged or highly confidential documents without appropriate Team/Enterprise controls and data handling policies.
Part 3: Core Legal Automation Workflows
Workflow 1: Batch NDA Processing
Scenario: You receive 20 NDAs weekly. Automate triage and initial review.
ChatGPT Prompt (upload all NDAs):
What ChatGPT Does:
- Analyzes each uploaded NDA
- Categorizes based on your playbook
- Creates structured spreadsheet output (via Code Interpreter)
- Drafts email summary
User setup required: File organization (moving to subfolders) must be done manually—ChatGPT cannot access your local file system. Use the generated summary to guide manual filing.
Implementation Steps:
- Create a staging folder with all NDAs to process
- Upload the entire batch in one ChatGPT conversation
- Paste the prompt above; ensure Code Interpreter is enabled
- Download the generated Excel/CSV and email draft
- Manually move files to subfolders based on the triage results
Verification Checklist (after processing):
- All NDAs in batch were analyzed
- Triage results match playbook criteria
- Excel/CSV columns are complete (Filename, Counterparty, Type, Triage Result, Key Issues, Recommended Action)
- Email summary is actionable
Workflow 2: Contract Comparison Report
Scenario: Client wants to understand how vendor terms compare.
ChatGPT Prompt (upload 5 vendor agreements):
What ChatGPT Does:
- Extracts structured data from each agreement
- Builds comparison matrix via Code Interpreter
- Produces Excel and narrative report
- Downloads both files from the conversation
Extraction Fields (ensure prompt includes):
- Vendor name
- Annual cost
- Term length
- Liability cap
- Indemnification scope
- Data rights
- SLA commitments
- Notable unusual terms
Workflow 3: Due Diligence Document Processing
Scenario: M&A deal requires reviewing contracts from a data room.
ChatGPT Prompt (upload batch of contracts):
DD Tracker Columns (recommended):
- Contract type
- Counterparty
- Effective date
- Term/expiration
- Annual value (if stated)
- Auto-renewal terms
- Change of control provisions
- Assignment restrictions
- Termination rights
- Key risk flags
- Follow-up required (Y/N)
Workflow 4: Litigation Timeline Generation
Scenario: Prepare chronology from case documents for trial prep.
ChatGPT Prompt (upload discovery documents):
User setup required: ChatGPT cannot create native .pptx files directly. Use the outline to build slides manually or request a structured text version for copy-paste into PowerPoint.
Part 4: Tabular Extraction & Portfolio Analytics
Portfolio-Wide Spreadsheet Generation
ChatGPT Prompt (upload contracts in batches if needed):
Advanced Extension (if processing capacity allows):
Part 5: Microsoft Word Integration Workflows
ChatGPT with Code Interpreter can generate Word documents when Python libraries (e.g., python-docx) are available in its sandbox. Upload your source documents and request structured outputs.
User setup required: Verify Code Interpreter can access python-docx (or equivalent) before running large batches. Library availability may vary by model and product updates.
Track Changes & Redline Automation
Scenario: Redline a vendor's proposed contract with your standard terms.
ChatGPT Prompt (upload vendor draft and your standard template):
Verification Checklist:
- All changes visible in track changes
- Comments are clear for negotiation
- Cover memo accurately reflects changes
- Confidential info properly marked
Comment Generation for Collaborative Review
ChatGPT Prompt (upload contract):
Style Enforcement & Formatting
ChatGPT Prompt (upload contracts):
Risk Checks
- Spot-check generated documents for formatting and completeness
- Do not upload privileged materials without Team/Enterprise controls
Part 6: Document Organization & Naming
AI-Suggested Naming & Reorganization
ChatGPT Prompt (upload a list or sample of filenames):
Duplicate Detection & Resolution
ChatGPT Prompt (upload file list or sample filenames/paths):
User setup required: ChatGPT cannot scan your local file system. Export a CSV or list of filenames, paths, sizes, and dates from your system, then upload it—or use a small sample for pattern analysis.
Duplicate Analysis Output (request in prompt):
- Filename
- File path
- File size
- Date
- Match type (exact/near/version)
- Action recommended
- Risk if deleted
Archive Checklist Categories:
- Safe to archive immediately
- Review before archiving
- Do not archive (active matters)
Part 7: Batch Translation Workflow
Multi-Document Translation
ChatGPT Prompt (upload English contracts):
Always have qualified legal translators review AI-generated translations before execution or client delivery.
Advanced: Bilingual Glossary & Consistency
ChatGPT Prompt (upload multiple translated contracts):
Translation Quality Checklist:
- Legal terminology consistent across documents
- Defined terms use approved glossary
- Ambiguous phrases flagged for human review
- Formatting preserved (tables, headers, footers)
- Qualified legal translator reviews before execution
Part 8: Client Collaboration Portal Equivalent
Secure Document Sharing Workflows
ChatGPT Prompt (upload documents for client deliverable):
Status Update Generation
ChatGPT Prompt (upload matter activity summary or notes):
Client Deliverable Package Contents:
- Document index (name, purpose, action required, execution requirements)
- Client-facing cover memo (overview, required actions, timeline, return instructions)
- Execution checklist (which documents need signatures, who signs, witness/notary requirements)
- Tracking spreadsheet (document name, date sent, status, date received, signature status)
Status Report Sections:
- Executive summary (1 page)
- Detailed activity summary (what we did)
- Current status (where we stand)
- Next steps and pending client actions
- Timeline for next phase
- Budget status
- Action items with deadlines and impact if missed
Part 9: Professional Document Generation
Word Documents
ChatGPT with Code Interpreter can generate Word documents when Python libraries (e.g., python-docx) are available. Request structured outputs with:
- Proper formatting and styles
- Headings and tables
- Track changes (for redlines)
- Comments
Example: Contract Redline Request
Excel Spreadsheets
ChatGPT creates functional Excel files with:
- Working formulas
- Conditional formatting
- Multiple sheets
- Charts and graphs
- Data validation
Example: Contract Portfolio Analysis
PowerPoint Presentations
ChatGPT can generate presentation outlines or structured content. For native .pptx, use the outline to build slides manually.
Example: Board Legal Update
Part 10: Best Practices for ChatGPT Legal Automation
Do's
- Do start with small batches to test workflows
- Do review all outputs before sending/filing
- Do organize files before upload
- Do document your Custom GPT instructions for team replication
- Do use Team/Enterprise for confidential work (verify data handling)
Don'ts
- Don't upload privileged materials without proper controls
- Don't rely on ChatGPT for final legal conclusions
- Don't skip verification of extracted data
- Don't assume ChatGPT can access or modify your local files (upload-based only)
Quality Control Checklist
- Spot-check extracted data against source
- Verify spreadsheet formatting and formulas
- Review any legal conclusions
- Confirm file saved to correct location (manual step)
- Check privilege/confidentiality handling
Troubleshooting
| Issue | Possible Cause | Action |
|---|---|---|
| Code Interpreter not generating files | Capability not enabled | Enable Code Interpreter in model selector |
| Upload fails or times out | File size limit | Split into smaller batches; compress if needed |
| Extracted data inaccurate | Document quality or complexity | Spot-check; refine prompt with examples |
| Excel formulas broken | Code Interpreter output format | Request CSV as fallback; verify formulas manually |
| Session context lost | New conversation | Include full context and instructions in each run |
Part 11: Automated Monitoring & Alerts
Contract Expiration Monitoring
ChatGPT Prompt (upload contract list or portfolio summary):
Regulatory Update Monitoring
ChatGPT Prompt:
Part 12: Limitations and Workarounds
Current ChatGPT Limitations
| Limitation | Workaround |
|---|---|
| No direct file system access | Upload files; organize outputs manually |
| Upload size limits (see FAQ) | Split large batches; process in chunks |
| No folder scanning | Pre-select files for upload |
| Cloud processing | Use Team/Enterprise for confidential data |
| No memory across sessions | Include context in each new conversation |
| No native .pptx generation | Use outline to build slides manually; request structured text for copy-paste |
| Code Interpreter library availability | Verify python-docx (or equivalent) before large batches |
When to Use Traditional Approach Instead
- Highly confidential matters (privilege concerns)
- Regulated workflows requiring audit trails
- When human judgment is critical
- One-off tasks that don't justify setup
Part 13: Integration with Legal Plugin
If you use a Legal Custom GPT (see Tutorial 06), combine it with Code Interpreter:
Part 14: Parity Drill Pack (OpenAI)
Use this pack when you want OpenAI outputs to match the depth and auditability of your Claude workflow.
Drill A: Clause Delta Matrix
Prompt:
Output checklist:
- Every changed clause has a row
- High-risk deltas include fallback wording
- Business note is plain language and action-oriented
Drill B: Evidence-First Review Memo
Prompt:
Quality checks:
- Each conclusion is tied to quoted or cited source text
- Recommendations distinguish required vs optional edits
- Escalation triggers are explicit, not implied
Drill C: Batch QA Gate
Run this after processing 10+ files:
| QA Gate | Pass Criteria |
|---|---|
| Coverage | 100% files processed and logged |
| Consistency | Same risk taxonomy used across files |
| Auditability | Output includes citations back to source text |
| Escalation | High-risk files routed to human legal review |
Troubleshooting Add-on
- If outputs are too short, require "minimum sections + required tables."
- If tables are inconsistent, provide one canonical column schema in the prompt.
- If risk labels drift, pin taxonomy (
high,medium,low) in instructions. - If citations are missing, explicitly require clause quote + location in every finding.
Do This Now
- Enable Code Interpreter and create a Legal NDA Triage Custom GPT
- Process a batch of 5–10 documents (e.g., NDAs or contracts)
- Generate one professional spreadsheet (Excel or CSV)
- Extract tabular data from documents into a structured format
- Create a track-changes document or comment summary for one contract
- Run the troubleshooting checklist if any step fails
Quick Reference: ChatGPT Automation Patterns
Batch Processing
Report Generation
Tabular Extraction
Translation Workflow
Navigation
Related family pages
- Claude Cowork - Same concepts with Claude Cowork
- Core Concepts - Platform-neutral legal workflow model