name: spark-invoice emoji: ๐ description: Send daily retail credit invoice PDFs from Spark to WhatsApp requires: bins: - bash
Spark Invoice Automation
Send retail credit invoices from the Spark petrol pump system to WhatsApp.
When to Use
Use this skill when the user asks to:
- Send invoices / invoice reports
- Send yesterday's credit sales
- Send pump invoices
- Check credit sales and send reports
How to Execute
IMPORTANT: Simply run this script. Do NOT try to make API calls yourself.
/Users/dejain/.openclaw/scripts/send-daily-invoices.sh
The script will:
- Fetch yesterday's retail credit sales from Spark API
- Generate PDF invoices using Chrome headless
- Send each invoice to WhatsApp (+919964445556)
- Output progress and confirmation
Example User Requests
- "Send yesterday's invoices"
- "Send pump invoices"
- "Send credit sales reports"
- "Send invoice reports to WhatsApp"
Expected Output
The script outputs:
๐
Processing invoices for: 2026-02-07
๐ Fetching stores with credit sales...
๐ฆ Found 5 stores with sales
Processing: Store Name (โน5619.49)
โ
Sent: Store Name
...
โ
All invoices processed for 2026-02-07
After Running
Tell the user:
- How many invoices were sent
- Which stores received invoices
- Confirm they should check WhatsApp
Notes
- Script is pre-configured with customer ID and WhatsApp number
- Runs automatically via cron at 8 AM daily
- Can be triggered manually anytime via this skill