Resend (email sending)
Runtype sends email through Resend. The Send Email Flow step and the Send Email built-in tool (builtin:send_email) both use it. You can send from a platform-managed address without a Resend account, or connect your own Resend account to send from your own domain.
Choose a sender
The from value decides which sender and which Resend account a message uses:
In these addresses, FLOW_ID is the ID of the Flow that sends the email, and AGENT_ID is the ID of the Agent that calls the tool. A Flow that you send inline in a dispatch request, without saving it, sends as virtual@runtype.email. The only exception is a request whose flow.id names a Flow in your account, which sends as that Flow’s ID.
The platform-managed sender needs no setup. Runtype tracks each platform-managed send as platform-key spend. For how platform-key spend is billed and limited, see Platform keys vs. BYOK.
A custom sender can’t use the runtype.email domain. Messages from a blank from always go through the Runtype platform account, even after you connect your own Resend key.
Connect your Resend account
Before you begin, make sure that you have the following:
- A Resend account with a domain that Resend has verified. Resend rejects messages from an unverified domain.
- A Resend API key.
- A Runtype plan that includes BYOK, which is the Team plan or higher.
To connect your Resend account, follow these steps:
- In Runtype, go to Settings > Integrations.
- Find the Email section.
- In Resend API Key, enter your key.
- Click Save Key.
After you save, the Email section confirms that your key is configured. To disconnect your account, click Remove Key. After you remove the key, only the platform-managed sender works.
Send from your domain in a Flow
To send from your own address in a Flow, follow these steps:
- Add a Send Email step.
- In from, enter an address on your verified domain. You can use variables, for example
{{sender}}. - In Send email to, subject, and HTML, enter the recipients, the subject, and the body.
The from field is read-only until you connect a Resend key. When it’s blank, the step shows the default sender {{_flow.id}}@runtype.email.
In a Flow definition, set from in the step’s config:
After a successful send, the step writes an object with id, from, to, subject, status, and timestamp to its output variable. The id is the Resend email ID.
By default, a failed Send Email step doesn’t stop the Flow. It writes { "status": "failed", "error": "..." }, or the step’s default value, to the output variable. To stop the Flow instead, change the step’s error handling. For details, see Flow step types overview.
Send from your domain in an Agent
To let an Agent send email, add Send Email (builtin:send_email) to the Agent’s tools. The model sets the from parameter. When the model leaves from blank, the tool uses the platform-managed sender. For the full parameter list, see Send Email.
To send from your own domain every time, tell the Agent which address to use in its instructions. For example: Send all email from support@example.com.
The tool sends real email. To pause the Agent until a person approves each send, add builtin:send_email to the Agent’s approval list. For the setting, see Require approval for tools that act for you.
Reply from an Email Surface through Resend
An Email Surface can send its replies through your Resend account instead of the Runtype platform account. This setting uses its own key, separate from the key in Settings > Integrations.
To set it up, follow these steps:
- Open the Email Surface’s settings, and then open the Inbound tab.
- In Email Provider, select Resend.
- In API Key, enter a Resend API key. To receive email through Resend, the key needs the Full access permission.
- In From Address, enter an address on your verified domain.
- Optional: In From Name, enter the sender name that recipients see, such as
Support Team.
To go back to the platform account, select Runtype Email in Email Provider.
Troubleshooting
The following table lists common errors. In the table, STATUS is the HTTP status code that Resend returns. A Flow step adds the prefix Failed to send email: when its error handling stops the Flow. The Agent tool adds the prefix send_email failed:.
Next steps
Continue with these pages:
- Built-in tools: see every parameter of the Send Email tool.
- Flow step types overview: learn how the Send Email step fits with other steps.
- Flow variables and templates: build recipients, subjects, and bodies from variables.
- Platform keys vs. BYOK: compare platform keys with your own provider keys.