Prepare sending a document by e-mail
prepare_email_invoiceChecks that an issued invoice or proforma can be sent by e-mail to the given addresses and returns a summary of the e-mail for the user's confirmation: the recipients (each marked when it is not the contact e-mail of the customer on the document), the sender name, the reply-to address, the subject, the link or the attached PDF and the earlier e-mails of the document, with a one-time confirmation token valid for 10 minutes. Nothing is sent.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"company_id": "<company_id>",
"invoice_id": "<invoice_id>",
"emails": "<emails>",
"mode": "<mode>"
},
"name": "prepare_email_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | LINK: the e-mail has a link to a page with the PDF of the document (openings are tracked); ATTACHMENT: the PDF is attached to the e-mail (openings are not tracked). | |
| emails | Yes | The recipients: 1 to 5 different e-mail addresses; each gets its own e-mail. A document can be sent to at most 5 different addresses in total, and to one address at most 2 times. | |
| company_id | Yes | The id of the company, from list_companies. | |
| invoice_id | Yes | The id of the issued invoice or proforma, from list_invoices. |