send_email_to_caller
The send_email_to_caller tool sends an email to the person who called. The AI orchestrator composes the subject and body based on the task and call transcription. The recipient is always resolved from the system — never chosen by the AI.
When It’s Available
Section titled “When It’s Available”Available during todo execution when the TodoType has SendEmailToCaller in its tools list. Organizations configure this when creating todo types.
Tool Definition
Section titled “Tool Definition”Tool { name: "send_email_to_caller", description: "Sends an email to the caller. The recipient is automatically derived from the contact associated with the call.", input_schema: SendEmailToCallerInput { subject: String, // The email subject line body: String, // The email body (plain text) },}The AI orchestrator provides subject and body. The recipient email comes from the contact record linked to the call.
Execution Flow
Section titled “Execution Flow”AI calls send_email_to_caller({ subject: "...", body: "..." }) → Look up call → get contact_id → Query contact_email (ordered by is_preferred DESC) → get recipient → Send via bases::email::send_email → Return "Email sent successfully to the caller."Recipient Resolution
Section titled “Recipient Resolution”- Fetch the call’s
contact_id(error if no contact linked) - Query
contact_emailfiltered bycontact_id, ordered byis_preferred DESC - Take the first result as the recipient (error if no email on file)
Error Cases
Section titled “Error Cases”| Condition | Result |
|---|---|
No contact_id on the call | Error returned to AI agent |
| No email address for contact | Error returned to AI agent |
| Email send failure | Error propagated, todo marked as failed |
Related Pages
Section titled “Related Pages”- send_email — general-purpose email to any recipient
- Agent Tools Overview — voice and task tool systems
- Todos — todo extraction, approval, and execution pipeline