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

# AI Email Generation

> Use Parsa AI to generate personalized, context-aware emails for contacts, leads, and automation workflows.

<div
  style={{ 
display: "inline-block",
color: "#1C758A",
fontSize: "12px",
fontWeight: "700",
marginBottom: "10px",
letterSpacing: "0.06em",
textTransform: "uppercase",
background: "rgba(48,200,202,0.10)",
padding: "7px 12px",
borderRadius: "999px",
border: "1px solid rgba(48,200,202,0.16)"
}}
>
  AI Assistant
</div>

## How AI Email Generation Works

<div
  style={{
background: "linear-gradient(135deg, rgba(20,61,78,0.04) 0%, rgba(28,117,138,0.08) 55%, rgba(48,200,202,0.10) 100%)",
border: "1px solid rgba(28,117,138,0.14)",
borderRadius: "22px",
padding: "22px",
marginBottom: "26px",
boxShadow: "0 14px 34px rgba(20, 61, 78, 0.05)",
position: "relative",
overflow: "hidden"
}}
>
  <div
    style={{
position: "absolute",
top: "-38px",
right: "-38px",
width: "130px",
height: "130px",
background: "rgba(48,200,202,0.12)",
borderRadius: "999px"
}}
  />

  <div
    style={{
position: "absolute",
bottom: "-34px",
left: "-24px",
width: "100px",
height: "100px",
background: "rgba(20,61,78,0.05)",
borderRadius: "999px"
}}
  />

  <div
    className="bg-white dark:bg-black dark:border-white/10 dark:text-white [&_*]:dark:text-white dark:shadow-none"
    style={{
border: "1px solid rgba(28,117,138,0.14)",
borderRadius: "22px",
padding: "22px",
marginBottom: "26px",
boxShadow: "0 14px 34px rgba(20, 61, 78, 0.05)",
position: "relative",
overflow: "hidden"
}}
  >
    Parsa AI can write emails tailored to the recipient using data from your CRM. Rather than starting from a blank screen, you describe what you want to say and the AI drafts a complete, personalized email using:

    * The contact or lead's name, company, title, and recent activity
    * The linked opportunity or deal context
    * Your previous email history with that person
    * Any custom instructions or tone guidance you provide

    You review the draft before anything is sent.
  </div>
</div>

***

<div
  style={{ 
display: "inline-block",
color: "#1C758A",
fontSize: "12px",
fontWeight: "700",
marginBottom: "8px",
letterSpacing: "0.06em",
textTransform: "uppercase",
background: "rgba(28,117,138,0.08)",
padding: "6px 12px",
borderRadius: "999px",
border: "1px solid rgba(28,117,138,0.12)"
}}
>
  Chat Workflow
</div>

## Generating Emails from Chat

<div
  className="dark:bg-black dark:text-white dark:border-white/10 dark:shadow-none"
  style={{
border: "1px solid #E7EAEC",
borderRadius: "18px",
padding: "20px",
marginBottom: "20px",
boxShadow: "0 14px 34px rgba(20, 61, 78, 0.05)",
backgroundColor: "rgba(48,200,202,0.05) ,#21212",   
color: "rgba(48,200,202,0.05) ,#21212"  
}}
>
  The most flexible way to generate emails is through the AI chat panel.
</div>

**Basic prompt:**

<div
  className="dark:bg-black dark:text-white dark:border-white/10 dark:shadow-none"
  style={{
display: "grid",
gap: "10px",
marginBottom: "18px",
  
border: "1px solid #E7EAEC",
borderRadius: "16px",
padding: "16px",
boxShadow: "0 10px 26px rgba(20, 61, 78, 0.04)",
 backgroundColor: "rgba(48,200,202,0.05) ,#21212",   
color: "rgba(48,200,202,0.05) ,#21212"  
}}
>
  ```
  Write a follow-up email to John Smith at Acme Corp about the proposal we sent last week.
  ```
</div>

**With context and tone guidance:**

<div
  style={{
display: "grid",
gap: "10px",
marginBottom: "18px",
  
border: "1px solid #E7EAEC",
borderRadius: "16px",
padding: "16px",
boxShadow: "0 10px 26px rgba(20, 61, 78, 0.04)",
 backgroundColor: "rgba(48,200,202,0.05) ,#21212",   
color: "rgba(48,200,202,0.05) ,#21212"      
}}
>
  ```
  Write a warm re-engagement email to Sarah Kim. She's a lead who went quiet 3 weeks ago after an initial discovery call. Keep it brief and low-pressure.
  ```
</div>

**For a specific goal:**

