Klaviyo
Create profiles, manage lists, and track events in Klaviyo.
On this page
Connect
Auth type: API key (secret_text). Paste the API key (or token) from the provider's settings into the connect dialog. It is encrypted at rest and only decrypted on the server when an action runs.
- In the editor: Backend panel, Integrations tab, then Connect. This connects it for the project.
- For every project in a workspace: Workspace settings, Integrations.
- Owners and admins choose which integrations members may connect in the admin panel (Integrations tab), and can attach their own OAuth app there.
Call it from a workflow
Pass the action name and its input. The call resolves with { success, output, error? }; a missing connection resolves with success false and the reason. See ctx.integrations.invoke and ctx.integrations.call.
// .workflow.js (native ctx)
export async function run(ctx) {
const res = await ctx.integrations.invoke("klaviyo", "createProfile", {});
if (!res.success) throw new Error(res.error);
ctx.log.info("Klaviyo answered", { output: res.output });
}// defineWorkflow module (@app/sdk ctx)
import { defineWorkflow } from "@app/sdk";
export default defineWorkflow({
id: "klaviyo-createprofile",
name: "Klaviyo: Create Profile",
description: "Calls Klaviyo when a row is created.",
trigger: { type: "entity_event", entity: "tickets", event: "created" },
async run(ctx, event) {
const res = await ctx.integrations.call("klaviyo", {
"action": "createProfile"
}) as { success: boolean; error?: string };
if (!res.success) throw new Error(res.error);
},
});curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/klaviyo/createProfile" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{}}'Actions
createProfilein catalog
Create Profile. Add new user profile with email/SMS subscription options
| Input | Type | Description |
|---|---|---|
emailoptional | text | Email address (recommended identifier) |
phone_numberoptional | text | Phone number in E.164 format (e.g., +15005550006) |
external_idoptional | text | Unique identifier from external system |
first_nameoptional | text | First Name |
last_nameoptional | text | Last Name |
organizationoptional | text | Company name |
localeoptional | text | Language tag (e.g., en-US) |
titleoptional | text | Job Title |
imageoptional | text | Profile image URL |
address1optional | text | Street address line 1 |
address2optional | text | Street address line 2 |
cityoptional | text | City |
countryoptional | text | Country |
regionoptional | text | Region/State |
zipoptional | text | Zip Code |
timezoneoptional | text | IANA timezone (e.g., America/New_York) |
ipoptional | text | IP Address |
latitudeoptional | number | Latitude coordinate (4 decimal places recommended) |
longitudeoptional | number | Longitude coordinate (4 decimal places recommended) |
custom_propertiesoptional | object | Key-value pairs for segmentation and personalization |
addProfileToList
Add Profile to List. Add profiles to a specific list without changing subscription status.
| Input | Type | Description |
|---|---|---|
list_idrequired | id (picked from your account) | List Id |
profile_idrequired | ids (picked from your account) | Select one or more Klaviyo profiles |
createList
Create List. Create a new subscriber list.
| Input | Type | Description |
|---|---|---|
namerequired | text | Name for the new list |
custom_api_call
Custom API Call. Make a custom API call to a specific endpoint
| Input | Type | Description |
|---|---|---|
urlrequired | object (depends on other props) | url |
methodrequired | one of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD" | Method |
headersrequired | object | Authorization headers are injected automatically from your connection. |
queryParamsrequired | object | Query Parameters |
body_typeoptional | one of "none" | "json" | "form_data" | "raw" | Body Type |
bodyoptional | object (depends on other props) | Body |
response_is_binaryoptional | boolean | Enable for files like PDFs, images, etc. |
failsafeoptional | boolean | No Error on Failure |
timeoutoptional | number | Timeout (in seconds) |
followRedirectsoptional | boolean | Follow redirects |
findListByName
Find List by Name. Find lists by name with optional additional data
| Input | Type | Description |
|---|---|---|
search_queryrequired | long text | Enter list name |
include_additional_dataoptional | boolean | Include related flow and tag information |
findProfileByEmailPhone
Find Profile by Email/Phone. Find a profile using email or phone number.
| Input | Type | Description |
|---|---|---|
search_queryrequired | text | Enter an email address or phone number (E.164 format recommended) |
include_additional_dataoptional | boolean | Include subscriptions and predictive analytics data |
findTagByName
Find Tag by Name. Find tags whose name contains the search query.
| Input | Type | Description |
|---|---|---|
search_queryrequired | text | Search for tags whose name contains this value. |
removeProfileFromList
Remove Profile from List. Remove profiles from a specific list.
| Input | Type | Description |
|---|---|---|
list_idrequired | id (picked from your account) | List Id |
profile_idsrequired | ids (picked from your account) | Select one or more Klaviyo profiles |
subscribeProfile
Subscribe Profile. Subscribe profiles to email or SMS marketing on a list.
| Input | Type | Description |
|---|---|---|
list_idrequired | id (picked from your account) | List Id |
profile_idsrequired | ids (picked from your account) | Select one or more Klaviyo profiles |
subscribe_emailoptional | boolean | Subscribe selected profiles to email marketing. |
subscribe_smsoptional | boolean | Subscribe selected profiles to SMS marketing. |
historical_importoptional | boolean | Bypass double opt-in and mark as a historical import. |
consented_atoptional | text | ISO 8601 datetime when consent was given (required for historical import, e.g. 2024-01-15T10:00:00Z). |
custom_sourceoptional | text | Label for the subscription source (e.g. "Website Form"). |
unsubscribeProfile
Unsubscribe Profile. Unsubscribe profiles from email or SMS marketing on a list.
| Input | Type | Description |
|---|---|---|
list_idrequired | id (picked from your account) | List Id |
profile_idsrequired | ids (picked from your account) | Select one or more Klaviyo profiles |
unsubscribe_emailoptional | boolean | Unsubscribe selected profiles from email marketing. |
unsubscribe_smsoptional | boolean | Unsubscribe selected profiles from SMS marketing. |
unsubscribe_sms_transactionaloptional | boolean | Unsubscribe selected profiles from SMS transactional messages. |
updateProfile
Update Profile. Update existing profile data and preferences.
| Input | Type | Description |
|---|---|---|
profile_idrequired | id (picked from your account) | Profile Id |
emailoptional | text | Individual's email address |
phone_numberoptional | text | Phone number in E.164 format (e.g., +15005550006) |
external_idoptional | text | Unique identifier from external system (e.g., POS system) |
anonymous_idoptional | text | Anonymous identifier for the profile |
first_nameoptional | text | Individual's first name |
last_nameoptional | text | Individual's last name |
organizationoptional | text | Company or organization name |
localeoptional | text | Locale in IETF BCP 47 format (e.g., en-US) |
titleoptional | text | Individual's job title |
imageoptional | text | URL pointing to profile image location |
address1optional | text | First line of street address |
address2optional | text | Second line of street address |
cityoptional | text | City name |
countryoptional | text | Enter 2-letter ISO country code. Popular: US, GB, CA, DE, FR, AU, JP, CN, IN, BR |
regionoptional | text | Region within country (state/province) |
zipoptional | text | Postal/zip code |
timezoneoptional | text | IANA timezone (e.g., America/New_York) |
ipoptional | text | IP address of the profile |
latitudeoptional | number | Latitude coordinate (4 decimal places recommended) |
Details
- Id
klaviyo- Category
- Marketing
- Tags
- email, ecommerce, sms, marketing-automation
- Package
@activepieces/piece-klaviyo@0.0.1- Tier
- Community