The Klaviyo API grants you the power to automate and personalize your email marketing efforts. With it, you can manage lists, profiles, and campaigns, track event-driven communications, and analyze the results. By leveraging this API on Pipedream, you can create intricate, automated workflows that respond in real-time to your users' behavior, sync data across multiple platforms, and tailor your marketing strategies to improve engagement and conversion rates.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
klaviyo: {
type: "app",
app: "klaviyo",
}
},
async run({steps, $}) {
return await axios($, {
url: ` https://a.klaviyo.com/api/accounts/`,
headers: {
"Authorization": `Klaviyo-API-Key ${this.klaviyo.$auth.api_key}`,
"revision": `2023-12-15`,
},
})
},
})
Synchronize New Shopify Orders to Klaviyo for Personalized Follow-Ups: When a new order is placed in Shopify, trigger a workflow in Pipedream that captures order details and customer information. This data is then sent to Klaviyo to create or update a customer profile and trigger a personalized post-purchase email sequence.
Automate Lead Scoring Based on User Activity: Use Pipedream to listen for webhooks from Klaviyo that indicate user actions, like email opens, link clicks, or form submissions. Combine this with data from other sources, like CRMs or analytics tools, to calculate a lead score. Update the contact in Klaviyo with this score to segment audiences and target high-scoring leads with specialized campaigns.
Streamline Event Invitations and Follow-Ups with Zoom Webinar Registrations: When a user registers for a webinar on Zoom, Pipedream can capture this event and create a corresponding profile in Klaviyo, automatically adding them to an event-specific list. Post-webinar, use Klaviyo to send out tailored content, such as a recording of the event, additional resources, or calls to action, based on their engagement.
To get started using Klaviyo with Pipedream, you’ll need to create a new Klaviyo API key.
First, log in to your Klaviyo account, then open Settings in the bottom left-hand corner:
Then, on the next page, click Create API Key to begin creating a new private API key.
On this page, you can configure your API key settings, such as its name and permissions. We recommend naming this API key Pipedream
so you can easily track where it’s used.
Next, you'll need to define the permissions for this API key. You can grant specific permissions, read-only access to all resources, or full read/write access. Don’t worry, you can change these settings later.
Once you have created your Klaviyo private API key, make sure to copy it to your clipboard and save it within Pipedream through either a Klaviyo trigger or action in a workflow, or by opening the dedicated Connected Accounts area in Pipedream.
Ensure you save the API key before closing the Klaviyo window, as this is the only time this private API key will be displayed.
Klavyio uses standard HTTP status codes to communicate errors over it’s API.
The request completed successfully.
The request succeeded, and a new resource was created as a result.
The request has been received but not yet acted upon. We return this status code for requests that were accepted but are processed asynchronously.
The request succeeded, but the API doesn’t provide a response body.
Request is missing a required parameter or has an invalid parameter.
Request is lacking required authentication information.
Please follow the guidance here for more details on authenticating your API requests.
The request contains valid authentication information, but does not have permissions to perform the specified action.
See API key scopes for more information.
The requested resource doesn't exist.
The requested resource doesn't support the provided HTTP method, e.g., DELETE.
The request conflicts with the current state of the server.
The requested content has been permanently deleted from Klaviyo’s server. This status code will occur for requested endpoints that no longer exist in our API.
The Content-Type or Content-Encoding header is set incorrectly.
You hit the rate limit for this endpoint (different endpoints have different rate limits).
Something is wrong with the destination server. This may be on Klaviyo's end.
Something is wrong on Klaviyo’s end leading to service unavailability.
Check Klaviyo’s Status for updates.
Klaviyo uses API keys for authentication. When you connect your Klaviyo account, Pipedream securely stores the keys so you can easily authenticate to Klaviyo APIs in both code and no-code steps.