Add invoice-generator skill
This commit is contained in:
parent
4c71a7a3b1
commit
55cfcce496
1 changed files with 35 additions and 0 deletions
35
skills/invoice-generator/SKILL.md
Normal file
35
skills/invoice-generator/SKILL.md
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
name: invoice-generator
|
||||
description: Generate and send time tracking invoice Excel files from FreeScout data. Use when the user asks for an invoice, time report, or hours summary for a customer and time period.
|
||||
---
|
||||
|
||||
# Invoice Generator
|
||||
|
||||
Generate Excel invoices from FreeScout time tracking data and send them via WhatsApp.
|
||||
|
||||
## Workflow
|
||||
|
||||
1. Identify customer name and date range from the user's request
|
||||
2. Run: `bin/freescout excel --from YYYY-MM-DD --to YYYY-MM-DD --customer "NAME" --output /tmp/invoice-CUSTOMER-PERIOD.xlsx`
|
||||
3. Send the file to the user via the `message` tool
|
||||
4. Reply with NO_REPLY (the file message is the reply)
|
||||
|
||||
## Available customers
|
||||
|
||||
If unsure which customer, run `bin/freescout report --from 2024-01-01 --to 2099-12-31` to see all, or pass a wrong name — the script prints available customers.
|
||||
|
||||
## Other commands
|
||||
|
||||
```
|
||||
bin/freescout mailboxes # List mailboxes
|
||||
bin/freescout users # List users
|
||||
bin/freescout report --from --to # Terminal report (add --customer, --mailbox, --user)
|
||||
bin/freescout excel --from --to # Excel generation (add --customer, --mailbox, --user, --output)
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- `time_spent` in DB is seconds, displayed as decimal hours
|
||||
- Excel groups by conversation: subject, customer, website, total hours
|
||||
- Customer and Website come from FreeScout custom fields (dropdowns)
|
||||
- Only timelogs within the date range are counted, not conversation creation dates
|
||||
Loading…
Add table
Add a link
Reference in a new issue