Email tool
Configure send_email with an email template, its recipients, and a condition for sending it. The Assistant collects the required details from the caller and fills in the template during the call.
Overview
Each send_email tool defines one email template, such as a late-arrival notice or a document request. Set:
descriptionOverrideto specify when to send it.toto set the recipients.subjectandbodyto set the email content.parametersto define the details the Assistant must collect.
During the call, the Assistant collects those details, sends the email, and tells the caller whether it was sent.
For example, with this configuration:
Code
With name = "Jane Doe", delay = "15 minutes", and time = "09:30", the front desk receives this email from Reecall <noreply@reecall.co>: Jane Doe will be 15 minutes late for their appointment at 09:30.
Attach separate send_email tools for different email templates.
Naming and describing the tool
nameOverride and descriptionOverride are set when you attach the tool to an Assistant. They tell the Assistant what the email is and when to send it.
| Field | Type | Required | Description |
|---|---|---|---|
nameOverride | string | No | Name of the email, e.g. notify_late_arrival. Letters, digits, _ and -, up to 64 characters. |
descriptionOverride | string | No | When the Assistant should send this email. Supports {variable} placeholders. |
Give each send_email tool a unique nameOverride. The API rejects duplicate tool names on the same Assistant with 400 DUPLICATE_TOOL_NAME.
Add descriptionOverride to the Tool object alongside assistantId and configuration. State the condition for sending:
Code
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
to | string | Yes | Recipients of the email. |
subject | string | Yes | Subject of the email, with placeholders. |
body | string | Yes | Text of the email, with placeholders. |
parameters | object | Yes | JSON Schema of the details the Assistant must collect. |
maxEmailsPerCall | integer | No | Maximum emails sent by this tool instance. Default: 1. |
Only these configuration fields are accepted. The API rejects invalid configurations when you save the tool and lists the detected problems together:
Code
to
One or more email addresses separated by ;. Each one can be a {{variable}}, e.g. {{frontdesk_email}}, which can itself hold several addresses separated by ;. All recipients receive the same email.
subject and body
The subject and text of the email, in plain text. Use {x} or {{x}} placeholders for the parts that change. At send time, each placeholder is replaced with:
- the value collected by the Assistant for the parameter of the same name,
- otherwise, the variable or injected data of the same name.
Unknown and secret placeholders
Unknown placeholders and secret variables with isSecret: true become empty strings. Check placeholder spelling to avoid missing content. When the caller's number is hidden, {{caller_phone_number}} becomes **********.
parameters
A JSON Schema (draft 2020-12) of type object listing the details the Assistant must collect before sending. Use description on each property to say what to collect and in which format. parameters cannot declare a to property: the Assistant never chooses the recipients.
The collected values are checked against parameters before sending. If they do not match, nothing is sent and the Assistant asks the caller again. Use required, pattern, enum or maxLength to control exactly what can appear in the email.
maxEmailsPerCall
The value must be an integer of at least 1. The limit and duplicate detection apply to each tool instance, so separate email tools have separate counters. A repeated call with the same rendered subject and body is not sent again by that instance. A send with unknown status also reserves a slot to avoid duplicate emails.
Full example
This example attaches a late arrival email to an Assistant. The Assistant collects the details from the caller, and the front desk address comes from a variable.
Code
Code