Integration Guide

How to Connect InstantDM with Klaviyo (Step-by-Step Guide)

Learn how to connect InstantDM with Klaviyo to automatically add Instagram DM leads to your e-commerce email and SMS marketing. Step-by-step guide for syncing Instagram leads to Klaviyo profiles, lists, and flows.

Meta Business Partner
30,000+ creators
$9.99/mo flat

Klaviyo is the go-to email and SMS marketing platform for e-commerce brands. Connecting InstantDM to Klaviyo automatically creates profiles from Instagram DM leads, adds them to lists, and triggers flows - so when someone comments on your product post and shares their email via DM, they're immediately in your Klaviyo ecosystem.


Why Connect InstantDM to Klaviyo?

  • E-commerce native - Klaviyo is built for product-based businesses that sell on Instagram
  • Email + SMS - reach Instagram leads on both channels from one platform
  • Powerful flows - trigger welcome series, abandoned browse, and win-back sequences
  • Rich profiles - store Instagram data alongside purchase history and browsing behavior
  • Predictive analytics - Klaviyo predicts customer lifetime value and churn risk
  • Shopify integration - if you use InstantDM's Shopify features, Klaviyo connects the full picture

Common Use Cases

  • Add Instagram DM leads to a Klaviyo list and trigger a welcome flow
  • Send a discount code via email after someone comments on a product post
  • Create profiles with Instagram username and interest for personalized emails
  • Trigger SMS follow-ups for high-intent leads (pricing inquiries)
  • Segment your Klaviyo audience by Instagram campaign

What You'll Need

Requirement Details
InstantDM account Trendsetter, Trendsetter Pro, or any Multi plan
Klaviyo account Free or paid plan
InstantDM API key Found at Settings → API in your InstantDM dashboard
Klaviyo API key Found at Settings → API Keys in Klaviyo

Method 1: Via Make.com (Recommended)

Step 1: Set Up the Webhook

Follow Steps 1-4 in the Make.com integration guide to create a webhook scenario.

Step 2: Add a Klaviyo Module

  1. After the webhook trigger, add a Filter: event equals flow_completed.
  2. Click "+" and search for Klaviyo.
  3. Select Add Member to a List (or Create/Update Profile).
  4. Connect your Klaviyo account.

Step 3: Map Fields

Klaviyo Field Make.com Mapping
Email {{data.response_variables.email}}
First Name {{data.response_variables.full_name}}
Phone Number {{data.response_variables.phone}}
List Select your target list
Custom Properties Instagram username, flow name, interest

Step 4: Test and Activate

  1. Run once in Make.com.
  2. Trigger a test event from InstantDM.
  3. Check Klaviyo - the profile should appear in your list.
  4. Activate the scenario.

Method 2: Via Zapier

Step 1: Create the Zap

Follow the Zapier integration guide to set up a webhook trigger.

Step 2: Add Klaviyo Action

  1. Add a Filter: event exactly matches flow_completed.
  2. Add Klaviyo → Add Member to List.
  3. Connect your Klaviyo account.
  4. Select the list and map fields.

Step 3: Test and Activate

  1. Test with sample data.
  2. Verify in Klaviyo.
  3. Turn the Zap on.

Method 3: Direct API Integration

Klaviyo's API is clean and well-documented.

Step 1: Get Your Klaviyo API Key

  1. In Klaviyo, go to Settings → API Keys.
  2. Create a Private API Key with write access to Profiles and Lists.
  3. Get your List ID: go to Audience → Lists & Segments, click on your list, and find the ID in the URL.

Step 2: Build a Webhook Receiver

const express = require('express');
const app = express();
app.use(express.json());

const KLAVIYO_API_KEY = process.env.KLAVIYO_API_KEY;
const LIST_ID = 'AbCdEf'; // Your Klaviyo list ID

app.post('/instantdm-webhook', async (req, res) => {
  const { event, data } = req.body;
  
  if (event !== 'flow_completed' || !data.response_variables?.email) {
    return res.status(200).json({ status: 'skipped' });
  }
  
  try {
    // Step 1: Create or update profile
    const profileResponse = await fetch('https://a.klaviyo.com/api/profiles/', {
      method: 'POST',
      headers: {
        'Authorization': `Klaviyo-API-Key ${KLAVIYO_API_KEY}`,
        'Content-Type': 'application/json',
        'revision': '2024-10-15',
      },
      body: JSON.stringify({
        data: {
          type: 'profile',
          attributes: {
            email: data.response_variables.email,
            first_name: data.response_variables.full_name || '',
            phone_number: data.response_variables.phone || '',
            properties: {
              instagram_username: data.username,
              flow_name: data.flow_name,
              interest: data.response_variables.interest || '',
              lead_source: 'Instagram DM',
            },
          },
        },
      }),
    });
    
    let profileId;
    if (profileResponse.status === 201) {
      const profile = await profileResponse.json();
      profileId = profile.data.id;
    } else if (profileResponse.status === 409) {
      // Profile exists  -  get the ID from the error response
      const conflict = await profileResponse.json();
      profileId = conflict.errors[0].meta.duplicate_profile_id;
    }
    
    // Step 2: Add to list
    if (profileId) {
      await fetch(`https://a.klaviyo.com/api/lists/${LIST_ID}/relationships/profiles/`, {
        method: 'POST',
        headers: {
          'Authorization': `Klaviyo-API-Key ${KLAVIYO_API_KEY}`,
          'Content-Type': 'application/json',
          'revision': '2024-10-15',
        },
        body: JSON.stringify({
          data: [{ type: 'profile', id: profileId }],
        }),
      });
    }
    
    res.status(200).json({ status: 'created', profileId });
  } catch (error) {
    res.status(500).json({ status: 'error', message: error.message });
  }
});

