> ## Documentation Index
> Fetch the complete documentation index at: https://flywheel.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AI One-to-One Email

> Send one-to-one emails with AI-generated subject and body copy

<iframe src="http://localhost:3000/doc-comp-previews/agent-node-preview?type=send_agent_one_to_one_email" title="Agent Node Preview" width="100%" height="250px" className="border dark:border-[#1C1C20] rounded-xl" />

## How AI One-to-One Email works

**AI One-to-One Email** lets the agent generate personalized one-to-one email content at runtime. You configure core delivery controls — sender identity and failure behavior — in the builder, while the agent tailors the subject, preview text, and body to the current situation.

This tool combines the personal feel of one-to-one messaging with the flexibility of AI-generated content. It is ideal for high-touch outreach scenarios where the message should reference specific user context — like recent activity, account health, or lifecycle stage — while still appearing as a direct email from a real team member. The agent adapts every send to the recipient, so no two emails need to read the same way.

## Configuration

<Columns cols={2}>
  <Card title="Inputs">
    <ParamField path="Prompt" type="string" required>
      Instructions that tell the agent when this tool should be used and what quality bar the generated copy should meet.
    </ParamField>

    <ParamField path="Send to" type="string" required>
      Target user to email.
    </ParamField>

    <ParamField path="Send from" type="string" required>
      Team member identity used as sender.
    </ParamField>

    <ParamField path="Subject" type="string" required>
      AI-generated subject line.
    </ParamField>

    <ParamField path="Preview (optional)" type="string">
      Optional AI-generated preview text.
    </ParamField>

    <ParamField path="cc" type="string[]">
      Optional CC recipients; can be set by builder defaults or agent at runtime.
    </ParamField>

    <ParamField path="bcc" type="string[]">
      Optional BCC recipients; can be set by builder defaults or agent at runtime.
    </ParamField>

    <ParamField path="Complete on send failure" type="boolean" default="true">
      Controls whether the run should continue when send fails.
    </ParamField>
  </Card>

  <Card>
    <iframe src="http://localhost:3000/doc-comp-previews/agent-config-preview?type=send_agent_one_to_one_email" title="Agent Config Preview" width="100%" height="620px" className="" />
  </Card>
</Columns>

<Card title="Outputs">
  <ParamField path="status" type="enum" required>
    The status of the email send operation. Can be `success`, `failure`, or `skipped`.
  </ParamField>

  <ParamField path="to_id" type="string" required>
    The ID of the user that the email was sent to.
  </ParamField>

  <ParamField path="from_id" type="string" required>
    The team member ID used as the sender for this email.
  </ParamField>

  <ParamField path="email_id" type="string">
    The ID of the email that was sent (available on success).
  </ParamField>

  <ParamField path="create_email_options" type="object">
    The options used when creating the email, including the AI-generated subject, preview text, and body content (available on success).
  </ParamField>

  <ParamField path="create_email_response" type="object">
    The response from the email creation service (available on success).
  </ParamField>

  <ParamField path="code" type="enum">
    The code indicating why the email send operation failed or was skipped. Can be `resend_error`, `duplicate_email`, or `user_marketing_email_opt_out`.
  </ParamField>

  <ParamField path="error_message" type="string">
    The message of the error that occurred (available on failure).
  </ParamField>
</Card>

## Use cases

**Trial-to-Paid Conversion Follow-Up**

```
Condition: User upgrades from trial to paid plan
Action: Agent generates personalized congratulatory email from assigned CSM
Outcome: New customer receives a warm, contextual welcome that references their trial activity
```

**High-Risk Account Outreach**

```
Condition: Churn risk score crosses a critical threshold
Action: Agent generates a contextual check-in with next-step recommendations from the account owner
Outcome: At-risk user receives a personal, relevant message addressing their specific situation
```

**Onboarding Guidance**

```
Condition: User completes initial setup but has not activated a key feature after 5 days
Action: Agent generates a helpful nudge from the success manager referencing the user's current progress
Outcome: Stalled user receives targeted guidance that feels like a personal check-in, not a generic drip
```

**Quarterly Business Review Prep**

```
Condition: QBR date is within 14 days and usage data is available
Action: Agent generates a pre-QBR outreach email summarizing recent activity and proposed agenda items
Outcome: Customer receives a thoughtful, data-informed touchpoint that sets up a productive review
```

## Best practices

**Prompt Quality and Tone Control**

* Give concrete voice, policy, and CTA constraints in the tool prompt to keep generated outreach consistent and safe.
* Include examples of ideal tone and length so the agent has a clear quality bar for every send.
* Reference specific user properties the agent should weave into the message (e.g., company name, recent milestones, plan tier).

**Sender Identity and Personalization**

* Configure sender selection rules to ensure the agent uses the correct team member identity for each recipient.
* Avoid generic sender assignments — the `from_id` should map to the person who actually owns the customer relationship.
* Audit `from_id` and `create_email_options` outputs periodically to verify the agent is sending from the right person with appropriate content.

**Testing and Guardrails**

* Start with a small cohort to evaluate generated copy quality before rolling out to a broader audience.
* Set `complete_on_send_failure` appropriately — enable it when the agent run has other critical steps that should proceed regardless.
* Monitor `code` output for patterns like `duplicate_email` to detect and prevent repeat outreach to the same user.
