Klaviyo icon

Klaviyo

Interact with the Klaviyo API

Actions17

Overview

This node interacts with the Klaviyo API to retrieve multiple event records based on specified criteria. It is useful for workflows that need to fetch batches of event data for analysis, reporting, or triggering downstream processes. For example, you might use it to pull recent user activity events filtered by specific metrics or profiles, sorted by date, and including related metric or profile details.

Properties

Name Meaning
Page Cursor A cursor string used for pagination to fetch the next page of results.
Page Size Number of events to retrieve per request (between 1 and 200).
Sort The order in which events are returned. Options: datetime (Oldest First), datetime (Newest First), timestamp (Oldest First), timestamp (Newest First).
Filters Conditions to filter events by fields or date. You can filter by metric_id or profile_id with exact matches, and by date using operators like greater-than, less-than, etc.
Event Fields Which event properties to include in the response. Options include datetime, event_properties, timestamp, and uuid.
Additional Resources Related resources to include with each event, such as metric or profile.
Metric Fields If including metric resource, specify which metric fields to return, e.g., name, created, updated, integration.
Profile Fields If including profile resource, specify which profile fields to return, e.g., email, phone_number, first_name, last_name, location, and others.

Output

The node outputs JSON data representing a list of events matching the query parameters. Each event object includes the requested event fields and optionally embedded related metric and profile data if those additional resources were requested. The output structure aligns with the Klaviyo API's JSON:API format for events.

If binary data were supported (not indicated here), it would typically represent attachments or media related to events, but this node focuses on JSON event data only.

Dependencies

  • Requires an API key credential for authenticating with the Klaviyo API.
  • Network access to https://a.klaviyo.com/api.
  • Proper configuration of the API key credential within n8n.

Troubleshooting

  • Common issues:

    • Invalid or missing API key will cause authentication errors.
    • Exceeding the maximum page size (over 200) will result in validation errors.
    • Incorrect filter syntax or unsupported filter fields may cause the API to reject the request.
    • Requesting fields in metricFields or profileFields without including the corresponding resource in Additional Resources will not return those fields.
  • Error messages:

    • Authentication failures: Check that the API key credential is correctly set up and valid.
    • Validation errors on filters or pagination: Verify that filter values and pagination parameters conform to allowed formats and ranges.
    • Empty responses: Confirm that filters are not too restrictive and that there is data matching the criteria.

Links and References

Discussion