Templates
Returns all message templates in the account, including email and SMS templates available for reuse.
Select
The component uses the Klaviyo API to process WHERE clause conditions with the following columns and operators. Remaining filters are evaluated client-side within the component.
- Id supports the operator: =, IN
- Name supports the operators: =, IN
For example, the following queries are processed server-side:
SELECT * FROM Templates
WHERE Id = 'template-id'
SELECT * FROM Templates
WHERE Name IN ('template-1', 'template-2', 'template-3')
Insert
You can create new templates.
INSERT INTO Templates (Name, EditorType)
VALUES ('CData Template', 'CODE')
Update
You can update templates. The fields that can be updated are Name and EditorType.
UPDATE Templates
SET Name = 'CData Template version 2.0'
WHERE Id = 'template-id'
Delete
You can delete a template by specifying its Id.
DELETE FROM Templates
WHERE Id = 'template-id'
Columns
| Name | Type | ReadOnly | References | Description | |
| Id [KEY] | String | True |
The unique identifier for the template within Klaviyo. | ||
| Name | String | False |
The display name of the template as defined in Klaviyo. | ||
| EditorType | String | False |
Specifies the editor type used to create or edit the template. Supported values include SYSTEM_DRAGGABLE, SIMPLE, CODE, and USER_DRAGGABLE. | ||
| Html | String | False |
The rendered HTML version of the template used for message content. | ||
| Text | String | False |
The plain-text version of the template content. | ||
| Amp | String | False |
The Accelerated Mobile Pages (AMP) version of the template, available when AMP Email functionality is enabled in Klaviyo. | ||
| Created | Datetime | True |
The date and time when the template was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm). | ||
| Updated | Datetime | True |
The date and time when the template was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm). |