How to Connect n8n to Klaviyo: Automate E-commerce Email & SMS Flows (2025)

Klaviyo is a powerhouse for e-commerce email and SMS, but its logic lives inside Klaviyo. The moment you want to blend in data from outside — a custom lead score, an ERP status, an enrichment API, a support signal — you hit a wall. That's exactly the wall n8n knocks down. By connecting n8n to Klaviyo, you can push custom events and profile properties into Klaviyo from anywhere, then let Klaviyo's flows do what they do best.

What you'll need

  • An n8n instance
  • A Klaviyo account
  • A Klaviyo private API key (from Settings → API Keys)

Step 1 — Authenticate

Klaviyo's newer API uses a private key sent as Authorization: Klaviyo-API-Key YOUR_KEY along with a revision header for versioning. In n8n, set this up as an HTTP Header Auth credential so every request is authorized. Klaviyo also ships a community node in many n8n versions for common operations.

Step 2 — Push a custom event

The core building block is the Track / events endpoint. From any n8n trigger, send an event like Placed Order, Viewed Pricing, or your own custom metric, attached to a customer's email. Every event you push becomes something you can trigger a Klaviyo flow from — even if the data originated in a system Klaviyo has never heard of.

Step 3 — Update profile properties

Use the profiles endpoint to set custom properties on a subscriber: lifetime value, plan tier, region, or a lead score. Those properties instantly become available for segmentation and personalization inside Klaviyo.

Step 4 — Subscribe and manage lists

Add or remove profiles from lists and segments programmatically. A new customer in your ERP can be dropped into the right Klaviyo list without anyone touching a CSV.

⚡ Skip the build — get the ready-made template

Score every subscriber by real buying propensity and auto-segment them in Klaviyo — so your best flows only hit people ready to buy.

Get the "AI Lead Scoring for Email Marketing — Behavioral Propensity Score & Auto-Segmentation" template on Gumroad →

Step 5 — Add intelligence Klaviyo can't do alone

Here's the high-value pattern: run each subscriber through an AI or rules-based scoring step in n8n that weighs behavioral signals — email engagement, site activity, past purchases — into a single propensity-to-buy score. Push that score back as a Klaviyo profile property and auto-assign the subscriber to a segment. Now your "ready to buy" flow only fires at people who actually are, and your win-back flow catches the ones drifting away. Klaviyo handles delivery; n8n supplies the brain.

Step 6 — Two-way sync

Point Klaviyo webhooks (or poll its events) back into n8n to react to opens, clicks, and conversions elsewhere in your stack — notify a rep on a high-intent click, or update your data warehouse on every purchase.

High-impact flows to automate

  • Enriched welcome: new signup → enrich in n8n → push properties → Klaviyo welcome flow personalized by segment.
  • Propensity-based promos: nightly re-score → re-segment → Klaviyo sends the right offer to the right tier.
  • Post-purchase: order event from your store → Klaviyo review-request and cross-sell flow.

Tips

  • Always include the revision header — Klaviyo's API is date-versioned and omitting it causes confusing errors.
  • Batch profile updates where possible to stay under rate limits on large lists.

Ready to automate?

You can wire this together node by node — or install a battle-tested version in minutes. The AI Lead Scoring for Email Marketing — Behavioral Propensity Score & Auto-Segmentation template comes fully built, documented, and ready to import into your n8n instance.

Get this template on Gumroad →

One-time purchase. Lifetime updates. Works on n8n Cloud and self-hosted.