Desktop tool for downloading, converting, and archiving invoices and receipts from email accounts.
Deutsche Dokumentation: README-DE.md
- Universal IMAP for Gmail, Outlook, GMX, Web.de, T-Online, and other providers
- Optional Gmail API integration for faster and more robust Gmail runs
- Profile-based filters for sender, subject, body, and date ranges
- Downloads PDF attachments and converts other attachment types to PDF
- Supported conversions: images (
.png,.jpg,.jpeg,.bmp,.tif,.tiff,.webp),.docx,.xlsx - Optional legacy conversion for
.docand.xlsvia Word/Excel-COM or LibreOffice - Optional OCR for image-based PDFs (Tesseract +
pypdfium2) - Hash-based duplicate detection across local archive folders
- Secure credential storage via
keyring
- Run
start.bat - Add a mail account
- Configure a profile or shop template
- Set date range and target folder
- Click "Fetch Invoices"
pip install -r requirements.txt
python UniversalInvoiceMail.py- Add an IMAP or Gmail API account
- Configure a search profile with filters and target folder
- Optionally enable OCR and PDF mode
- Start a scan
- Review results in the local invoice archive
Runtime data is stored in %USERPROFILE%\.universal_invoice_mail\:
%USERPROFILE%\.universal_invoice_mail\
├── config.json
├── invoices.json
├── credentials.json
└── token.json
Archived files are written to %USERPROFILE%\Documents\Rechnungen\ by default.
- Gmail API:
google-api-python-client,google-auth,google-auth-oauthlib - OCR:
pytesseract,pypdfium2,pypdf, Tesseract OCR - Legacy Office:
pywin32or a local LibreOffice withsoffice.exe
When no OCR or Office backend is available, unsupported steps are logged and skipped; the run remains robust.
pytest tests -vUnit tests for helper functions and integration tests for IMAP and Gmail workflows with mocks.
- Credentials are not stored in the project folder
- Local sample outputs and portable bundles are excluded via
.gitignore - Release artifacts remain in
releases/locally
Part of the doc-bricks mail suite:
| Tool | Description |
|---|---|
| MailProcessor | System tray launcher for all Universal Mail Tools |
| UniversalMailCleaner | Rule-based IMAP mailbox cleaner with safe mode |
| UniversalDocsGrabber | Download documents and attachments from IMAP mail |
