resend.sendEmail sends custom content or a published template immediately or later.
Example
automations/send-resend-welcome.automation.ts
Inputs
to accepts one address or up to 50 addresses. Optional cc, bcc, and replyTo accept one or more addresses. Custom content requires from, subject, and at least one of text, markdown, or html. Automate.ax preserves supplied plain-text and HTML bodies. Markdown generates either missing alternative. Otherwise, HTML generates plain text, and plain text generates HTML. For a template, provide template: { id; variables? } without a custom body. The published template may supply sender and subject.
Optional fields include headers, scheduledAt, topicId, and tags. scheduledAt accepts natural language or an ISO 8601 value. Tag names and values allow letters, digits, _, and -. Resend limits them to 256 characters. Template variable names use the same basic character set without dashes. Values are strings up to 2,000 characters or numbers. Resend retains idempotencyKey for 24 hours and limits it to 256 characters.
Attachments are either { content, filename, contentType?, contentId? } with base64 content or { path, filename?, contentType?, contentId? } with a public URL. Resend enforces its provider size limits.
Output
Returns{ id: string }. Save the ID to retrieve delivery state, update a scheduled send, cancel it, or correlate webhook events.