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"
  }
]

Pretty Output

mail2task sample_email.txt --pretty

Save Output

mail2task sample_email.txt --output tasks.json

Example Use Cases

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

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.2.0.tar.gz (3.4 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.2.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mail2task-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8fa93f392a76eb2447998e4f3a4b9b308560b28c0b8553f1bb39361b1ad93a67
MD5 ef7fdff7c7cad1e9411e4abaa397f66b
BLAKE2b-256 8d19f893d84475a52a81b068e0cb6cb9eda20d44de0cdc6c2a4bca345679d6f3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mail2task-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b263f527c742861005cb79ce87d10593e460a6679948a25b296ae410323c39b5
MD5 6c36cde32d69bbbbbb33867a31ff7ee8
BLAKE2b-256 7bcad8abb3b40743594d25f318aa6d9107e9bea9c72658ff552ad1c5a3f7d917

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