| name | klaviyo-core-workflow-a |
| description | Execute Klaviyo primary workflow: profiles, lists, and subscriptions.
Use when creating/updating profiles, managing lists, subscribing contacts,
or syncing customer data to Klaviyo for email/SMS marketing.
Trigger with phrases like "klaviyo profiles", "klaviyo lists",
"klaviyo subscribe", "add contacts to klaviyo", "klaviyo customer data".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Grep |
| version | 1.7.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","klaviyo","email-marketing","cdp"] |
| compatibility | Designed for Claude Code |
Klaviyo Core Workflow A -- Profiles, Lists & Subscriptions
Overview
Primary money-path workflow: create/update profiles, manage lists, and subscribe contacts for email and SMS marketing via the klaviyo-api SDK. This skill covers the six-step path from a raw customer record to a consented, segmentable subscriber. High-level flow lives here; the full code for every step is in references/implementation.md.
Prerequisites
- Completed the
klaviyo-install-auth setup so KLAVIYO_PRIVATE_KEY is available in the environment.
- A Klaviyo private API key scoped to
profiles:read, profiles:write, lists:read, and lists:write.
- The
klaviyo-api npm package installed in the project (npm install klaviyo-api).
- Node.js with TypeScript configured, since all examples use the typed SDK.
Instructions
Every call authenticates through a single ApiKeySession built from the private key:
import { ApiKeySession, ProfilesApi, ListsApi } from 'klaviyo-api';
const session = new ApiKeySession(process.env.KLAVIYO_PRIVATE_KEY!);
const profilesApi = new ProfilesApi(session);
const listsApi = new ListsApi(session);
The workflow runs in six steps. Use the linked walkthrough for the complete code of each:
- Create or update a profile — prefer
createOrUpdateProfile (upsert) over createProfile so re-syncs don't 409 on an existing email.
- Create a list —
listsApi.createList(...) returns the listId you use downstream; getLists() enumerates existing lists.