Klaviyo icon

Klaviyo

Interact with the Klaviyo API

Actions17

Overview

This node integrates with the Klaviyo API to create or update user profiles. It allows you to send user attributes such as email, phone number, external ID, and other personal or location details to Klaviyo, which is useful for customer segmentation, personalized marketing, and tracking user behavior.

Common scenarios include:

  • Adding new users to your Klaviyo account.
  • Updating existing user profiles with new information.
  • Synchronizing user data from other systems into Klaviyo for targeted campaigns.

For example, you might use this node to update a user's profile after they register on your website, providing their email and location details to enable personalized email marketing.

Properties

Name Meaning
One or more of the following are required: email, phone number, or external ID A notice indicating that at least one of these identifiers must be provided to create or update a profile.
Attributes A collection of key-value pairs representing user attributes. Keys can be selected from predefined options such as email, phone number, external ID, first name, last name, organization, locale, title, image, created, updated, last event date, and various location fields (address, city, country, latitude, longitude, region, zip, timezone, IP). Values are strings corresponding to each key.
Properties Additional custom key-value pairs where both key and value are free-form strings, allowing for flexible attribute definitions beyond the predefined keys.

Output

The node outputs JSON data representing the created or updated profile in Klaviyo. The output includes the profile's attributes as sent to the API, confirming the successful creation or update.

If the node supports binary data output, it would typically represent files or images related to the profile, but based on the provided code and properties, this node focuses on JSON profile data only.

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 within n8n is necessary for successful requests.

Troubleshooting

  • Missing Required Identifiers: If none of email, phone number, or external ID is provided, the API will likely reject the request. Ensure at least one of these is included in the attributes.
  • Invalid Attribute Keys: Using keys not recognized by Klaviyo may cause errors or ignored fields. Stick to the predefined keys or valid custom keys.
  • Authentication Errors: Incorrect or missing API key credentials will result in authorization failures. Verify the API key is correctly set up in n8n.
  • API Rate Limits: Excessive requests may trigger rate limiting by Klaviyo. Implement retry logic or reduce request frequency if needed.

Links and References

Discussion