Templates · Published 2026-09-28 · AgentiSend team
Agent daily report
Give the people responsible for an agent one email a day with what it sent and what was stopped.
Give the people responsible for an agent one email a day with what it sent and what was stopped.
Variables
Every placeholder is required. A send that omits one is refused with that name, rather than going out with a blank.
agent_name(string, required). The name you gave the agent or its API key.report_date(string, required). The day the report covers, formatted for the reader.emails_sent(number, required). Sends accepted that day.emails_delivered(number, required). Messages the receiving server accepted.emails_bounced(number, required). Messages that bounced.emails_held(number, required). Sends held for a person to approve.emails_refused(number, required). Sends refused, for example by the budget.report_url(string, required). An https link to the full list for the day.
Rendered with the example values
These values are samples. They are not an account on AgentiSend.
Subject: Support agent: daily report for 28 September 2026
<p>What Support agent did on 28 September 2026:</p>
<p>Emails sent: 214<br>
Delivered: 209<br>
Bounced: 3<br>
Held for approval: 2<br>
Refused: 1</p>
<p><a href="https://app.example.com/agents/support/2026-09-28">See every message</a></p>What Support agent did on 28 September 2026:
Emails sent: 214
Delivered: 209
Bounced: 3
Held for approval: 2
Refused: 1
See every message (https://app.example.com/agents/support/2026-09-28)Create the draft
POST /templates and the create_template tool take this body. The draft does not send until it is published.
{
"name": "Agent daily report",
"subject": "{{agent_name}}: daily report for {{report_date}}",
"content": {
"mode": "markdown",
"source": "What {{agent_name}} did on {{report_date}}:\n\nEmails sent: {{emails_sent}}\nDelivered: {{emails_delivered}}\nBounced: {{emails_bounced}}\nHeld for approval: {{emails_held}}\nRefused: {{emails_refused}}\n\n[See every message]({{report_url}})"
},
"variables": [
{
"name": "agent_name",
"type": "string",
"required": true
},
{
"name": "report_date",
"type": "string",
"required": true
},
{
"name": "emails_sent",
"type": "number",
"required": true
},
{
"name": "emails_delivered",
"type": "number",
"required": true
},
{
"name": "emails_bounced",
"type": "number",
"required": true
},
{
"name": "emails_held",
"type": "number",
"required": true
},
{
"name": "emails_refused",
"type": "number",
"required": true
},
{
"name": "report_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 Scheduled send confirmation.