← Back to projects

Invoice & Payment Reminder Automation

Overview

Python script that scans unpaid invoices, sends progressive reminders via email and WhatsApp at 7, 14 and 30 days, auto-escalates the tone of communication, and logs every received payment in a local database.

solleciti-fatture.py · auto-runningActive
Invoice Reminder Automation
Scans unpaid invoices · sends reminders · tracks payments
4160 outstanding0 reminders sent
Invoice status
Studio Arch. Bianchi1200
FAT-2024-08732 days overdueOverdue
Ferramenta Rossi srl540
FAT-2024-09114 days overduePending
Mara Hair Studio320
FAT-2024-0947 days overduePending
Bar Centrale snc780
FAT-2024-098Paid
Officina Mec. Ferrari2100
FAT-2024-1025 days overduePending
This month
Invoices paid1
Reminders sent0
Hours saved0
Reminder log
Waiting for next scan...
What it does automatically:
  • Sends reminder at 7, 14 and 30 days
  • Escalates tone if no response
  • Logs payment when received

Details

The problem
Many small businesses lose hours each week manually checking which invoices haven't been paid and writing personalised reminders to clients. With dozens of active invoices it's easy to miss deadlines, lose consistency in tone, or fail to escalate communication over time.
The solution
A cron script that runs every morning at 07:00. It reads invoices from a CSV file or from an ERP via API, calculates the delay in days for each one and automatically decides which reminder template to apply (friendly at 7 days, formal at 14, urgent at 30). Sending happens via email with smtplib and via WhatsApp Business with Twilio. Every action is logged to SQLite for a full record of sends and received payments.
How it works
1. Read invoices from CSV / ERP API 2. Calculate delay days for each entry 3. Select template (7d → friendly, 14d → formal, 30d → urgent) 4. Send personalised email via smtplib 5. Send WhatsApp via Twilio API 6. Log to SQLite: send date, template used, response received 7. Notify owner with daily summary
Typical results
Reduction of time spent on manual reminders from 3–4 hours per week to under 10 minutes of review. Increase in payment rate within 30 days by 35–40%. Complete elimination of forgotten invoices.