Automated hourly fax sender for insurance claims with printable HR reports
Find a file
Sochen 32d7013cc6 Fix broken cron setup, move expiry logic into autofax.py
The embedded multi-line Python in crontab caused "bad minute" errors.
Now install.sh writes a simple .expires timestamp file and autofax.py
checks it on each run, removing its own cron entry when expired.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 21:42:48 +00:00
claims Initial commit: automated hourly fax sender for insurance claims 2026-03-06 11:36:47 +00:00
.env.example Initial commit: automated hourly fax sender for insurance claims 2026-03-06 11:36:47 +00:00
.gitignore Add Telnyx setup wizard, remove PROJECT.md from repo 2026-03-06 21:35:18 +00:00
autofax.py Fix broken cron setup, move expiry logic into autofax.py 2026-03-06 21:42:48 +00:00
build.sh Initial commit: automated hourly fax sender for insurance claims 2026-03-06 11:36:47 +00:00
build_windows.bat Initial commit: automated hourly fax sender for insurance claims 2026-03-06 11:36:47 +00:00
config.py Initial commit: automated hourly fax sender for insurance claims 2026-03-06 11:36:47 +00:00
gui.py Initial commit: automated hourly fax sender for insurance claims 2026-03-06 11:36:47 +00:00
install.sh Fix broken cron setup, move expiry logic into autofax.py 2026-03-06 21:42:48 +00:00
README.md Add Telnyx setup wizard, remove PROJECT.md from repo 2026-03-06 21:35:18 +00:00
requirements.txt Initial commit: automated hourly fax sender for insurance claims 2026-03-06 11:36:47 +00:00
setup_telnyx.py Add Telnyx setup wizard, remove PROJECT.md from repo 2026-03-06 21:35:18 +00:00
uninstall.sh Initial commit: automated hourly fax sender for insurance claims 2026-03-06 11:36:47 +00:00

AutoFax

Automated hourly fax sender for insurance claim submissions. Sends your claim via Telnyx's fax API every hour and generates a printable HTML report documenting every attempt and its status -- useful for showing HR or the insurance company that their fax system is rejecting claims.

Quick Start (Windows GUI)

If someone gave you AutoFax.exe on a flash drive:

  1. Double-click AutoFax.exe
  2. Fill in the Telnyx credentials (API Key, Connection ID, From Number)
  3. Set the destination fax number
  4. Click Browse and select your claim PDF
  5. Click Start Hourly Faxing

Config is saved next to the exe, so it remembers your settings. Reports are generated in a reports/ folder next to the exe -- open fax_report.html in a browser and print it for HR.

Building the Windows Executable

On a Windows machine with Python 3.10+ installed:

build_windows.bat

This produces dist/AutoFax.exe -- a single self-contained file you can copy to a flash drive.

Telnyx Account Setup

The setup wizard handles everything -- creates a fax application, buys a number, and writes your config:

# Interactive
python3 setup_telnyx.py

# Or non-interactive
python3 setup_telnyx.py --api-key KEY_xxx --to +18019382102 --area-code 801

You just need a Telnyx API key:

  1. Sign up at portal.telnyx.com
  2. Add a payment method
  3. Go to API Keys and copy your key

The wizard creates both .env (for CLI) and autofax_config.json (for GUI).

Manual

  1. Sign up at portal.telnyx.com
  2. Add a payment method
  3. Go to Messaging > Fax and create a Fax Application (note the Connection ID)
  4. Go to Numbers and purchase a fax-enabled number (~$1/month)
  5. Assign the number to your Fax Application
  6. Go to API Keys and copy your API key
  7. Configure:
cp .env.example .env
# Edit .env with your Telnyx credentials and the destination fax number

Linux/Server Setup (CLI + cron)

3. Add Your Claim

Place your claim PDF in the claims/ directory:

cp /path/to/your/claim.pdf claims/

4. Install & Start

chmod +x install.sh
./install.sh

This will:

  • Create a Python virtual environment
  • Install dependencies
  • Set up an hourly cron job
  • Schedule auto-cleanup after 7 days

5. Manual Test

venv/bin/python autofax.py

Reports

After each fax attempt, a printable HTML report is generated at reports/fax_report.html. Open it in a browser and print to PDF for HR. It includes:

  • Timestamp of every attempt
  • Delivery status (DELIVERED, FAILED, QUEUED)
  • Confirmation IDs
  • Error details for failures

Notifications

Optional push notifications via ntfy. Configure in .env (CLI) or in the GUI settings.

Uninstall (CLI)

./uninstall.sh

Cost

Telnyx pricing: ~$0.007/page + ~$1/month for the phone number. One week of hourly faxes (168 faxes x 5 pages = 840 pages) costs roughly $8-15.