Falaah Falaah AI

Email Templates

Customize system email templates to match your brand and communication style. Edit subject lines, body content, and styling for all automated emails.

Email Templates let you customize the automated emails Muin sends on your behalf. From welcome messages to payment notifications, you can tailor every email to match your brand voice and include the information your recipients need.

Accessing Email Templates

Navigate to SettingsEmail Templates to view and customize templates. Admin or Owner role required.


Understanding Templates

Template Types

Muin uses email templates for various automated communications:

Category Templates Purpose
Account Welcome, Password Reset, Email Verification, Invitation User account lifecycle
Vendor Vendor Invited, Invoice Approved, Payment Sent Vendor portal communications
HR Onboarding Welcome, Document Request Employee communications
Billing Subscription Created, Payment Failed Subscription and billing
Collaboration Document Shared, Comment Added, Task Assigned Team notifications
System Maintenance Notice, Security Alert, Export Ready System notifications

System vs Custom Templates

Type Description Editing
System Default templates provided by Muin Read-only, copy to customize
Custom Your organization’s customized versions Full editing

When you customize a template, your version takes precedence over the system default.


Viewing Templates

Template List

The main view shows all available templates organized by category:

  • Template Name: Human-readable name
  • Category: Template type (Account, Vendor, etc.)
  • Status: Active or Inactive
  • Version: Current version number
  • Last Modified: When template was last changed

Use the controls to find templates:

  • Search: Find by name or content
  • Category Filter: Show only specific categories
  • Status Filter: Active, Inactive, or All

Editing Templates

Opening the Editor

  1. Click on any template row to open the editor
  2. Or click the Edit button on the template card

Editor Sections

Section Purpose
Subject Line Email subject with variable support
Plain Text Body Text-only version (required)
HTML Body Rich HTML version (optional)
Variables Available placeholders for dynamic content
Preview Live preview with sample data

Template Variables

Templates use Jinja2 syntax for dynamic content:

Hello {{ user_name }},

Your invoice {{ invoice_number }} for {{ invoice_amount }} has been approved.

Common variables available in most templates:

Variable Description Example
{{ user_name }} Recipient’s name “Sarah Johnson”
{{ company_name }} Your organization name “Acme Corp”
{{ login_url }} Link to log in https://muin.falaah.ai/login

Variable Documentation

Each template shows its available variables in the Variables panel. Hover over any variable to see:

  • Description of what it contains
  • Data type (text, URL, date, etc.)
  • Whether it’s required or optional
  • Example value

Conditional Content

Use Jinja2 conditionals for optional content:

{% if share_message %}
Message from {{ sharer_name }}: "{{ share_message }}"
{% endif %}

HTML Styling

Supported HTML

Email HTML supports a subset of web features:

Supported Not Supported
Inline styles External CSS
Tables for layout Flexbox, Grid
Basic images JavaScript
Links Forms

Style Guidelines

For maximum compatibility:

<!-- Use inline styles -->
<p style="font-family: Arial, sans-serif; color: #333;">
  Your text here
</p>

<!-- Use tables for layout -->
<table style="max-width: 600px; margin: 0 auto;">
  <tr>
    <td style="padding: 20px;">
      Content here
    </td>
  </tr>
</table>

<!-- Buttons with fallback -->
<a href="{{ action_url }}"
   style="background-color: #2563eb;
          color: white;
          padding: 12px 24px;
          text-decoration: none;
          border-radius: 6px;">
  Click Here
</a>

Color Recommendations

Element Recommended Hex
Primary buttons Blue #2563eb
Success messages Green #16a34a
Warning notices Amber #f59e0b
Error/Urgent Red #dc2626
Body text Dark gray #333333
Secondary text Medium gray #666666

Preview and Testing

Live Preview

The editor shows a real-time preview as you type. The preview uses sample data so you can see how the email will look.

