Klaviyo icon

Klaviyo

Interact with the Klaviyo API

Actions17

Overview

This node integrates with the Klaviyo API to create email templates. It allows users to define new templates by specifying their name, type, and content in various formats (HTML, plain text, AMP). This is useful for automating the creation of reusable email templates within marketing workflows, enabling dynamic and programmatic management of email designs.

Practical examples include:

  • Automatically generating a new promotional email template when launching a campaign.
  • Creating different template types (code-based or drag-and-drop) depending on user preference or automation needs.
  • Populating templates with HTML, plain text, and AMP content to support multiple email client formats.

Properties

Name Meaning
Template Name The name assigned to the new template being created.
Template Type The editor type for the template; options are: "Code" (raw HTML/CSS) or "Drag & Drop".
HTML Content The HTML markup content of the template, editable via an HTML editor interface.
Text Content The plain text version of the template content.
AMP Content The AMP (Accelerated Mobile Pages) HTML content for the template, editable via HTML editor.

Output

The node outputs JSON data representing the newly created template resource as returned by the Klaviyo API. This typically includes the template's unique identifier, attributes such as name, type, and content fields, and metadata confirming successful creation.

If the node supports binary data output (not indicated here), it would represent attachments or media related to the template, but this node focuses on JSON structured data only.

Dependencies

  • Requires an API key credential for authenticating requests to the Klaviyo API.
  • The node uses the base URL https://a.klaviyo.com/api and expects JSON API formatted requests and responses.
  • No additional external dependencies beyond the Klaviyo API and n8n's HTTP request capabilities.

Troubleshooting

  • Authentication errors: Ensure the provided API key credential is valid and has permissions to create templates.
  • Validation errors: Missing required fields like "Template Name" or invalid content formats may cause the API to reject the request.
  • API rate limits: Excessive requests might be throttled by Klaviyo; implement retry logic or reduce request frequency.
  • Content formatting issues: Improper HTML or AMP content could lead to template rendering problems; validate content before submission.

Links and References

Discussion