Klaviyo
Create profiles, manage lists, and track events in Klaviyo.
On this page
Connect
Auth type: API key (secret_text). Pass the provider's API key or token as the connection's credential. It is sealed at rest and only opened on the server when an action runs.
- From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
- Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
- Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.
Call it from a workflow
step.ctx.integrations.invoke("klaviyo", action, input) resolves with the provider's answer and rejects when Klaviyo isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "klaviyo"} says whether yours can call it.
// workflows/notify.ts: call Klaviyo when a booking is confirmed
import { on } from "@appbricx/workflows";
export const tellKlaviyo = on.transition("booking", "status", "confirmed", async (_event, step) => {
// Recorded once: a retry doesn't send it twice. Rejects when Klaviyo isn't connected.
const output = await step.run("Klaviyo", () =>
step.ctx.integrations.invoke("klaviyo", "createProfile", {}),
);
step.ctx.log("Klaviyo answered", output);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "klaviyo",
"piece_action": "createProfile",
"input": {},
"env": "dev"
}
}curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/klaviyo/createProfile" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{}}'Actions
createProfile
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- Runs
- Through the integration runner