Klaviyo icon

Klaviyo

Interact with the Klaviyo API

Actions17

Overview

The node provides integration with the Klaviyo API, specifically allowing users to retrieve detailed information about a single Custom Metric within their Klaviyo account. This operation is useful for scenarios where you want to fetch metadata or configuration details of a specific custom metric by its ID, such as for reporting, monitoring, or further processing in an automation workflow.

Practical examples include:

  • Fetching a custom metric's definition and aggregation method to understand how data is being collected.
  • Retrieving timestamps like creation and last update dates for audit purposes.
  • Including related metrics data to enrich the output with associated metric details.

Properties

Name Meaning
Custom Metric ID The unique identifier of the custom metric you want to retrieve. This is required to specify which metric to get.
Custom Metric Fields Select which fields of the custom metric to return. Options include: name, created, updated, definition, definition.aggregation_method, definition.metric_groups.
Additional Resources Optionally include related resources in the response. Currently supports including "metrics" related to the custom metric.
Metric Fields When including "metrics" as an additional resource, select which fields of those metrics to return. Options include: name, created, updated, integration.

Output

The node outputs JSON data representing the requested custom metric object. The structure includes the selected fields specified in the input properties, such as the metric's name, creation date, update date, and detailed definition including aggregation methods and metric groups.

If additional resources are included (e.g., related metrics), these will be nested within the output under appropriate keys, containing the selected fields for those related objects.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authenticating with the Klaviyo API.
  • The node communicates with the Klaviyo API endpoint at https://a.klaviyo.com/api.
  • Proper configuration of the API key credential in n8n is necessary for successful requests.

Troubleshooting

  • Invalid or missing Custom Metric ID: If the provided ID does not exist or is malformed, the API will likely return an error indicating the resource was not found. Verify the ID is correct.
  • Insufficient permissions or invalid API key: Authentication errors may occur if the API key is invalid or lacks access rights. Ensure the API key is valid and has permission to read custom metrics.
  • Empty or incomplete field selection: If no fields are selected for the custom metric or included metrics, the response might be empty or lack expected data. Always select at least one field to retrieve meaningful results.
  • Including metrics without selecting metric fields: If "metrics" is included as an additional resource but no metric fields are selected, the related metrics data may be incomplete or missing.

Links and References

Discussion