Skip to main content

Klaviyo Connector

Klaviyo Klaviyo is a cloud-based email marketing solution that enables e-commerce businesses to create, send, and analyze email and SMS campaigns.

This component provides the ability to manage templates, campaigns, events, profiles, lists, segments, and images.

API Documentation​

The component was built using the Klaviyo API Reference.

Connections​

API Key​

Authenticate using an API key.

API key authentication is deprecated. Use OAuth 2.0 for new integrations. See the Klaviyo migration guide for details.

Prerequisites​

  • A Klaviyo account with an existing private API key.

Setup Steps​

  1. Log into Klaviyo and navigate to Settings > API Keys.
  2. Copy the private API key.

Configure the Connection​

Create a connection of type API Key.

FieldDescription
API KeyThe private API key from Klaviyo.
InputCommentsDefault
API KeyAPI key for Klaviyo.

OAuth 2.0​

Authenticate using OAuth 2.0.

OAuth configuration requires setting up an app in Klaviyo. See the Set up OAuth guide for more information.

Prerequisites​

  • A Klaviyo account with access to the Manage apps page.

Setup Steps​

  1. Log into Klaviyo and navigate to the Manage apps page.
  2. Select Create App.
  3. Name the app and copy the Client ID and Client Secret.
  4. Select Save and continue to proceed.
  5. Enter the following into the Redirect URL field: https://oauth2.integrations.acme.com/callback and save.
  6. Select Review Submission to submit the app for completion.

Configure the Connection​

Create a connection of type OAuth 2.0.

FieldDescription
ScopesSpace-separated list of OAuth scopes, if needed.
Client IDThe Client ID from the Klaviyo app.
Client secretThe Client secret from the Klaviyo app.

This connection uses OAuth 2.0, a common authentication mechanism for integrations. Read about how OAuth 2.0 works here.

InputCommentsDefault
ScopesSpace separated list of scopes if needed
Client IDThe Client ID from the Klaviyo OAuth application.
Client SecretThe Client Secret from the Klaviyo OAuth application.

Triggers​

New and Updated Campaigns​

Retrieves existing and ongoing campaigns for a specified Klaviyo message channel. Load history once, check for changes on a schedule, or both.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Message ChannelKlaviyo requires a channel filter to list campaigns. Select which channel's campaigns the trigger should return.
Look-back DateThe date the initial sync starts from, in YYYY-MM-DD format. Cannot be a future date. Leave empty to start from the first recurrence with no backfill. When set, the initial sync seeds each record modified on or after this date once.
Show New RecordsWhen true, newly created records are included in the trigger output.true
Show Updated RecordsWhen true, records updated since the last poll are included in the trigger output.true

New and Updated Profiles and Lists​

Retrieves existing and ongoing profiles and lists in Klaviyo. Load history once, check for changes on a schedule, or both.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Resource TypeThe type of resource to poll for new and updated records.
Look-back DateThe date the initial sync starts from, in YYYY-MM-DD format. Cannot be a future date. Leave empty to start from the first recurrence with no backfill. When set, the initial sync seeds each record modified on or after this date once.
Show New RecordsWhen true, newly created records are included in the trigger output.true
Show Updated RecordsWhen true, records updated since the last poll are included in the trigger output.true

Actions​

Bulk Create Events​

Create a batch of events for one or more profiles.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Events ArrayAn array of events to create.

Create Campaign​

Creates a campaign given a set of parameters, then returns it.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Campaign NameA display name to identify the campaign.
Campaign MessagesThe message(s) to send in the campaign.
Included AudiencesThe IDs of lists or segments to receive the campaign.
Excluded AudiencesThe IDs of lists or segments to exclude from the campaign.
Campaign ConfigurationTracking options, send options, and send strategy.
Tracking OptionsUTM parameters, click tracking, and open tracking configuration. Provide as a JSON object.
Send OptionsSmart-sending and related delivery preferences. Provide as a JSON object.
Send StrategyScheduling method and timing for campaign delivery. Provide as a JSON object.

Create Event​

Create a new event to track a profiles activity.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Event NameThe metric name that identifies this event type.
Event ProfileThe profile associated with this event.
Event PropertiesA JSON object of custom key-value pairs to attach to the event.
Event DetailsTimestamp, monetary value, currency, and unique ID for the event.
Event TimeWhen this event occurred. By default, the time the request was received will be used.
Event ValueA numeric, monetary value to associate with this event.
Event Value CurrencyThe ISO 4217 currency code of the value associated with the event.
Event Unique IDA unique identifier for this event.

