Actions3
- Template Actions
- Event Actions
Overview
This node interacts with the Klaviyo API to retrieve information about a specific email template. In the "Template" resource with the "Get One" operation, it fetches details for a single template by its ID and allows you to specify which fields to include in the response. This is useful for automating marketing workflows, synchronizing template data, or integrating template content into other systems.
Example scenarios:
- Fetching the HTML content of a specific email template for preview or editing.
- Retrieving metadata (like name, creation date) for reporting or auditing purposes.
- Integrating template details into custom dashboards or external applications.
Properties
| Name | Type | Meaning |
|---|---|---|
| Template ID | String | The unique identifier of the template to retrieve. |
| Fields | Multi-Options | Specifies which fields of the template to include in the response (e.g., HTML, Name). |
Output
The output is a JSON object containing the requested fields for the specified template. The structure will include only the fields selected in the "Fields" property. Possible fields are:
company_id: The company associated with the template.created: Timestamp when the template was created.editor_type: The type of editor used for the template.html: The HTML content of the template.name: The name of the template.text: The plain text version of the template.updated: Timestamp when the template was last updated.
Example output:
{
"company_id": "12345",
"created": "2023-01-01T12:00:00Z",
"editor_type": "drag_and_drop",
"html": "<html>...</html>",
"name": "Welcome Email",
"text": "Welcome to our service!",
"updated": "2023-02-01T15:30:00Z"
}
Note: Only the fields selected in the "Fields" property will be present.
Dependencies
- External Service: Requires access to the Klaviyo API.
- API Key: You must provide a valid Klaviyo API key via n8n credentials (
klaviyoApi). - n8n Configuration: No additional configuration required beyond setting up the credential.
Troubleshooting
Common issues:
- Invalid Template ID: If the provided Template ID does not exist, the API will return an error. Double-check the ID.
- Missing or Invalid API Key: If the API key is missing or incorrect, authentication will fail. Ensure your n8n credentials are set up correctly.
- No Fields Selected: If no fields are selected, the response may be empty or incomplete. Always select at least one field.
Error messages:
"401 Unauthorized": Check your API key and permissions."404 Not Found": The Template ID does not exist."400 Bad Request": Likely due to malformed request parameters (e.g., invalid field names).
