Skip to content

Email Templates

Create and customize email templates for invoices, booking confirmations, payment receipts, and more.

Overview

The email template editor lets you design the content of outgoing emails sent from the system. Each template type is used in a specific context — when sending an invoice, confirming a booking, or welcoming a guest. Templates support dynamic variables that are replaced with real data at send time.

Template Types

The system supports the following template types:

TypeUsed For
invoiceSending invoices via email (with PDF attachment)
booking_confirmationConfirming a reservation to the guest
payment_receiptAcknowledging a payment received
quoteSending quotations or estimates
welcome_guestWelcome message sent at check-in
checkout_summarySummary email sent at check-out
customUser-defined templates for any purpose

Each type (except custom) has a specific trigger point in the system where it can be used automatically or manually.

Template Variables

Templates use double-curly-brace syntax for dynamic content. Variables are automatically replaced with actual values when the email is sent.

Guest Variables

VariableOutput
Guest's full name
Guest's first name
Guest's last name
Guest's email address
Guest's phone number
Guest's company name

Booking Variables

VariableOutput
Booking reference code
Check-in date (formatted)
Check-out date (formatted)
Room name or number
Room type name
Total nights
Number of guests
Current booking status
Total booking amount

Invoice Variables

VariableOutput
Invoice code (e.g., INV-00042)
Date of invoice
Payment due date
Invoice grand total
Outstanding balance
Subtotal before tax
Total tax amount

Payment Variables

VariableOutput
Payment amount received
Date of payment
Payment method (Cash, UPI, etc.)
Transaction reference number

Organization Variables

VariableOutput
Organization name
Organization full address
Organization phone number
Organization email
Organization website
Organization GSTIN

Creating a Template

Step-by-Step

  1. Navigate to Settings → Email Templates
  2. Click New Template
  3. Fill in the template details:
FieldDescription
Template NameInternal name for identification (e.g., "Standard Invoice Email")
Template TypeSelect from the available types
SubjectEmail subject line (supports variables)
BodyEmail body content in HTML or rich text (supports variables)
  1. Use the variable reference panel on the right to insert variables
  2. Preview the template to verify formatting
  3. Save the template

Subject Line Example

Invoice {{invoice_number}} from {{org_name}}

Renders as: Invoice INV-00042 from Grand Hotel

Body Example

html
<p>Dear {{guest_name}},</p>

<p>Thank you for choosing {{org_name}}. Please find your invoice
<strong>{{invoice_number}}</strong> attached to this email.</p>

<p><strong>Invoice Details:</strong></p>
<ul>
  <li>Invoice Date: {{invoice_date}}</li>
  <li>Total Amount: {{invoice_total}}</li>
  <li>Due Date: {{invoice_due_date}}</li>
  <li>Balance Due: {{invoice_balance}}</li>
</ul>

<p>If you have any questions, please contact us at {{org_email}}
or {{org_phone}}.</p>

<p>Thank you,<br>{{org_name}}</p>

Custom Templates

The custom template type allows you to create templates for any email purpose not covered by the built-in types. Custom templates:

  • Can use all available variables
  • Are not tied to any automatic trigger
  • Can be selected manually when composing an email
  • Useful for marketing emails, special offers, seasonal greetings, etc.

Setting Defaults

Each template type can have one default template that is automatically used when sending that type of email.

Setting a Default

  1. Open the template you want to set as default
  2. Click Set as Default
  3. The template is now marked with a default badge

If no default is set for a type, the system will prompt you to select a template each time.

TIP

You can have multiple templates of the same type (e.g., several invoice templates for different scenarios) but only one can be the default.

Preview Functionality

The template editor includes a Preview mode that shows how the email will look with sample data:

  1. Open a template in the editor
  2. Click Preview
  3. The system fills in all variables with sample data:
    • Guest name: "John Doe"
    • Invoice number: "INV-00001"
    • Organization name: Your actual org name
    • Dates: Current date
    • Amounts: Sample amounts
  4. Review the rendered HTML output
  5. Switch back to Edit mode to make changes

Preview uses your actual organization details but placeholder data for guest and transaction fields.

Integration with Gmail Sending

Email templates integrate directly with the Gmail sending flow:

Sending Flow

  1. Trigger: User clicks "Send" on an invoice, booking, or other record
  2. Template Selection: System loads the default template for that type (or prompts user to choose)
  3. Variable Replacement: All are replaced with actual data from the record
  4. Compose: The rendered email is shown in a compose dialog for review
  5. Attachments: Relevant attachments (e.g., invoice PDF) are added automatically
  6. Send: Email is sent via the connected Gmail account using OAuth2

Customization at Send Time

Even after template rendering, you can customize the email before sending:

  • Edit the subject line
  • Modify the body text
  • Add or remove recipients (To, CC, BCC)
  • Add additional attachments

Prerequisites

Gmail sending requires a connected Gmail account. See Integrations → Gmail OAuth2 Setup for configuration.

Best Practices

  • Keep templates concise — guests prefer short, clear emails
  • Always include key information — invoice number, amounts, dates
  • Use your organization variables — ensures branding stays consistent even if details change
  • Test with Preview before setting a template as default
  • Create type-specific templates — a booking confirmation has different needs than an invoice email
  • Include contact information — use and so guests can reach you

Permissions

Email template management is controlled by the Email Templates RBAC module:

PermissionAccess
ViewBrowse and preview templates
CreateCreate new templates
UpdateEdit existing templates, set defaults
DeleteRemove templates
ManageFull access to all template operations

Released under the MIT License.