<div
  style={{
display: "grid",
gap: "10px",
marginBottom: "20px",
  
border: "1px solid #E7EAEC",
borderRadius: "16px",
padding: "16px",
boxShadow: "0 10px 26px rgba(20, 61, 78, 0.04)",
backgroundColor: "rgba(48,200,202,0.05) ,#21212",   
color: "rgba(48,200,202,0.05) ,#21212"  
}}
>
  ```
  Draft an email to Marcus Rodriguez introducing our new enterprise tier. He's in the Negotiation stage and his main concern was onboarding time.
  ```
</div>

<div
  style={{
display: "grid",
gap: "10px",
marginBottom: "18px",
  
border: "1px solid #E7EAEC",
borderRadius: "16px",
padding: "16px",
boxShadow: "0 10px 26px rgba(20, 61, 78, 0.04)",
 backgroundColor: "rgba(48,200,202,0.05) ,#21212",   
color: "rgba(48,200,202,0.05) ,#21212"      
}}
>
  After the AI drafts the email, you'll see:

  * **Subject line**
  * **Email body**
  * **Suggested send time** (optional)

  Click **Send** to deliver it immediately, **Edit** to revise it, or **Discard** to start over.
</div>

***

<div
  style={{ 
display: "inline-block",
color: "#1C758A",
fontSize: "12px",
fontWeight: "700",
marginBottom: "8px",
letterSpacing: "0.06em",
textTransform: "uppercase",
background: "rgba(28,117,138,0.08)",
padding: "6px 12px",
borderRadius: "999px",
border: "1px solid rgba(28,117,138,0.12)"
}}
>
  Automation
</div>

## AI Email Mode in Automations

<div
  style={{
background: "linear-gradient(135deg,rgba(48,200,202,0.02)100%)",    
border: "1px solid #E3E8EA",
borderRadius: "18px",
padding: "20px",
marginBottom: "24px",
boxShadow: "0 14px 34px rgba(20, 61, 78, 0.04)",
color: "rgba(48,200,202,0.05) ,#212121"  /* النص باللون الافتراضي في الوضع العادي */
}}
  className="dark:bg-black dark:text-white"
>
  When building an automation, the **Send Email** action offers three modes:

  | Mode             | Description                                                                           |
  | ---------------- | ------------------------------------------------------------------------------------- |
  | **Template**     | Uses a pre-built email template with variable substitution                            |
  | **Custom**       | Write a static email body directly in the automation builder                          |
  | **AI-Generated** | Provides a prompt to the AI; each email is generated fresh for the specific recipient |

  The **AI-Generated** mode is powerful for sequences where each message should feel personal rather than templated. For example:

  * A nurture follow-up 7 days after a lead goes quiet, where the AI references the lead's industry and role.
  * A proposal follow-up that references the proposal title and the account name.

  To configure an AI email action:

  1. Add a **Send Email** action to your automation.
  2. Select **AI-Generated** as the mode.
  3. Write a prompt template. You can use CRM variables inside the prompt.
</div>

***

<div
  style={{ 
display: "inline-block",
color: "#1C758A",
fontSize: "12px",
fontWeight: "700",
marginBottom: "8px",
letterSpacing: "0.06em",
textTransform: "uppercase",
background: "rgba(28,117,138,0.08)",
padding: "6px 12px",
borderRadius: "999px",
border: "1px solid rgba(28,117,138,0.12)"
}}
>
  Prompt Variables
</div>

## Customizing AI Prompts

<div
  style={{
background: "#FFFFFF ,#212121",    
border: "1px solid #E7EAEC",
borderRadius: "18px",
padding: "20px",
marginBottom: "20px",
boxShadow: "0 14px 34px rgba(20, 61, 78, 0.05)",
color: "#212121 ,#FFFFFF "    
}}
  className="dark:bg-black dark:text-white"
>
  Prompts in AI email actions support CRM template variables, which are filled in at send time:
</div>

<div
  style={{
background: "#FFFFF ", 
border: "1px solid #E7EAEC",
borderRadius: "16px",
padding: "14px",
marginBottom: "20px",
boxShadow: "0 10px 26px rgba(20, 61, 78, 0.04)"
}}
  className="dark:bg-black dark:text-white"
>
  | Variable                | Resolved to                   |
  | ----------------------- | ----------------------------- |
  | `{{contact.firstName}}` | Contact's first name          |
  | `{{contact.lastName}}`  | Contact's last name           |
  | `{{contact.company}}`   | Contact's linked account name |
  | `{{contact.title}}`     | Contact's job title           |
  | `{{lead.firstName}}`    | Lead's first name             |
  | `{{opportunity.name}}`  | Opportunity name              |
  | `{{opportunity.value}}` | Opportunity value             |
  | `{{user.firstName}}`    | Assigned rep's first name     |
  | `{{workspace.name}}`    | Your workspace name           |
</div>

