6. Email
All email functions return void and resolve once the message has been queued for delivery.
For most use cases, prefer the Async variants. The default sender address is noreply@autorun.ai unless overridden with the optional from parameter.
SendEmailAsync(to, subject, body [, from])
async· returnsvoid
Sends a plain-text or HTML email. The preferred email function for most use cases.
Prop
Type
await context.functions.SendEmailAsync(
"client@example.com",
"Your invoice is ready",
"<p>Please find your invoice attached.</p>",
"billing@mycompany.com"
);
SendEmailGroup(field, operator, value, subject, body [, from])
async· returnsvoid
Sends the same email to a group of recipients selected by a filter on the user/contact list. One email is sent per matched user.
Prop
Type
await context.functions.SendEmailGroup(
"RoleId", "Equal", "3",
"New contract pending approval",
"A new contract has been submitted and requires your review."
);
sendEmailWithAttachments(recipient, subject, body, attachmentIDs [, from])
async· returnsvoid
Sends an email with one or more file attachments sourced from the media library.
Prop
Type
await context.functions.sendEmailWithAttachments(
"luka.mrkonjic@rearm.co",
"Weekly Report",
"Please find this week's report attached.",
["2299"],
"loon@loonbio.com"
);
SendTemplatedEmail(recipient, subject, values, templateId [, from])
async· returnsvoid
Sends an email rendered from a stored template. Values are injected into the template's placeholders before sending.
Prop
Type
await context.functions.SendTemplatedEmail(
"client@example.com",
"Invoice #" + context.record.InvoiceNumber,
{
ClientName: context.record.ClientName,
Amount: context.record.Amount,
DueDate: context.record.DueDate
},
"invoice-email-template"
);
SendTemplateEmailGroup(field, operator, value, subject, values, templateId [, from])
async· returnsvoid
Sends a templated email to a dynamic group of recipients selected by a filter condition. One rendered email is sent per matched recipient.
Prop
Type
await context.functions.SendTemplateEmailGroup(
"Department", "Equal", "HR",
"New employee onboarding",
{ NewEmployee: "Jane Smith", StartDate: "2026-04-01" },
"onboarding-email-template"
);