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

# Email Templates

> Customize email notifications sent to you and your respondents with dynamic templates using variables. Create professional, personalized email messages.

## What are Email Templates?

Email templates let you customize the content of notification emails sent when someone submits your form. Use variables to include submission data dynamically.

**Template Types:**

* **Admin Notification** - Sent to you when form is submitted
* **Auto-responder** - Sent to respondent after submission
* **Confirmation with Summary** - Sent to respondent with their answers
* **Custom Templates** - Create your own

**Use Cases:**

* Personalized thank you emails
* Order confirmations with details
* Application received notifications
* Support ticket confirmations
* Event registration confirmations

## Available Variables

Variables are placeholders replaced with actual submission data.

### Standard Variables

Available in all templates:

| Variable               | Description           | Example                                       |
| ---------------------- | --------------------- | --------------------------------------------- |
| `{{form_title}}`       | Form name             | "Customer Feedback Form"                      |
| `{{submission_id}}`    | Unique submission ID  | "12345"                                       |
| `{{submitted_at}}`     | Date and time         | "March 15, 2024, 2:30 PM"                     |
| `{{completion_time}}`  | Time taken            | "2.5 minutes"                                 |
| `{{workspace_name}}`   | Workspace name        | "Acme Inc"                                    |
| `{{answers}}`          | All answers formatted | *See below*                                   |
| `{{respondent_email}}` | Email from form       | "[user@example.com](mailto:user@example.com)" |

### Question-Based Variables

Each form question becomes a variable:

**Format:** Question title converted to lowercase with underscores

**Examples:**

| Question Title               | Variable                        |
| ---------------------------- | ------------------------------- |
| "What's your name?"          | `{{whats_your_name}}`           |
| "Email Address"              | `{{email_address}}`             |
| "Phone Number"               | `{{phone_number}}`              |
| "Company Name"               | `{{company_name}}`              |
| "How did you hear about us?" | `{{how_did_you_hear_about_us}}` |

**Contact Info Fields:**

For contact\_info question type, additional variables:

| Variable                      | Description     |
| ----------------------------- | --------------- |
| `{{contact_info}}`            | Full JSON       |
| `{{contact_info_first_name}}` | First name only |
| `{{contact_info_last_name}}`  | Last name only  |
| `{{contact_info_email}}`      | Email only      |
| `{{contact_info_phone}}`      | Phone only      |

**Example Question Variables:**

```
Question: "What's your email?"
Variable: {{whats_your_email}}
Result: user@example.com

Question: "Preferred Contact Method"
Variable: {{preferred_contact_method}}
Result: Email

Question: "How satisfied are you?"
Variable: {{how_satisfied_are_you}}
Result: Very Satisfied
```

### {answers} Variable

Special variable that includes all form answers formatted as HTML.

**Example Output:**

```
📝 Submission Details

Name
John Doe

Email Address
john@example.com

Phone Number
(555) 123-4567

How did you hear about us?
Google Search

Message
I'm interested in your services...
```

## Creating Email Templates

### Access Email Templates

1. Go to **Workspace Settings**
2. Click **"Email Templates"** in sidebar
3. Click **"Create Template"** button

**Quick Access:**

```
Workspace Settings → Email Templates → Create Template
```

### Template Creation Steps

**Step 1: Template Name**

```
Name: Welcome Email with Summary
Description: Sent to customers with order details
```

**Step 2: Email Subject**

```
Subject: Thank you {{whats_your_name}} - Order Confirmation
```

**Step 3: Email Body**

```
Hello {{whats_your_name}},

Thank you for your order! We've received your submission.

Order Details:
- Order ID: {{submission_id}}
- Submitted: {{submitted_at}}
- Email: {{email_address}}

{{answers}}

We'll process your order and get back to you within 24 hours.

Best regards,
{{workspace_name}} Team
```

**Step 4: Save Template**

* Click **"Save Template"**
* Template now available for all forms in workspace

### Default Templates

TopFormBuilder includes 3 default templates:

**1. Admin Notification**

```
Subject: New submission for {{form_title}}

Hello,

You have received a new submission for your form "{{form_title}}".

Submission ID: {{submission_id}}
Submitted at: {{submitted_at}}
Time taken: {{completion_time}}

Thank you!
```

**2. Auto-responder**

```
Subject: Thank you for your submission

Hello,

Thank you for submitting "{{form_title}}".

We have received your response and will get back to you soon.

Submission ID: {{submission_id}}
Submitted at: {{submitted_at}}

Best regards
```

**3. Confirmation with Summary**

```
Subject: Your submission has been received

Hello,

Thank you for your submission to "{{form_title}}".

Your responses have been recorded.

Submission ID: {{submission_id}}
Submitted at: {{submitted_at}}

If you have any questions, please don't hesitate to contact us.

Best regards
```

## Using Email Templates

### Assign Template to Form

**Method 1: Form Settings**

1. Open Form Builder
2. Go to **Settings** tab
3. Scroll to **"Notifications"** section
4. Under **"Admin Email Template"**, select template
5. Under **"Respondent Email Template"**, select template
6. Save form

