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
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.5.0.tar.gz
(4.1 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.5.0.tar.gz.
File metadata
- Download URL: mail2task-0.5.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efcace8025da690f2873d1f95c12bad199ccfc1da889c24f6e9d5e90ccba5cdc
|
|
| MD5 |
0d813ae2b81338e1978fb26b9c59959b
|
|
| BLAKE2b-256 |
6cc342d427d09c50a11fad0f9ade81704fb02e55acb666dc04f51ea8dab0422e
|
File details
Details for the file mail2task-0.5.0-py3-none-any.whl.
File metadata
- Download URL: mail2task-0.5.0-py3-none-any.whl
- Upload date:
- Size: 4.6 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 |
6148a7b4fbbb7ab9a92f3d5841b6321704438a51b7b744d2ca8c60ef23f884c7
|
|
| MD5 |
c78d8977ceedeb7ef58e0323070bfcc9
|
|
| BLAKE2b-256 |
6300998897a96b73af2bf37822a8616edb1e6dc3d40b08a184aa3291276dc832
|