Create List​

Create a new list.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
List NameA helpful name to label the list.

Create Profile​

Create a new profile.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Contact InformationEmail, phone, and other contact channel details.
EmailThe primary email address used to reach this profile.
Phone NumberIndividual's phone number in E.164 format.
First NameThe given name of the profile contact.
Last NameThe family name of the profile contact.
Additional FieldsAdditional optional fields: includes External ID, Organization, Title, Image, Location, and Properties.
External IDA unique identifier used by customers to associate Klaviyo profiles with profiles in an external system, such as a point-of-sale system. Format varies based on the external system.
OrganizationName of the company or organization within the company for whom the individual works
TitleThe job title or role at the individual's organization.
ImageURL pointing to the location of a profile image.
LocationLocation information for the profile.
PropertiesAn object containing key/value pairs for any custom properties assigned to this profile.

Create Segment​

Create a segment.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Segment NameA display name to identify the segment.
Segment Condition GroupsThe condition groups that define the segment.
Is Starred SegmentWhen true, pins the segment to the top of the segments list in the Klaviyo UI.false

Create Template​

Create a new custom HTML template.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Template NameA display name to identify the template.
Editor TypeThe editor used to author the template. Currently only CODE is supported.
Template HTMLThe HTML markup rendered to recipients.
Template TextThe plain-text fallback shown when HTML cannot be rendered.

Delete Campaign​

Delete a campaign with the given campaign ID.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Campaign IDThe unique identifier for the campaign.

Delete List​

Delete a list with the given list ID.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
List IDThe unique identifier of the list.

Delete Segment​

Delete a segment with the given segment ID.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Segment IDThe unique identifier for the segment.

Delete Template​

Delete a template with the given template ID.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Template IDThe unique identifier for the template.

Get Account​

Retrieve a single account object by its account ID.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Account IDThe unique identifier for the account.
FieldsThe fields to include in the response.

Get Campaign​

Returns a specific campaign based on a required id.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Campaign IDThe unique identifier for the campaign.
FieldsThe fields to include in the response.

Get Event​

Get an event with the given event ID.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Event IDThe unique identifier for the event.
Event FieldsEvent fields to include in the response.
Metric FieldsMetric fields to include in the response.
Profile FieldsProfile fields to include in the response.

Get Image​

Get the image with the given image ID.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Image IDThe unique identifier for the image.
FieldsThe fields to include in the response.

Get List​

Get a list with the given list ID.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
List IDThe unique identifier of the list.
FieldsThe fields to include in the response.

Get Profile​

Get the profile with the given profile ID.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Profile IDUnique identifier for the profile.
FieldsThe fields to include in the response.
Additional Profile FieldsRequest additional fields not included by default in the response.

Get Segment​

Get a segment with the given segment ID.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Segment IDThe unique identifier for the segment.
FieldsThe fields to include in the response.

Get Template​

Get a template with the given template ID.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Template IDThe unique identifier for the template.
FieldsThe fields to include in the response.

List Accounts​

Retrieve the account(s) associated with a given private API key.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
FieldsThe fields to include in the response.

List Campaigns​

Returns some or all campaigns based on filters.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Filter CampaignsA Klaviyo JSON:API filter expression to narrow the campaign list.
FieldsThe fields to include in the response.

List Events​

Get all events in an account.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Event FieldsEvent fields to include in the response.
Metric FieldsMetric fields to include in the response.
Profile FieldsProfile fields to include in the response.

List Images​

Get all images in an account.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
FieldsThe fields to include in the response.

List List Profiles​

Get all profiles within a list with the given list ID.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
List IDThe unique identifier of the list.
Additional Profile FieldsRequest additional fields not included by default in the response.
FieldsThe fields to include in the response.

List Lists​

Get all lists in an account.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
FieldsThe fields to include in the response.

List Profiles​

Get all profiles in an account.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
FieldsThe fields to include in the response.
Additional Profile FieldsRequest additional fields not included by default in the response.

List Segments​

Get all segments in an account.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
FieldsThe fields to include in the response.

List Templates​

