1.7 KiB
1.7 KiB
| name | description |
|---|---|
| log-work-expense | Log work expenses into MongoDB. Use when the user sends receipt images or odometer photos along with context, or says things like "log this expense", "record this receipt", "mileage for XYZ", "meals for XYZ", or provides any expense details for work reimbursement tracking. Triggers on any message that includes expense context (account, type, images of receipts or odometers). |
Log Work Expense
Log work expenses into wip.work_expenses via scripts/log_expense.py.
Trigger Phrases
- "log this expense", "record this receipt", "add this to my work expenses"
- "mileage for XYZ", "meals for XYZ"
Steps
-
Classify images — Use the vision workaround from TOOLS.md to classify each image as
"receipt"or"odometer". Do not extract amounts or other details from images. -
Determine type and account — The user provides the expense type and account (e.g. "meals and mileage for LTISD"). Ask if unclear.
-
Upload images to S2 — Upload all images to S2 and collect the URLs.
-
Insert via script — Run the script once per entry:
uv run --with pymongo ~/notes/skills/log-work-expense/scripts/log_expense.py <type> <account> <date> "<note>" <s2_url_1> [s2_url_2]
- Meal receipts: Run once per receipt (1 file each).
- Mileage: Run once with both odometer URLs (2 files).
The script enforces file counts and rejects invalid input.
- Confirm — Brief summary of what was logged.
Notes
- Use the vision workaround from TOOLS.md for image classification only.
- Use the S2 upload endpoint from TOOLS.md for file uploads.
- The script hardcodes MongoDB connection details — do not pass credentials.