How Marketing Email works
The Marketing Email tool sends a marketing email to a user using content and sender defaults configured in the builder. The agent decides when to use the tool and who to send to, making it ideal for campaign-style messaging where copy is pre-approved but delivery timing depends on user behavior. Because the content is fully builder-defined, Marketing Email ensures brand consistency across all sends. The agent’s role is limited to selecting the right moment and recipient, keeping your campaign messaging on-brand while still reacting to real-time signals during the run.Configuration
Inputs
Tool-level instruction that explains when this tool should be used.
Recipient org user id. Can be provided by user selection or agent decision.
Sender configuration used for delivery.
Optional CC recipients.
Optional BCC recipients.
Controls whether the run should continue if sending fails.
Outputs
The status of the email send operation. Can be
success, failure, or skipped.The ID of the user that the email was sent to.
The ID of the sender configuration used for the email.
The ID of the email that was sent (available on success).
The options used when creating the email, including subject, body, and recipient details (available on success).
The response from the email creation service (available on success).
The code indicating why the email send operation failed or was skipped. Can be
resend_error, duplicate_email, or user_marketing_email_opt_out.The message of the error that occurred (available on failure).
Use cases
Product Launch AnnouncementBest practices
Campaign Consistency- Keep all campaign copy and branding builder-defined to maintain consistency across sends.
- Let the agent control timing and recipient selection, not the core copy or design.
- Use preview text to improve open rates and reinforce the subject line in inbox clients.
- Set
complete_on_send_failuretotruewhen the agent run should continue even if the email fails. - Check the
codeoutput foruser_marketing_email_opt_outto understand opt-out-related skips. - Use
error_messagealongsidecodeto diagnose delivery failures and improve reliability.
- Define clear trigger conditions in the agent prompt to avoid sending to unqualified users.
- Leverage user properties and event data to let the agent select the best recipients dynamically.
- Avoid duplicate sends by combining with Set Custom Property to mark users who have already received the campaign.