process-emails

Parse .eml, .msg, and .mbox files into structured records with threading and deduplication.

6|Updated Feb 10, 2026
One-click install
npx skills add https://github.com/jdrodriguez/legal-toolkit --skill process-emails-jdrodriguez
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: process-emails
Source: https://github.com/jdrodriguez/legal-toolkit/tree/main/legal-toolkit/skills/process-emails
Command: npx skills add https://github.com/jdrodriguez/legal-toolkit --skill process-emails-jdrodriguez

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires extract-msg, pandas, networkx, plotly, XlsxWriter, python-dateutil, docx, libpff-python, and includes scripts (resource) components.

What problem does it solve?

This Skill automates the tedious, error-prone work of preparing email archives for legal review by parsing mixed-format email files, reconstructing conversation threads, detecting duplicates, flagging potentially privileged communications, and producing review-ready spreadsheets and visualizations.

Core Features & Use Cases

  • Multi-format parsing: Ingests .eml, .msg, and .mbox files or directories containing mixed email files and extracts standardized metadata and bodies.
  • Threading, deduplication & privilege detection: Reconstructs threads using Message-ID/References, identifies duplicate messages via content hashes, and flags emails based on keywords, attorney names, or privileged domains.
  • Visualizations & outputs: Generates spreadsheets, JSON threads, interactive communication network and timeline HTML visualizations, extracted attachments, and an optional .docx report for production-ready summaries.
  • Use Case: Prepare a custodian's mailbox export for e-discovery by extracting metadata, reconstructing threads, flagging likely privileged items for counsel review, and producing an interactive network map of communications.

Quick Start

Process the directory '/path/to/emails' to extract metadata, reconstruct threads, detect duplicates, flag privilege, and generate visualizations and spreadsheets.

Frequently Asked Questions about process-emails

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I parse mixed email formats like .eml, .msg, and .mbox files for e-discovery?

You can parse mixed email formats for e-discovery by ingesting .eml, .msg, and .mbox files or directories to extract standardized metadata and bodies into structured records. This process reconstructs conversation threads and identifies duplicate messages via content hashes.

What is the best way to reconstruct email threads and detect privileged communications?

The best way to reconstruct email threads and detect privileged communications is by using Message-ID and References headers for threading, while flagging emails based on keywords, attorney names, or privileged domains for legal review.

Can I generate communication network visualizations from an email archive?

Yes, you can generate interactive communication network and timeline HTML visualizations from an email archive. This process utilizes Python libraries like networkx and plotly to map relationships from the parsed email corpora.

Does this email processing workflow support extracting attachments and generating spreadsheets?

Yes, the email processing workflow supports extracting attachments and generating review-ready spreadsheets. It outputs structured data using XlsxWriter and pandas, alongside JSON threads and an optional .docx report for production-ready summaries.

Do I need Python libraries like pandas and networkx to prepare a custodian's mailbox export for legal review?

Yes, you need Python libraries like pandas, networkx, and extract-msg to prepare a custodian's mailbox export for legal review. These dependencies enable threading, deduplication, privilege detection, and communication network visualizations.