Python tool that fetches JSON invoices from Gmail, parses El Salvador DTE-like JSON, writes to Google Sheets, and generates balanced journal entries.
- Put
credentials.jsonin the project folder. - Create venv & install deps:
python -m venv .venv .venv\Scripts\activate pip install -r requirements.txt - Dry run using sample JSON:
python src\main.py --after 2025-07-01 --before 2025-08-01 --spreadsheet-name Accounting_Invoices_2025_07 --dry-run-dir samples - Real run (Gmail):
python src\main.py --after 2025-07-01 --before 2025-08-01 --spreadsheet-name Accounting_Invoices_2025_07
- Exact NIT (normalized: hyphens/spacing ignored)
- Exact legal name (
emisor_nombre, case-insensitive) - Substring token (
contains_nombreComercial) against legal/commercial names
Recommendation: Fill emisor_nit in the Mappings tab for every recurring vendor.