**Example automation prompt:**

<div
  style={{
display: "grid",
gap: "10px",
marginBottom: "24px",
background: "#FFFFFF ,#212121",   
color: "#212121 ,#FFFFFF "  ,
border: "1px solid #E7EAEC",
borderRadius: "16px",
padding: "16px",
boxShadow: "0 10px 26px rgba(20, 61, 78, 0.04)"
}}
  className="dark:bg-black dark:text-white"
>
  ```
  Write a short, friendly follow-up email to {{contact.firstName}} at {{contact.company}}.
  They are in the {{opportunity.stage}} stage and the rep is {{user.firstName}}.
  Mention that we're happy to answer any questions and suggest a quick call.
  Keep the email under 100 words.
  ```
</div>

***

<div
  style={{ 
display: "inline-block",
color: "#1C758A",
fontSize: "12px",
fontWeight: "700",
marginBottom: "8px",
letterSpacing: "0.06em",
textTransform: "uppercase",
background: "rgba(28,117,138,0.08)",
padding: "6px 12px",
borderRadius: "999px",
border: "1px solid rgba(28,117,138,0.12)"
}}
>
  Templates
</div>

## Template Variables in Email Templates

<div
  style={{
display: "grid",
gap: "10px",
marginBottom: "18px",
  
border: "1px solid #E7EAEC",
borderRadius: "16px",
padding: "16px",
boxShadow: "0 10px 26px rgba(20, 61, 78, 0.04)",
 backgroundColor: "rgba(48,200,202,0.05) ,#21212",   
color: "rgba(48,200,202,0.05) ,#21212"      
}}
>
  Static email templates (not AI-generated) use the same `{{variable}}` syntax. Any variable that isn't found in the CRM for a specific recipient will be left blank unless you provide a fallback:
</div>

<div
  style={{
display: "grid",
gap: "10px",
marginBottom: "18px",
  
border: "1px solid #E7EAEC",
borderRadius: "16px",
padding: "16px",
boxShadow: "0 10px 26px rgba(20, 61, 78, 0.04)",
 backgroundColor: "rgba(48,200,202,0.05) ,#21212",   
color: "rgba(48,200,202,0.05) ,#21212"      
}}
>
  ```
  Hi {{contact.firstName | there}},
  ```
</div>

<div
  style={{
display: "grid",
gap: "10px",
marginBottom: "18px",
  
border: "1px solid #E7EAEC",
borderRadius: "16px",
padding: "16px",
boxShadow: "0 10px 26px rgba(20, 61, 78, 0.04)",
 backgroundColor: "rgba(48,200,202,0.05) ,#21212",   
color: "rgba(48,200,202,0.05) ,#21212"      
}}
>
  The `| there` fallback means the email reads "Hi there" if the first name isn't available.
</div>

***

<div
  style={{ 
display: "inline-block",
color: "#1C758A",
fontSize: "12px",
fontWeight: "700",
marginBottom: "8px",
letterSpacing: "0.06em",
textTransform: "uppercase",
background: "rgba(28,117,138,0.08)",
padding: "6px 12px",
borderRadius: "999px",
border: "1px solid rgba(28,117,138,0.12)"
}}
>
  Quality Control
</div>

## Reviewing AI Email Quality

<div
  style={{
background: "linear-gradient(135deg, rgba(20,61,78,0.04) 0%, rgba(48,200,202,0.07) 100%)",
border: "1px solid rgba(28,117,138,0.14)",
borderRadius: "18px",
padding: "18px 20px",
marginBottom: "16px",
boxShadow: "0 14px 34px rgba(20, 61, 78, 0.04)",
color: "#212121"
}}
>
  A few best practices:
</div>

<Tip>
  Always include a tone directive in your prompt — "professional," "casual," "brief," or "empathetic" significantly shapes the output quality.
</Tip>

<Warning>
  AI emails may occasionally hallucinate facts not in your CRM. Never rely on AI to fill in pricing, dates, or contractual commitments without reviewing the output first.
</Warning>

<div
  style={{
background: "linear-gradient(135deg, rgba(255,255,255,1) 0%, #21212",  
border: "1px solid #E3EAEC",
borderRadius: "18px",
padding: "20px",
marginBottom: "24px",
boxShadow: "0 14px 34px rgba(20, 61, 78, 0.05)",
color: "#212121 , rgba(255,255,255,1) "  
}}
  className="dark:bg-black dark:text-white dark:border-white/10 dark:shadow-none"
>
  * Keep prompts focused — one clear goal per email generates better results than multi-part instructions.
  * Reference CRM fields explicitly — the AI performs better when it has concrete details (name, company, stage) rather than abstract concepts.
  * Test AI automations with your own email address before going live to review output quality.
</div>