**Method 2: Quick Settings**

1. Form Builder → Settings
2. Enable notifications
3. Select templates from dropdown
4. Done!

### Admin vs Respondent Templates

**Admin Notification:**

* Sent to form owner/admins
* Can include all submission details
* Use `{{answers}}` variable
* Configure recipient in Form Settings

**Respondent Notification:**

* Sent to person who filled form
* Personalized with their data
* Use question variables
* Sent to email field in form

**Example Setup:**

```
Admin Template: "New Lead Notification"
→ Sent to: sales@company.com
→ Contains: All form data

Respondent Template: "Thank You Email"
→ Sent to: {{email_address}}
→ Contains: Personalized thank you
```

## Template Examples

### Example 1: Event Registration

**Template Name:** Event Registration Confirmation

**Subject:**

```
Registration Confirmed: {{event_name}} - {{whats_your_name}}
```

**Body:**

```
Hello {{whats_your_name}},

Thank you for registering for {{event_name}}!

Registration Details:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Name: {{whats_your_name}}
Email: {{email_address}}
Phone: {{phone_number}}
Ticket Type: {{ticket_type}}
Number of Attendees: {{number_of_attendees}}

Event Information:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Date: March 20, 2024
Time: 6:00 PM - 9:00 PM
Location: Convention Center, Hall A

Your confirmation number is: {{submission_id}}

Please bring this email or your confirmation number to the event.

See you there!

Best regards,
Events Team
```

### Example 2: Support Ticket

**Template Name:** Support Ticket Created

**Subject:**

```
[Ticket #{{submission_id}}] Your support request
```

**Body:**

```
Hello {{whats_your_name}},

We've received your support request and created ticket #{{submission_id}}.

Your Request:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Subject: {{issue_subject}}
Priority: {{priority_level}}
Category: {{category}}

Description:
{{issue_description}}

━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Our support team will review your request and respond within:
- High Priority: 2 hours
- Medium Priority: 24 hours
- Low Priority: 48 hours

You can track your ticket status at:
https://support.company.com/ticket/{{submission_id}}

Need urgent help? Call us at (555) 123-4567

Best regards,
Support Team
```

### Example 3: Job Application

**Template Name:** Application Received

**Subject:**

```
Application Received - {{position_applying_for}}
```

**Body:**

```
Dear {{whats_your_name}},

Thank you for applying for the {{position_applying_for}} position at {{workspace_name}}.

Application Summary:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Position: {{position_applying_for}}
Application ID: {{submission_id}}
Submitted: {{submitted_at}}
Email: {{email_address}}
Phone: {{phone_number}}

━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Next Steps:
1. Our hiring team will review your application within 5 business days
2. Qualified candidates will be contacted for a phone interview
3. Selected candidates will be invited for an in-person interview

What to Expect:
- Application review: 3-5 days
- Phone screening: 30 minutes
- In-person interview: 1-2 hours

You'll hear from us at {{email_address}} by March 20, 2024.

In the meantime, check out our company culture:
https://company.com/careers/culture

Thank you for your interest in joining our team!

Best regards,
HR Department
{{workspace_name}}
```

### Example 4: Order Confirmation

**Template Name:** Order Confirmation with Details

**Subject:**

```
Order #{{submission_id}} Confirmed - Thank You!
```

**Body:**

```
Hi {{customer_name}},

Your order has been confirmed! 🎉

Order Information:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Order ID: {{submission_id}}
Order Date: {{submitted_at}}
Total Amount: {{total_amount}}

Shipping Address:
{{shipping_address}}
{{city}}, {{state}} {{zip_code}}
{{country}}

Contact Information:
Email: {{email_address}}
Phone: {{phone_number}}

━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Items Ordered:
{{answers}}

Estimated Delivery:
Your order will be delivered within 5-7 business days.

Track Your Order:
https://shop.company.com/track/{{submission_id}}

Need Help?
- Email: support@company.com
- Phone: (555) 123-4567
- Live Chat: https://shop.company.com/chat

Thank you for shopping with us!

Best regards,
{{workspace_name}}
```

## Viewing Available Variables

See all variables for a specific form:

**Method 1: Template Editor**

1. Create/edit template
2. Click **"View Variables"** button
3. Modal shows all available variables for selected form
4. Click variable to copy

**Method 2: Form Builder**

1. Open Form Builder
2. Go to Settings → Notifications
3. Click **"Available Variables"** link
4. List of all variables for this form

**Variable List Example:**

```
Standard Variables:
- {{form_title}} - The form title
- {{submission_id}} - Unique submission ID
- {{submitted_at}} - Submission date and time
- {{completion_time}} - Time taken to complete

Question Variables:
- {{whats_your_name}} - What's your name?
- {{email_address}} - Email Address
- {{phone_number}} - Phone Number
- {{company_name}} - Company Name
- {{message}} - Your Message
```

## Email Formatting

### HTML vs Plain Text

**Plain Text (Default):**

* Simple formatting
* Line breaks with `\n`
* No styling
* Better deliverability
* Works in all email clients

**HTML (Auto-converted):**

