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
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.3.0.tar.gz
(3.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mail2task-0.3.0.tar.gz.
File metadata
- Download URL: mail2task-0.3.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63de578fbda3b2d7ba63f5d94fc3f9eb092b2f754579775bc2b51dc04cea1ab4
|
|
| MD5 |
a05317e5216899b09c3a4974ac9cf93f
|
|
| BLAKE2b-256 |
5a0404049f838560d34f8ea500432a77c57a55d00bf4acb0a4acff1b7332cf20
|
File details
Details for the file mail2task-0.3.0-py3-none-any.whl.
File metadata
- Download URL: mail2task-0.3.0-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7f8c8a350fcb3d54d4f4c27f1528762e79927e2bf147a8e738a05232068ff0f
|
|
| MD5 |
5b5dab05185e2e9891bbfc88bd95bc72
|
|
| BLAKE2b-256 |
2a1c3cb48290c58db1034b154447315fb761f0fb7f14c888ff744bae567968ac
|