Summary: ◀▼
You can connect action flows to Klaviyo using an API key to automate customer profile management, event tracking, list subscriptions, and campaign creation. This integration supports creating, updating, and looking up profiles, managing lists and metrics, and handling campaigns. Use a dedicated service account for secure connections and review permissions carefully to maintain control over data and actions performed through the integration.
Connecting Klaviyo to action builder
Before you can include external actions in your action flows, you must connect the action builder to the external system.
- All external actions performed by an action flow are attributed to the user who connected the external system. Therefore, it's a best practice to use a dedicated service account rather than personal credentials when connecting to each external system.
- All integrations request access to necessary scopes. However, it's important that you review and validate the scopes before authorizing the connection to the external system.
- When managing credentials for API key-based tools, such as OpenAI, it's best to store keys in a secure vault or credential manager.
To create an API key
- Log in to your Klaviyo account.
- Go to Settings > API Keys.
- Copy the key in the format:
Klaviyo-API-Key {your_key} - Save the API key or keep the window open so you can copy and paste it into
Zendesk.
You'll need it when connecting Klaviyo to action builder.
- In Admin Center, click
Apps and integrations in the sidebar, then select Actions > Action
flows. - Create or edit an action flow.
- Open the step sidebar.
- Under External actions, click Klaviyo.
- Click Connect.
- Follow the prompts to enter your Klaviyo API key and complete the
connection. Paste the full key, including the prefix.
When you authorize the connection, you'll be redirected to Klaviyo to grant permissions to your Zendesk account.
The Klaviyo connection uses OAuth 2.0 with the authorization code grant type. Review the permissions carefully before authorizing the connection. These permissions allow action flows to create and modify pages, add comments, manage database items, and update content in your Klaviyo workspace on your behalf.
Note: All external actions performed by an action flow are attributed to the user who connected the external system. Therefore, it is a best practice to use a dedicated service account rather than personal credentials when connecting to each external system.
After you've connected to the system, you'll see an indicator that it's connected and details about the instance you're connected to, as well as the actions available for Klaviyo.
Using Klaviyo actions in action flows
Creating a profile
Use the Create profile action to create a new customer profile in Klaviyo with contact information and attributes.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Optional: Email, Phone
number, First name,
Last name,
Organization, Title,
Image URL, Address line
1, Address line 2,
City, Region/State,
Country, Zip/Postal
codePhone numbers must use E.164 format with a + sign, country code, and subscriber number with no spaces or special characters (e.g., +15551234567). |
| Output | Returns an object containing the profile ID, email, phone number, first name, last name, organization, title, image, created and updated timestamps, and location object (with address1, address2, city, region, country, zip). |
Updating a profile
Use the Update profile action to update an existing customer profile in Klaviyo with new information.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Profile IDOptional:
Phone numbers must use E.164 format with a + sign, country code, and subscriber number with no spaces or special characters (e.g., +15551234567). |
| Output | Returns an object containing the profile ID, email, phone number, first name, last name, organization, title, image, created and updated timestamps, and location object (with address1, address2, city, region, country, zip). |
Looking up a profile
Use the Lookup profile action to retrieve a single customer profile by ID, email, or phone number.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Identity profile by,
Profile identifierYou can identify profiles by ID, Email, or Phone number. The Profile identifier field becomes visible after selecting the identification method. |
| Output | Returns an object containing the profile ID, email, phone number, first name, last name, organization, title, image, created and updated timestamps, and location object (with address1, address2, city, region, country, zip). |
Creating an event
Use the Create event action in Klaviyo to trigger flows and measure engagement.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Metric name, Profile
IDOptional: Properties should be provided as key-value pairs in JSON format. Timestamp should use ISO 8601 format (e.g., 2025-01-15T14:30:00Z) and defaults to current time if not provided. |
| Output | Returns an object containing the metric name, profile ID, and properties object. |
Subscribing a profile to a list
Use the Subscribe profile to list action to add a profile to a list with optional email and SMS consent settings.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: ListOptional:
Phone numbers must use E.164 format. Email consent and SMS consent options include Yes - Subscribe to email/SMS (SUBSCRIBED) or No - Do not subscribe to email/SMS (NONE). |
| Output | Returns an object containing success status (boolean) and message. |
Removing a profile from a list
Use the Remove profile from list action to remove a profile from a specific list in Klaviyo.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: List, Profile
ID
|
| Output | Returns an object containing success status (boolean) and message. |
Looking up a list
Use the Lookup list action to retrieve details of a specific list by ID or name.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Identify list by, List
identifierYou can identify lists by ID or Name. The List identifier field becomes visible after selecting the identification method. |
| Output | Returns an object containing the list ID, name, created and updated timestamps, and opt-in process. |
Listing lists
Use the List lists action to retrieve all lists in Klaviyo with optional name filtering and pagination.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
Optional: |
| Output | Returns an object containing an array of lists (each with ID, name, created and updated timestamps, and opt-in process) and next page cursor for pagination. |
Creating lists
Use the Create list action to create a new list in Klaviyo for organizing profiles.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
Required: |
| Output | Returns an object containing the list ID, name, created and updated timestamps, and opt-in process. |
Looking up a metric
Use the Lookup metric action to retrieve details of a specific metric by ID.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
Required: |
| Output | Returns an object containing the metric ID, name, created and updated timestamps, and integration object (with ID, name, and category). |
Listing metrics
Use the List metrics action to retrieve all metrics in Klaviyo with optional filtering and pagination. Use this action to discover available event metrics for tracking customer behavior.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
Optional: |
| Output | Returns an object containing an array of metrics (each with ID, name, created and updated timestamps, and integration object with ID, name, and category) and next page cursor for pagination. |
Creating campaigns
Use the Create campaign action to create a new marketing campaign in Klaviyo with email or SMS channel.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
Required: Optional: Channel options are Email or SMS. Send strategy options include Immediate, Scheduled (static), Throttled, or Smart Send Time. Subject line is required for email campaigns. |
| Output | Returns an object containing the campaign ID, name, status, channel, created and updated timestamps, and send time. |
Looking up a campaign
Use the Lookup campaign action to retrieve details of a specific campaign by ID or name.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
Required: When searching by Name (contains), the search returns the first match. The Campaign identifier field becomes visible after selecting the identification method. |
| Output | Returns an object containing the campaign ID, name, status, channel, created and updated timestamps, send time, and archived status (boolean). |
Listing campaigns
Use the List campaigns action to retrieve campaigns in Klaviyo with optional filtering and pagination.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
Required: Optional: Status options include Draft, Scheduled, Sent, or Cancelled. Archived filter accepts Yes or No. |
| Output | Returns an object containing an array of campaigns (each with ID, name, status, channel, created and updated timestamps, send time, and archived status) and next page cursor for pagination. |