* Line breaks converted to `<br>`
* Variables replaced
* Basic formatting applied
* Professional appearance

### Formatting Tips

**Line Breaks:**

```
Hello {{name}},

Thank you for your submission.
[Empty line creates paragraph break]
We'll be in touch soon.
```

**Section Dividers:**

```
Order Details:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Order ID: {{submission_id}}
Date: {{submitted_at}}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
```

**Lists:**

```
Next Steps:
1. Review your submission
2. Wait for confirmation email
3. Check your dashboard
```

**Bold/Emphasis:**

```
**Important:** Please respond within 24 hours
*Note:* This is a test email
```

## Managing Templates

### Edit Template

1. Go to Workspace Settings → Email Templates
2. Click template to edit
3. Update subject and body
4. Click **"Save"**

**Changes Apply:**

* To all future emails
* Forms using this template updated automatically
* Previously sent emails NOT changed

### Duplicate Template

Create variation of existing template:

1. Open template
2. Click **"Duplicate"** button
3. New template created with " (Copy)" suffix
4. Edit as needed
5. Save

**Use Case:**

```
Original: "Admin Notification"
Duplicate: "Admin Notification - Sales Team"
Customize for sales with sales-specific info
```

### Delete Template

1. Go to Email Templates
2. Click template to delete
3. Click **"Delete"** button
4. Confirm deletion

**Warning:**

* Forms using this template will revert to default
* Action cannot be undone
* Template history lost

**Before Deleting:**

* Check which forms use template
* Reassign forms to different template
* Export template content if needed

### Test Template

Send test email before using template:

1. Open template
2. Click **"Send Test"** button
3. Enter test email address
4. Select form to test with
5. Click **"Send"**
6. Check inbox

**Test Email Includes:**

* Sample data from form
* All variables replaced
* Actual formatting
* Subject line

## Template Best Practices

### Writing Effective Templates

**Do:**

* Use clear, concise language
* Personalize with variables
* Include submission ID for reference
* Add contact information
* Provide next steps
* Use professional tone
* Test before launching

**Don't:**

* Use ALL CAPS (spam trigger)
* Include too many links
* Write generic messages
* Forget submission details
* Make it too long
* Use spam trigger words ("FREE", "ACT NOW")

### Variable Usage

**Best Practices:**

* Always include `{{submission_id}}`
* Use `{{answers}}` for full details
* Personalize with name variable
* Include submission date
* Add workspace name for branding

**Testing Variables:**

* Test with actual form submission
* Verify variables display correctly
* Check for missing variables
* Ensure formatting is clean

### Email Deliverability

**Improve Deliverability:**

* Keep subject under 50 characters
* Avoid spam trigger words
* Don't use excessive punctuation!!!
* Include plain text version
* Add unsubscribe link (for newsletters)
* Use professional email address
* Verify sender domain

**Spam Trigger Words to Avoid:**

* FREE, WIN, PRIZE
* ACT NOW, URGENT
*
* CLICK HERE
* 100% GUARANTEED

## Troubleshooting

### Variables Not Replacing

**Problem:** Variables show as `{{variable_name}}` in email

**Solutions:**

1. **Check Variable Name** - Ensure exact match (case-sensitive)
2. **Remove Spaces** - Use `{{variable}}` not `{{ variable }}`
3. **Verify Question Exists** - Variable matches form question
4. **Test Email** - Send test to verify

### Missing Data

**Problem:** Variable replaced with empty value

**Reasons:**

1. **Question Not Answered** - User skipped optional question
2. **Wrong Variable Name** - Typo in variable
3. **Deleted Question** - Variable for removed question

**Solutions:**

* Make questions required
* Check variable spelling
* Update template if question changed

### Email Not Sending

**Problem:** Template configured but emails not arriving

**Solutions:**

1. **Check Email Settings** - Form Settings → Notifications enabled
2. **Verify Recipient** - Correct email address
3. **Check Spam** - Email in spam folder
4. **Template Assigned** - Form has template selected
5. **SMTP Configured** - Workspace email settings correct

### Formatting Issues

**Problem:** Email looks wrong or broken

**Solutions:**

1. **Check Line Breaks** - Use proper formatting
2. **Test Template** - Send test email first
3. **Variable Spacing** - Ensure spaces around variables
4. **HTML Tags** - Remove if using (plain text recommended)

## Advanced Features

### Conditional Content

Show different content based on form answers:

**Not Currently Supported**

Workaround: Create multiple templates and use conditional logic to determine which notification is sent.

### Multi-Language Templates

Create templates in different languages:

**Setup:**

```
Template: "Confirmation - English"
Template: "Confirmation - Spanish"
Template: "Confirmation - French"
```

Assign template based on form language setting or user selection.

### Custom Sender

Change email sender name and address:

**Configure in:**

```
Workspace Settings → Email Settings → SMTP
```

**Options:**

* Use default ([no-reply@topformbuilder.com](mailto:no-reply@topformbuilder.com))
* Custom SMTP (your own email server)
* Your domain email

[**Need help? Contact contact@topformbuilder.com**](mailto:contact@topformbuilder.com)
