---
sourceDocument: Xanadu ServiceNow AI Platform Administration
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/platform-administration

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu ServiceNow AI Platform Administration

ft:clusterId :

    - platadm

bundleId :

    - platadm

workflow :

    - Platform


---

# Construct an email message with a template

# Construct an email message with a template {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Email templates provide a list of the fields from database tables that are available
for constructing an email message.
An email template can include a mailto automatic response link,
which enables the email recipient to simply choose a link that sends a preformatted response
back to the instance. An example is the email template used for notification that an
approval is required. The following example shows the base email:  
Figure 1. Email notification with the template specified In this case, when a change request approval is requested, an update is made to the
`sysapproval_approval` table. The "approval events" business rule is then
executed, which creates the "approval.inserted" event. The "Approval Request" email event is
defined to process the approval.inserted event, and this email event is defined to use the
following change.itil.approve.role email template. Notice that this template has two mailto:
items specified. One for "mailto.approval" and one for "mailto.rejection." This email
template builds an automatic response that lets the email receiver simply click a link in
the email to either approve or reject the change request.

Here is what the change.itil.approve.role template looks like using
the rich HTML editor:  
Figure 2. change.itil.approve.role template

The selection list on the right shows the available fields from the
`sysapproval_approver` table.

Notice the change.itil.approve.role template also uses a predefined
email layout (Unsubscribe and Preferences), which provides links for the recipient to
unsubscribe from approval notifications and set notification preferences.

And here is the mailto.approval template:  
Figure 3. mailto approval template  
Note:  
If you put text on the lines following the Click here to approve ${sysapproval} line, this text forms the actual body of the email. The combination of templates used would generate an email similar to the following example:  
Figure 4. Template generated email message

Notice that the email recipient can use the following links in the mail:

* A link to view all the details of the change request
* A link to view the approval record
* A link that generates an automatic email response to approve the change
* A link that generates an automatic email response to reject the change
* A link to unsubscribe from approval notifications and another link to set notification preferences
* **[Add blank lines in an email template](https://servicenow-prod.fluidtopics.net/v3TnqS8qIcRKVkuRJ18AwQ)**   
  You can easily add blank lines in an email template using HTML tags.

**Related concepts**   

* [Email layouts](https://servicenow-prod.fluidtopics.net/x5fARNzjadceeKnQXiylrQ "Create reusable content for the message body of email templates.")

