Klaviyo icon

Klaviyo

Interact with the Klaviyo API

Actions17

Overview

The node integrates with the Klaviyo API to retrieve data about Custom Metrics. Specifically, the "Get Many" operation for the "Custom Metric" resource fetches multiple custom metrics from a Klaviyo account. This is useful for scenarios where users want to analyze or report on various custom metrics defined in their Klaviyo environment, such as tracking marketing campaign performance or customer behavior metrics.

Practical examples include:

  • Fetching a list of all custom metrics with selected fields to display in a dashboard.
  • Retrieving custom metrics along with related metric details for deeper analysis.
  • Automating reports that require up-to-date custom metric data from Klaviyo.

Properties

Name Meaning
Custom Metric Fields Select which fields of the custom metrics to retrieve. Options: name, created, updated, definition, definition.aggregation_method, definition.metric_groups. This controls the specific data returned for each custom metric.
Additional Resources Choose additional related resources to include in the response. Currently supports: metrics. Including these enriches the output with linked data.
Metric Fields When including the metrics additional resource, select which fields of those metrics to return. Options: name, created, updated, integration.

Output

The node outputs JSON data representing an array of custom metrics, each containing the requested fields specified by the user. If additional resources like metrics are included, the output will also contain nested objects with the selected metric fields.

The structure of each custom metric object depends on the selected fields but generally includes identifiers, timestamps (created, updated), and detailed definitions (such as aggregation methods and metric groups).

No binary data output is involved in this operation.

Dependencies

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

Troubleshooting

  • Common Issues:

    • Missing or invalid API key: The node will fail to authenticate, resulting in authorization errors.
    • Requesting fields without proper inclusion: For example, selecting metricFields without including metrics in Additional Resources will not return metric data.
    • Network connectivity issues can cause request failures.
  • Error Messages:

    • Authorization errors typically indicate problems with the API key; verify the key and permissions.
    • Validation errors may occur if unsupported fields are requested; ensure only valid fields are selected.
    • Rate limiting errors from Klaviyo API might require implementing retry logic or reducing request frequency.

Links and References

Discussion