Customize contents using HTML templates as described in the following sections:

See also Using templates in a bot.

Customizing content using an HTML template

When configuring a Send an email, Call a webhook, or Create a new file task, customize content using an HTML template by performing one of the following tasks:

For information about customizing the template, see Customizing content using templates and the tips provided below.

Viewing the template

After creating or selecting the template, click View adjacent to the template property to view the template.

Editing the template

To edit the template:

  1. Download the template file from your data source to your computer.

  2. Edit the template file on your computer using the text editor of your choice.

  3. Upload the edited template file from your computer to your data source.

Manually creating an HTML template

Manually create an HTML template file by creating an empty text file, entering valid HTML, and saving the file using an .html extension.

Template variables like <<FirstName>> must be HTML encoded. For example, the < character is HTML encoded as &lt; and the > character is HTML encoded as &gt;.

The following provides an example HTML file with HTML encoding:

<p>UpdateMode: &lt;&lt;_UPDATEMODE&gt;&gt;</p>
<p>Application: &lt;&lt;_APPNAME&gt;&gt;</p>
<p>TableName: &lt;&lt;_TABLENAME&gt;&gt;</p>
<p>UserName: &lt;&lt;_USERNAME&gt;&gt;</p>
<p>LastName: &lt;&lt;[LastName]&gt;&gt;</p>
<p>FirstName: &lt;&lt;[FirstName]&gt;&gt;</p>
<p>Age: &lt;&lt;[Age]&gt;&gt;</p>
<p>Computed Total: &lt;&lt;[Qty]*[Price]&gt;&gt;</p>
<p>ComputedName: &lt;&lt;[_ComputedName]&gt;&gt;</p>

After the template file is saved to your computer, upload it to one of the data sources described in Configuring the data sources for storing templates.

For example, you can upload the template file to Google Drive, as follows.

  1. Ensure that the Convert uploaded files to Google Docs editor format option is disabled as described in Uploading .txt templates to Google Drive.

  2. Open Google Drive and navigate to the Google Drive folder where you wish to upload the file.

  3. Click New and then click File upload.

  4. When the file open dialog appears, navigate to the template file on your computer, select the file, and click Open.

After the template file is uploaded, use it as described in Using an existing template.

Each time you modify the HTML template you must upload the template file to Google Drive. Google Drive will retain the original DocId. AppSheet will use the last uploaded version of the template file as the attachment template.

Did this answer your question?