Get all templates in an account.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
FieldsThe fields to include in the response.

Raw Request​

Send raw HTTP request to Klaviyo.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Exclude AuthorizationExclude the Authorization header from the request. Turn this on and include the company_id query param when calling public endpoints (/client).false
URLInput the path only (/api/accounts), The base URL is already included (https://a.klaviyo.com). For example, to connect to https://a.klaviyo.com/api/accounts, only /api/accounts is entered in this field.
MethodThe HTTP method to use.
DataThe HTTP body payload to send to the URL.
Form DataThe Form Data to be sent as a multipart form upload.
File DataFile Data to be sent as a multipart form upload.
File Data File NamesFile names to apply to the file data inputs. Keys must match the file data keys above.
Query ParameterA list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.
HeaderA list of headers to send with the request.
Response TypeThe type of data you expect in the response. You can request json, text, or binary data.json
TimeoutThe maximum time that a client will await a response to its request
Retry Delay (ms)The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled.0
Retry On All ErrorsIf true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors.false
Max Retry CountThe maximum number of retries to attempt. Specify 0 for no retries.0
Use Exponential BackoffSpecifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored.false

Subscribe Profiles​

Subscribe one or more profiles to email marketing, SMS marketing, or both.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
ProfilesArray of profiles to subscribe.

Unsubscribe Profiles​

Unsubscribe one or more profiles to email marketing, SMS marketing, or both.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
ProfilesArray of profiles to unsubscribe.

Update Campaign​

Update a campaign with the given campaign ID.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Campaign IDThe unique identifier for the campaign.
Campaign NameA display name to identify the campaign.
Included AudiencesThe IDs of lists or segments to receive the campaign.
Excluded AudiencesThe IDs of lists or segments to exclude from the campaign.
Campaign ConfigurationTracking options, send options, and send strategy.
Tracking OptionsUTM parameters, click tracking, and open tracking configuration. Provide as a JSON object.
Send OptionsSmart-sending and related delivery preferences. Provide as a JSON object.
Send StrategyScheduling method and timing for campaign delivery. Provide as a JSON object.

Update Image​

Update the image with the given image ID.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Image IDThe unique identifier for the image.
Image NameA name for the image. Defaults to the filename if not provided. If the name matches an existing image, a suffix will be added.
Image HiddenControls whether the image is hidden in the image library.

Update List​

Update the name of a list with the given list ID.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
List IDThe unique identifier of the list.
List NameA helpful name to label the list.

Update Profile​

Update the profile with the given profile ID.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Profile IDUnique identifier for the profile.
Contact InformationEmail, phone, and other contact channel details.
EmailThe primary email address used to reach this profile.
Phone NumberIndividual's phone number in E.164 format.
First NameThe given name of the profile contact.
Last NameThe family name of the profile contact.
Additional FieldsAdditional optional fields: includes External ID, Organization, Title, Image, Location, and Properties.
External IDA unique identifier used by customers to associate Klaviyo profiles with profiles in an external system, such as a point-of-sale system. Format varies based on the external system.
OrganizationName of the company or organization within the company for whom the individual works
TitleThe job title or role at the individual's organization.
ImageURL pointing to the location of a profile image.
LocationLocation information for the profile.
PropertiesAn object containing key/value pairs for any custom properties assigned to this profile.

Update Segment​

Update a segment with the given segment ID.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Segment IDThe unique identifier for the segment.
Segment NameA display name to identify the segment.
Segment Condition GroupsThe condition groups that define the segment.
Is Starred SegmentWhen true, pins the segment to the top of the segments list in the Klaviyo UI.

Update Template​

Update a template with the given template ID.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Template IDThe unique identifier for the template.
Template NameA display name to identify the template.
Template HTMLThe HTML markup rendered to recipients.
Template TextThe plain-text fallback shown when HTML cannot be rendered.

Upload Image​

Import an image from a url or file.

InputCommentsDefault
ConnectionThe Klaviyo connection to use.
Image URLAn existing image url to import the image from. Alternatively, you may specify a base-64 encoded data-uri (data:image/...). Supported image formats: jpeg,png,gif. Maximum image size: 5MB. Use this field or File Data.
Image NameA name for the image. Defaults to the filename if not provided. If the name matches an existing image, a suffix will be added.
File DataThe contents to write to a file. Binary data generated from a previous step.