Sending Test Emails

  1. Click Send Test in the editor
  2. Enter a recipient email address
  3. Click Send
  4. Check your inbox for the test email

Test emails are marked [TEST] in the subject line and use sample variable values.

Mobile Preview

Toggle between desktop and mobile preview to see how your email renders on different devices.


Version History

Why Versioning?

Every edit creates a new version. This allows you to:

  • Track changes over time
  • Understand who made changes
  • Rollback to previous versions if needed

Viewing History

  1. Open any template in the editor
  2. Click the History tab or clock icon
  3. See all previous versions with:
    • Version number
    • Date changed
    • Who made the change
    • Change notes (if provided)

Rolling Back

To restore a previous version:

  1. Open the template’s version history
  2. Find the version you want
  3. Click Restore
  4. Confirm the rollback

This creates a new version based on the old content—history is preserved.


Template Categories

Account Templates

Template Trigger Key Variables
Welcome User account created user_name, login_url
Password Reset Password reset requested reset_url, expiry_hours
Email Verification Email verification needed verification_url
Invitation User invited to team inviter_name, invitation_url

Vendor Templates

Template Trigger Key Variables
Vendor Invited Vendor invited to portal vendor_company_name, portal_url
Invoice Approved Invoice approved for payment invoice_number, payment_date
Payment Sent Payment processed payment_amount, payment_reference

HR Templates

Template Trigger Key Variables
Onboarding Welcome New employee added start_date, manager_name
Document Request HR requests documents document_type, due_date

Billing Templates

Template Trigger Key Variables
Subscription Created New subscription plan_name, billing_period
Payment Failed Payment unsuccessful failure_reason, update_payment_url

Collaboration Templates

Template Trigger Key Variables
Document Shared Someone shares a document sharer_name, document_name
Comment Added New comment on followed item commenter_name, comment_preview
Task Assigned Task assigned to user task_name, due_date

System Templates

Template Trigger Key Variables
System Maintenance Scheduled maintenance maintenance_date, start_time
Security Alert Security event detected alert_type, device, location
Export Ready Data export completed export_type, download_url

Best Practices

Writing Effective Emails

Be clear and concise:

  • Lead with the most important information
  • Use simple, direct language
  • Keep paragraphs short (2-3 sentences)

Provide context:

  • Explain why the recipient is receiving this email
  • Include relevant details (dates, amounts, names)
  • Offer next steps or actions

Maintain brand consistency:

  • Use your company name consistently
  • Match your brand’s tone (formal, friendly, etc.)
  • Use consistent formatting across templates

Subject Lines

Do Don’t
Be specific: “Invoice #1234 Approved” Be vague: “Update”
Include action: “Action Required: Verify Email” Use ALL CAPS
Keep under 50 characters Use excessive punctuation!!!

Call-to-Action Buttons

  • Use action verbs: “View Invoice”, “Reset Password”
  • Limit to 1-2 buttons per email
  • Make buttons large enough to tap on mobile (44px minimum height)
  • Use contrasting colors for visibility

Permissions

Action Required Role
View templates Admin, Owner
Edit templates Admin, Owner
Send test emails Admin, Owner
Restore versions Admin, Owner

Troubleshooting

Template Not Saving

  1. Check for required fields (subject, plain text body)
  2. Verify all variables use correct syntax: {{ variable_name }}
  3. Check for unclosed Jinja2 tags
  4. Try a smaller change to isolate the issue

Variables Not Rendering

  1. Verify variable spelling matches exactly
  2. Check variable is available for this template type
  3. Ensure variable has a value (use conditionals for optional data)

HTML Not Displaying Correctly

  1. Use inline styles, not external CSS
  2. Test in multiple email clients
  3. Include a plain text version as fallback
  4. Avoid complex layouts—use simple tables

Test Email Not Received

  1. Check spam/junk folder
  2. Verify the email address is correct
  3. Check your email server isn’t blocking Muin
  4. Wait a few minutes—some providers have delays