Skip to content

Add Klaviyo connector with profiles, lists, and campaigns resources#133

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-klaviyo-api-connector
Draft

Add Klaviyo connector with profiles, lists, and campaigns resources#133
Copilot wants to merge 2 commits intomainfrom
copilot/add-klaviyo-api-connector

Conversation

Copy link
Contributor

Copilot AI commented Nov 5, 2025

Description

Implements TypeScript connector for Klaviyo's marketing automation API (revision 2024-10-15) with cursor-based pagination and three core resources.

Implementation

  • Authentication: Private API key via Authorization: Klaviyo-API-Key header
  • Pagination: Cursor-based using page[cursor] and page[size], extracts next cursor from response links.next
  • Resources:
    • profiles: Customer data with filtering by email/phone/IDs
    • lists: Audience segments
    • campaigns: Email campaigns with status filtering

Usage

import { createConnector } from '@workspace/connector-klaviyo'

const connector = createConnector()
connector.init({ apiKey: process.env.KLAVIYO_API_KEY! })

// Cursor pagination with filters
for await (const page of connector.profiles.list({ 
  'filter[email]': 'user@example.com',
  pageSize: 100 
})) {
  console.log(page[0].attributes.email)
}

// Single resource fetch
const campaign = await connector.campaigns.get('CAMPAIGN_ID')

Artifacts

  • Full TypeScript types for Profile, List, Campaign resources
  • JSON schemas with documentation for all three resources
  • Configuration docs covering auth, pagination, filtering patterns
  • 11 tests: pagination behavior, filtering, auth headers, observability

Testing Checklist

  • Unit tests for all public methods
  • Integration tests with mock servers
  • Retry logic (backoff, jitter, circuit breaker)
  • Rate limiting behavior
  • Auth flows and expiry/refresh
  • Error classification and propagation
  • Pagination strategies and edge cases
Original prompt

This section details on the original issue you should resolve

<issue_title>Connector request: Klaviyo (klaviyo)</issue_title>
<issue_description>Identifier: klaviyo
Name: Klaviyo
Category: api
Tags: email, marketing
Homepage: http://klaviyo.com

Description:
klaviyo.com - enables CRM / marketing lifecycle automations and emails.

Interested in syncing Klaviyo via API.

{
  "kind": "connector-request",
  "identifier": "klaviyo",
  "name": "Klaviyo",
  "category": "api",
  "tags": [
    "email",
    "marketing"
  ],
  "homepage": "http://klaviyo.com",
  "description": "klaviyo.com - enables CRM / marketing lifecycle automations and emails.\n\nInterested in syncing Klaviyo via API."
}

Comments on the Issue (you are @copilot in this section)

Custom agent used: connector-implementer
Use this agent when the user is creating a new connector for the 514 Labs Registry, needs guidance on implementing connector resources, or is working on connector scaffolding, testing, or schema definition.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link

vercel bot commented Nov 5, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
registry Error Error Nov 6, 2025 0:16am

…gns resources

Co-authored-by: georgevanderson <4805522+georgevanderson@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Klaviyo API connector for syncing Add Klaviyo connector with profiles, lists, and campaigns resources Nov 6, 2025
Copilot AI requested a review from georgevanderson November 6, 2025 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connector request: Klaviyo (klaviyo)

2 participants