npm package: @kalnuerelis/n8n-nodes-klaviyo
Description: n8n community node for Klaviyo marketing automation API - manage profiles, lists, segments, campaigns, events, and more
Author: Community
Latest version: 0.1.0

# n8n-nodes-klaviyo

This is an n8n community node for [Klaviyo](https://www.klaviyo.com/), a marketing automation platform that helps businesses manage customer relationships through email, SMS, and other channels.

[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.

## Installation

Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.

### npm Installation

```bash
npm install n8n-nodes-klaviyo
```

### Manual Installation

To install this node manually, you'll need to:

1. Clone or download this repository
2. Run `npm install` in the package directory
3. Run `npm run build`
4. Copy the `dist` folder to your n8n custom nodes directory

## Operations

This node supports the following Klaviyo resources and operations:

### Account
- **Get** - Get account information

### Campaign
- **Create** - Create a new campaign
- **Delete** - Delete a campaign
- **Get** - Get a campaign by ID
- **Get Many** - Get multiple campaigns
- **Send** - Send a campaign
- **Update** - Update a campaign

### Coupon *(New in 2025)*
- **Create** - Create a new coupon
- **Delete** - Delete a coupon
- **Get** - Get a coupon by ID
- **Get Many** - Get multiple coupons
- **Update** - Update a coupon

### Coupon Code *(New in 2025)*
- **Create** - Create a new coupon code
- **Delete** - Delete a coupon code
- **Get** - Get a coupon code by ID
- **Get Many** - Get coupon codes for a coupon

### Event
- **Create** - Track/create a new event for a profile
- **Get** - Get an event by ID
- **Get Many** - Get multiple events with filtering

### Flow
- **Get** - Get a flow by ID
- **Get Many** - Get multiple flows
- **Update Status** - Update flow status (draft/manual/live)

### Form
- **Get** - Get a form by ID
- **Get Many** - Get multiple forms

### Image
- **Get** - Get an image by ID
- **Get Many** - Get multiple images
- **Upload** - Upload an image from URL

### List
- **Add Profiles** - Add profiles to a list
- **Create** - Create a new list
- **Delete** - Delete a list
- **Get** - Get a list by ID
- **Get Many** - Get multiple lists
- **Get Profiles** - Get profiles in a list
- **Remove Profiles** - Remove profiles from a list
- **Update** - Update a list name

### Metric
- **Get** - Get a metric by ID
- **Get Many** - Get multiple metrics
- **Query Aggregates** - Query metric aggregates for reporting and analytics

### Profile
- **Create** - Create a new profile
- **Create or Update** - Create a new profile or update if it already exists
- **Get** - Get a profile by ID
- **Get Many** - Get multiple profiles with filtering and pagination
- **Subscribe** - Subscribe profiles to a list (email/SMS marketing)
- **Suppress** - Suppress profiles from email marketing
- **Unsubscribe** - Unsubscribe profiles from marketing
- **Unsuppress** - Unsuppress profiles
- **Update** - Update an existing profile

### Review *(New in 2025)*
- **Get** - Get a review by ID
- **Get Many** - Get multiple reviews
- **Update** - Update a review (approve/reject/pending)

### Segment
- **Get** - Get a segment by ID
- **Get Many** - Get multiple segments
- **Get Profiles** - Get profiles in a segment

### Tag
- **Create** - Create a new tag
- **Delete** - Delete a tag
- **Get** - Get a tag by ID
- **Get Many** - Get multiple tags
- **Update** - Update a tag

### Template
- **Clone** - Clone an existing template
- **Create** - Create a new template
- **Delete** - Delete a template
- **Get** - Get a template by ID
- **Get Many** - Get multiple templates
- **Render** - Render a template with context variables
- **Update** - Update a template

## Credentials

You need a Klaviyo API key to use this node. To get your API key:

1. Log in to your [Klaviyo account](https://www.klaviyo.com/login)
2. Go to **Settings** > **API Keys**
3. Click **Create Private API Key**
4. Give your key a name and select the appropriate scopes
5. Copy the generated API key

### Required API Scopes

Depending on the operations you want to perform, you'll need different API scopes:

- **Account**: `accounts:read`
- **Campaigns**: `campaigns:read`, `campaigns:write`
- **Coupons**: `coupons:read`, `coupons:write`
- **Events**: `events:read`, `events:write`
- **Flows**: `flows:read`, `flows:write`
- **Forms**: `forms:read`
- **Images**: `images:read`, `images:write`
- **Lists**: `lists:read`, `lists:write`
- **Metrics**: `metrics:read`
- **Profiles**: `profiles:read`, `profiles:write`
- **Reviews**: `reviews:read`, `reviews:write`
- **Segments**: `segments:read`
- **Tags**: `tags:read`, `tags:write`
- **Templates**: `templates:read`, `templates:write`

## Usage Examples

### Track a Custom Event

Track a "Viewed Product" event for a customer:

1. Add the Klaviyo node to your workflow
2. Select **Event** as the resource
3. Select **Create** as the operation
4. Set the **Metric Name** to "Viewed Product"
5. Choose the **Profile Identifier** (e.g., Email)
6. Enter the **Profile Identifier Value** (e.g., customer@example.com)
7. Add event properties as JSON:
```json
{
  "product_name": "Blue T-Shirt",
  "product_id": "SKU-123",
  "price": 29.99,
  "category": "Apparel"
}
```

### Subscribe a Profile to a List

1. Add the Klaviyo node to your workflow
2. Select **Profile** as the resource
3. Select **Subscribe** as the operation
4. Enter the **List ID**
5. Add profiles with their email addresses
6. Enable **Email Consent** and/or **SMS Consent** as needed

### Query Metric Aggregates

Get revenue attributed to email campaigns over the last 30 days:

1. Add the Klaviyo node to your workflow
2. Select **Metric** as the resource
3. Select **Query Aggregates** as the operation
4. Enter the **Metric ID** for your revenue metric
5. Select **Sum Value** as the measurement
6. Set the date range
7. Group by **Attributed Campaign** to see per-campaign breakdown

## API Version

This node uses the Klaviyo API version `2025-10-15` (latest stable release). The API follows the JSON:API specification.

## Compatibility

- n8n version 1.0.0 or later
- Node.js 18 or later

## Resources

- [Klaviyo API Documentation](https://developers.klaviyo.com/en/reference/api_overview)
- [Klaviyo Developer Portal](https://developers.klaviyo.com/)
- [n8n Community Nodes Documentation](https://docs.n8n.io/integrations/community-nodes/)

## License

[MIT](LICENSE.md)