Templates · Published 2026-09-28 · AgentiSend team
Invoice
Tell a customer an invoice is ready, how much is due and by when.
Tell a customer an invoice is ready, how much is due and by when.
Variables
Every placeholder is required. A send that omits one is refused with that name, rather than going out with a blank.
first_name(string, required). The billing contact’s first name.product_name(string, required). Your product, as the person knows it.invoice_number(string, required). Your invoice number.billing_period(string, required). The period the invoice covers, formatted for the reader.amount_due(string, required). The amount with its currency, formatted for the reader.due_date(string, required). The date payment is due, formatted for the reader.invoice_url(string, required). An https link to pay or download the invoice.
Rendered with the example values
These values are samples. They are not an account on AgentiSend.
Subject: Invoice INV-2026-0931 from Acme: $490.00 due 12 October 2026
<p>Hi Ada,</p>
<p>Invoice INV-2026-0931 is ready.</p>
<p>Billing period: 1–30 September 2026<br>
Amount due: $490.00<br>
Due date: 12 October 2026</p>
<p><a href="https://app.example.com/invoices/INV-2026-0931">Pay or download the invoice</a></p>
<p>If you have already paid it, there is nothing more to do.</p>Hi Ada,
Invoice INV-2026-0931 is ready.
Billing period: 1–30 September 2026
Amount due: $490.00
Due date: 12 October 2026
Pay or download the invoice (https://app.example.com/invoices/INV-2026-0931)
If you have already paid it, there is nothing more to do.Create the draft
POST /templates and the create_template tool take this body. The draft does not send until it is published.
{
"name": "Invoice",
"subject": "Invoice {{invoice_number}} from {{product_name}}: {{amount_due}} due {{due_date}}",
"content": {
"mode": "markdown",
"source": "Hi {{first_name}},\n\nInvoice {{invoice_number}} is ready.\n\nBilling period: {{billing_period}}\nAmount due: {{amount_due}}\nDue date: {{due_date}}\n\n[Pay or download the invoice]({{invoice_url}})\n\nIf you have already paid it, there is nothing more to do."
},
"variables": [
{
"name": "first_name",
"type": "string",
"required": true
},
{
"name": "product_name",
"type": "string",
"required": true
},
{
"name": "invoice_number",
"type": "string",
"required": true
},
{
"name": "billing_period",
"type": "string",
"required": true
},
{
"name": "amount_due",
"type": "string",
"required": true
},
{
"name": "due_date",
"type": "string",
"required": true
},
{
"name": "invoice_url",
"type": "string",
"required": true
}
]
}Publish it
Call publish_template with the id POST /templates returned. Publishing again makes the next version. A version that already went out does not change.
{
"name": "publish_template",
"arguments": {
"template_id": "<the id POST /templates returned>"
}
}Send it
Create the draft with the body above, publish it, then send with template_id and template_values. The rules are in Templates. The three calls, including a render that does not send, are in How do I send an email from a template. The next starter is Shipping update.