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

# AI Email Builder

> Describe an email and watch LIA build it block by block, then hand it to the email template editor to finish and save.

The AI Email Builder turns a sentence into a finished email template. You describe the email, LIA writes it, and the preview fills in one block at a time while she works. You get here from [Email Templates](/mortgage-crm/email-templates). The **Templates** link at the top left takes you back there.

The screen is two columns. The left is what you tell LIA. The right is what she produces.

<Note>
  This screen builds a draft — it doesn't save one. Nothing you generate here becomes a real template until you click **Edit** and save it in the template editor. If you leave the screen, the draft is gone.
</Note>

## Describing the email

**Describe your email** is the only field you have to fill in. Write what you want in plain English — as much or as little as you like. The placeholder text shows the level of detail that works well: a warm welcome email for new mortgage clients with onboarding steps and a call to action to start their application.

**Quick Start** gives you fourteen ready-made briefs that fill the box for you, so you can start from one and edit it instead of starting from a blank field. They cover the usual borrower moments — welcome, rate drop, document request, pipeline report, pre-approval congratulations, nurture, referral request, and closing day — plus a set for referral partners: introduction, deal update, co-marketing, closing thank you, rate update, and co-branded flyers.

<Warning>
  A Quick Start replaces whatever is already in the box. Pick one first, then edit.
</Warning>

## The three settings

**Tone** is one of **Professional**, **Friendly**, **Urgent** or **Casual**. Professional is the default.

**Layout** is **Standard**, **Minimal** or **Announcement**, and controls how the email is laid out rather than what it says. Standard is the default.

**Output Type** decides what you get back, and it's the setting most worth understanding:

| Option            | Sub label       | What it produces                                                       |
| ----------------- | --------------- | ---------------------------------------------------------------------- |
| **Canvas Editor** | Editable blocks | A stack of blocks you can rearrange and rewrite in the template editor |
| **Advanced HTML** | Direct HTML     | A single piece of HTML, previewed in a frame, edited as code           |

**Canvas Editor** is the default, and it's the right choice for almost everything. Only choose **Advanced HTML** if you want to control the code yourself.

## Variables

**Available Variables** opens a long list of the merge fields LIA can use — placeholders like `{{firstName}}` that get swapped for real information when the email sends. They're grouped as **Lead**, **Loan**, **Loan Trackers**, **Contact / Partner**, **Universal**, **Loan Officer**, **Company**, **AI Content**, and **System**. Each one is shown as its raw code, and clicking it adds that code to your description. The panel explains what that does: the AI will use these in the generated template, click to mention in your prompt.

You don't have to name any variables yourself. LIA picks the right ones on her own, based on who the email is addressed to. Naming one yourself is only useful when you want a specific field she might not think of, like a tracker date or a company detail.

Two habits are worth building:

* LIA is instructed never to type your company name out directly, so a generated template uses `{{company.name}}` instead. That's correct — it fills in your real company name when the email sends.
* Loan-side emails should use loan variables, and lead-side emails should use lead variables. Saying which one you mean in your description — "a closing reminder for the borrower on a loan" — gets you the right set of fields.

## Generating

**Generate Template** starts the run and changes to **Generating...**. The status area below it walks you through the stages:

1. **AI is crafting your email template...**, while she writes.
2. **Building email blocks...**, once she has the structure.
3. **Building block 1 of 5...**, counting up, with a **Blocks** progress bar and a matching small tag on the preview.

The raw text streams by in a small panel during stage one — that's just there so you can see something's happening.

**Cancel** stops a run in progress and clears the screen. When the run finishes, **Template ready!** appears at the top of the preview, and the buttons change to **Regenerate** and **Edit Template**.

**Regenerate** clears everything so you can run again with a different description or settings. It doesn't keep the previous version, so copy anything you want to keep before you click it.

## Finishing the template

**Edit Template**, or the **Edit** button in the **Template ready!** banner, is how the draft leaves this screen. It sends the generated template to the email template editor, where you can change the wording, move the blocks around, set the real link on the call to action, and save it. Both buttons do the same thing.

The preview on this screen is a preview. Editing happens in the editor.

<Warning>
  The generated call to action doesn't go anywhere until you set a link for it in the editor. Check it before you send anything.
</Warning>

## What is not here

There's no send, test send, schedule, or delete button on this screen. It generates the template and hands it over — that's all. Sending is a job for [Email Campaigns](/mortgage-crm/email-campaigns) or a workflow.

It also doesn't add unsubscribe or opt-out wording for you. `{{system.unsubscribeLink}}` is a variable you can use, but nothing on this screen requires it. If your company expects that wording in marketing email, add it yourself in the editor.

## Common problems

<AccordionGroup>
  <Accordion title="I generated a template and now I cannot find it">
    It was never saved. A generated draft only becomes a template once you click **Edit Template** and save it in the editor. Generate it again.
  </Accordion>

  <Accordion title="The email uses lead fields but it is about a loan">
    Say so in the description. Tell LIA it's a loan status, closing, or funding email, and she'll use loan fields, including the buyer agent, seller agent, title, and processor contacts on the file.
  </Accordion>

  <Accordion title="The header image is not the one I want">
    LIA picks a stock image to suit the email. Swap it out in the template editor.
  </Accordion>

  <Accordion title="I chose Advanced HTML and the preview is a plain frame">
    That's what **Advanced HTML** produces: a single block of code rather than editable blocks. If you wanted blocks you can rearrange, regenerate with **Canvas Editor** selected instead.
  </Accordion>

  <Accordion title="Nothing happens when I press Generate Template">
    The button stays disabled until **Describe your email** has something in it.
  </Accordion>
</AccordionGroup>

## Related

* [AI SMS Builder](/mortgage-crm/ai-sms-builder)
* [Email Templates](/mortgage-crm/email-templates)
* [Email Campaigns](/mortgage-crm/email-campaigns)
* [LIA Assistant](/mortgage-crm/lia-assistant)
