Skip to main content

Extract actionable tasks from emails using Python

Project description

mail2task

Extract actionable tasks from messy emails using Python.

Features

  • Extract task-like sentences
  • Detect due dates
  • Detect priority levels
  • Clean JSON output
  • CLI support

Installation

pip install mail2task

Usage

Python

from mail2task import extract_tasks

email = """
Please submit the compliance report by Friday.

Schedule the onboarding meeting tomorrow.
"""

tasks = extract_tasks(email)

print(tasks)

CLI

Create a text file:

Please submit the report by Friday.
Schedule the client call tomorrow.

Run:

mail2task sample_email.txt

Output:

[
  {
    "title": "submit the report by Friday.",
    "due_date": "2026-05-29T00:00:00",
    "priority": "normal",
        "confidence": 0.9

  }
]

Pretty Output

mail2task sample_email.txt --pretty

Save Output

mail2task sample_email.txt --output tasks.json

Export Formats

JSON

mail2task sample_email.txt --format json

CSV

mail2task sample_email.txt --format csv

Markdown

mail2task sample_email.txt --format markdown

Example Use Cases

  • Email automation
  • Productivity apps
  • AI assistants
  • CRM workflows
  • Task management systems

NLP Features

  • Sentence splitting
  • Greeting/signature filtering
  • Due date extraction
  • Priority detection
  • Confidence scoring

NLP Engine

mail2task uses spaCy for:

  • sentence segmentation
  • tokenization
  • action verb detection
  • lightweight NLP parsing

Project Structure

mail2task/
├── src/
├── tests/
├── README.md
├── pyproject.toml

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mail2task-0.6.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mail2task-0.6.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file mail2task-0.6.0.tar.gz.

File metadata

  • Download URL: mail2task-0.6.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for mail2task-0.6.0.tar.gz
Algorithm Hash digest
SHA256 1a757920abc495ea1311f9a9f8ffcf40cbef4d74769892f8c55a16df7b405415
MD5 bde291f4985c59330998ad8faeac1b92
BLAKE2b-256 04fe5248d7cbf52023a7bb6c63007d6458245eb420156e01569d3be41eb2dce8

See more details on using hashes here.

File details

Details for the file mail2task-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: mail2task-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for mail2task-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e36afdd1bf8d593dc588dca5a807ed94138703641f4cdc29402f54559072ea12
MD5 e495c24716a2328aec46ba5a380c8332
BLAKE2b-256 3f0daa99de07a0ac4c422fc101788a690ab91ce73fc8520bb703fcbc4afb35f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page