Create Month Invoice Drafts
create_month_invoice_draftsWrites the month's invoices as DRAFTS, one per project (and per client for client-level expenses) the connected person may invoice, on the same plan a billing preview of that period and scope returns. Nothing is sent: each draft is marked as drafted by the assistant, and the person reviews and sends it in Hubity. Running it again for the same period and scope updates the drafts it wrote earlier rather than adding new ones; it never overwrites a person's work: a draft a person has edited, one with a sign-off under way, or one already sent is left alone and flagged. Only scopes named in expectPlan are written, and only while their current planHash still matches the one given: a scope whose figures changed since is skipped instead of written, and scopes not named are skipped too. Each scope reports created, updated, unchanged, skipped or nothing, with links to review the draft; the result leads with a plain-language summary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Last day of a custom period, YYYY-MM-DD. Needs from. | |
| from | No | First day of a custom period, YYYY-MM-DD. Needs to. | |
| limit | No | Scopes per page (default 10). | |
| month | No | The calendar month to bill, as YYYY-MM (e.g. "2026-10"). Takes a month, or from and to. With neither, the last full month in the person's time zone. | |
| cursor | No | nextCursor from the previous page of the same request. | |
| clientId | No | Only this client's projects (and its client-level expenses). | |
| projectId | No | Only this project. | |
| clientName | No | Only this client, by exact name (any case). When several clients share the name, the call is refused and returns the candidate clients with their clientIds. | |
| expectPlan | No | Map of scopeKey to the planHash a billing preview returned for that scope. A named scope whose current plan differs is skipped (plan_changed); a scope not named is skipped (not_confirmed). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reply | No | ||
| period | No | ||
| scopes | No | ||
| summary | No | ||
| replyText | No | ||
| nextCursor | No |