app.listen(3000);

Tracking Custom Events

Beyond creating profiles, you can track events in Klaviyo to trigger flows and build segments.

Track an "Instagram Lead Captured" Event

await fetch('https://a.klaviyo.com/api/events/', {
  method: 'POST',
  headers: {
    'Authorization': `Klaviyo-API-Key ${KLAVIYO_API_KEY}`,
    'Content-Type': 'application/json',
    'revision': '2024-10-15',
  },
  body: JSON.stringify({
    data: {
      type: 'event',
      attributes: {
        metric: {
          data: {
            type: 'metric',
            attributes: { name: 'Instagram Lead Captured' },
          },
        },
        profile: {
          data: {
            type: 'profile',
            attributes: { email: data.response_variables.email },
          },
        },
        properties: {
          flow_name: data.flow_name,
          interest: data.response_variables.interest,
          instagram_username: data.username,
        },
      },
    },
  }),
});

This event can trigger Klaviyo flows and appear on the profile's activity timeline.


Building Klaviyo Flows

Welcome Flow for Instagram Leads

  1. Go to Flows → Create Flow.
  2. Trigger: List → when someone is added to your Instagram leads list.
  3. Steps:
    • Email: Welcome + promised content (PDF, discount code, etc.)
    • Time delay: 1 day
    • Conditional split: Check interest property
      • "pricing" → Send pricing email
      • "demo" → Send demo booking email
      • Default → Send general value email
    • Time delay: 3 days
    • Email: Social proof / testimonial
    • Time delay: 2 days
    • Email: Final CTA

Discount Code Flow (E-commerce)

  1. Trigger: Metric → "Instagram Lead Captured" event.
  2. Steps:
    • Email: "Here's your exclusive 15% off code: INSTA15"
    • Time delay: 3 days
    • Conditional split: Has placed order?
      • Yes: Exit flow
      • No: Send reminder email with urgency
    • Time delay: 4 days
    • Email: "Last chance - your code expires tomorrow"

SMS Follow-Up

  1. In any flow, add an SMS step.
  2. Message: Hey {{first_name}}! Thanks for connecting on Instagram. Check your email for your exclusive offer 🎉

Note: SMS requires Klaviyo's SMS plan and subscriber consent. Ensure your DM flow includes SMS opt-in language.


Profile Properties

Store Instagram-specific data on Klaviyo profiles for segmentation and personalization.

Property Type Purpose
instagram_username String Their IG handle
flow_name String Which DM flow they completed
interest String What they're interested in
lead_source String Always "Instagram DM"
instagram_campaign String Which post/campaign they came from

Using Properties in Emails

Reference properties in email templates:

Hi {{ first_name|default:"there" }},

You mentioned you're interested in {{ instagram_username|default:"our products" }}.
Here's what we recommend...

Troubleshooting

Issue Solution
Profile not appearing Check the API response. Verify the API key has write permissions. Ensure the email is valid.
409 Conflict error The profile already exists. Extract the duplicate_profile_id from the error response and use it to add to the list.
Profile not on list The list subscription is a separate API call from profile creation. Ensure both calls succeed.
Custom properties empty Properties are set during profile creation. If updating an existing profile, use the PATCH endpoint.
Flow not triggering Check that the flow is live (not draft). Verify the trigger matches (list addition or metric event).
SMS not sending Verify the phone number is in E.164 format (e.g., +1234567890). Check SMS consent status on the profile.
API returning 401 Verify your Private API Key. Public keys don't have write access.

Frequently Asked Questions

Is Klaviyo worth it if I'm not in e-commerce?

Klaviyo is optimized for e-commerce with features like product recommendations, abandoned cart flows, and Shopify integration. If you're a service-based business or creator, ConvertKit or ActiveCampaign may be a better fit. But if you sell products on Instagram, Klaviyo is the strongest choice.

How does Klaviyo's pricing work?

Klaviyo's free plan supports up to 250 profiles and 500 email sends/month. Paid plans are based on the number of profiles. For Instagram DM automation, you'll grow your profile count as leads come in - plan accordingly.

Can I use Klaviyo's predictive analytics with Instagram leads?

Yes, once a profile has enough data (email engagement, purchase history). Klaviyo can predict customer lifetime value, churn risk, and next order date. Instagram lead data enriches the profile for better predictions.

Should I use list-triggered or metric-triggered flows?

Use list-triggered flows for simple welcome sequences. Use metric-triggered flows when you want to pass event properties (like flow name or interest) into the flow for conditional logic. Metric triggers are more flexible.


What's Next

Ready to Automate Your Instagram DMs?

Join 30,000+ creators and brands using InstantDM today.

Start Your Free Trial

No credit card required. Setup in under 15 minutes.