feat: Rewrite sales lead monitor in Python with dual API support

- Created monitor.py to replace bash script
- Checks ROI Calculator API (interest form endpoint not found)
- Properly parses JSON responses and tracks processed leads
- Sends Telegram notifications for NEW leads only
- Fixed timeout issues from bash script
- State file now tracks both ROI and interest form leads
- 3 test leads (IDs 5, 6, 7) detected and notifications sent
This commit is contained in:
2026-04-08 08:32:48 -04:00
parent 872c82f7ab
commit a009cf7d70
5 changed files with 1636 additions and 5 deletions

View File

@@ -1,7 +1,25 @@
{
"processed_leads": [],
"processed_calc_ids": [1, 2, 3, 4],
"last_check": "2026-04-01T20:02:25Z",
"processed_calc_ids": [
1,
2,
3,
4,
7,
6,
5
],
"last_check": "2026-04-08T08:30:54.751282",
"status": "active",
"notes": "Hourly monitoring enabled. Next check in 60 minutes."
}
"notes": "Hourly monitoring enabled. Next check in 60 minutes.",
"processed_roi": [
1,
2,
3,
4,
7,
6,
5
],
"processed_interest": []
}