Skip to main content
Contributor II
May 22, 2025
Solved

Connect Klaviyo to n8n with HTTP Request

  • May 22, 2025
  • 9 replies
  • 1008 views

I’m trying to send form data (email for now) to a Klaviyo list using HTTP Request in n8n.

I’ve tried various strategies and none have been successful.

Has anyone successfully setup HTTP Request with Klaviyo in n8n and willing to share their setup?

Thank you in advance!

    Best answer by whereisjad

    @mike digital101 I am sure you can use v2 api calls as they are deprecated.  I recommend leveraging this call instead:

    https://developers.klaviyo.com/en/reference/create_client_subscription

    which you can pass a JSON data like below:

    {
      "data": {
        "type": "subscription",
        "attributes": {
          "profile": {
            "data": {
              "type": "profile",
              "attributes": {
                "subscriptions": {
                  "email": {
                    "marketing": {
                      "consent": "SUBSCRIBED"
                    }
                  },
                },
                "email": "user@example.com"
              }
            }
          }
        },
        "relationships": {
          "list": {
            "data": {
              "type": "list",
              "id": "YOUR_LIST_ID"
            }
          }
        }
      }
    }

     

    9 replies

    Problem Solver IV
    May 22, 2025

    Hey,

    Yes, you can connect Klaviyo to n8n using an HTTP Request. Here's the setup:

    • Method: POST

    • URL: https://a.klaviyo.com/api/v2/list/YOUR_LIST_ID/members

    • Headers:

      • Content-Type: application/json

      • Authorization: YOUR_PRIVATE_API_KEY

    • Body:

     

    json

    CopyEdit

    { "profiles": [ { "email": "user@example.com" } ] }

    Make sure you're using the private API key and the correct list ID.
    If it still fails, share the error , happy to help!

    +2348087340172 (Whatsapp number)
    whereisjad
    Expert Problem Solver IV
    Expert Problem Solver IV
    May 22, 2025

    @mike digital101 I am sure you can use v2 api calls as they are deprecated.  I recommend leveraging this call instead:

    https://developers.klaviyo.com/en/reference/create_client_subscription

    which you can pass a JSON data like below:

    {
      "data": {
        "type": "subscription",
        "attributes": {
          "profile": {
            "data": {
              "type": "profile",
              "attributes": {
                "subscriptions": {
                  "email": {
                    "marketing": {
                      "consent": "SUBSCRIBED"
                    }
                  },
                },
                "email": "user@example.com"
              }
            }
          }
        },
        "relationships": {
          "list": {
            "data": {
              "type": "list",
              "id": "YOUR_LIST_ID"
            }
          }
        }
      }
    }

     

    — Jad A | Klaviyo + Shopify + API Integrations Specialist • 7+ Years' Experience Helping with new setups, seamless integrations, and API connections—happy to connect. http://ja-technical-consulting.xyz/
    getcatesAuthor
    Contributor II
    May 22, 2025

    Hey Mike,

    Thanks for the response!

    Unfortunately, I tried that originally but that API has been retired and that’s even the error message provided in n8n from Klaviyo.

    Bulk Subscribe Profile seems to be the newest suggested solution but that too is having numerous errors, including how n8n accepts the headers and body with JSON/RAW turned on. 

    *I know this sidebar comment is directed more at n8n than Klaviyo but I’m highly surprised n8n doesn’t have a native integration with Klaviyo at this point. I’ve been dealing with this basic workflow for 3 days now and when searching or interacting in forums, customers are actively struggling to use Klaviyo in n8n.

    getcatesAuthor
    Contributor II
    May 22, 2025

    Here’s a brief visual of my setup with headers currently omitted:

     

     

    whereisjad
    Expert Problem Solver IV
    Expert Problem Solver IV
    May 22, 2025

    @getcates quite unfortunate that its a flaw with n8n but I suggest subscribing using the client side method I suggested earlier linked here

    You can call it like below and it doesn’t require headers:

    POST https://a.klaviyo.com/client/subscriptions?company_id={{companyId}}

    {
    "data": {
    "type": "subscription",
    "attributes": {
    "profile": {
    "data": {
    "type": "profile",
    "attributes": {
    "subscriptions": {
    "email": {
    "marketing": {
    "consent": "SUBSCRIBED"
    }
    }
    },
    "email": "user@example.com"
    }
    }
    }},
    "relationships": {
    "list": {
    "data": {
    "type": "list",
    "id": "{{list id}}"
    }
    }
    }
    }
    }


      
     

     

    — Jad A | Klaviyo + Shopify + API Integrations Specialist • 7+ Years' Experience Helping with new setups, seamless integrations, and API connections—happy to connect. http://ja-technical-consulting.xyz/
    Problem Solver IV
    May 22, 2025

    Hello ​@getcates 

    Thanks for sharing this detailed breakdown of the Create Client Subscription endpoint.

    Just to confirm my understanding:

    • This endpoint is meant strictly for client-side use (e.g., websites or mobile apps) using the public Site ID, and shouldn't be used on the server side.

    • It allows subscribing a user to email and/or SMS marketing with proper consent, and supports adding extra profile data.

    • If we’re working from the server side, we should use the /api/profile-subscription-bulk-create-jobs endpoint instead.

    This clears up a lot. Appreciate the thorough documentation!



    @whereisjad  ​@getcates    both should send me direct message

    +2348087340172 (Whatsapp number)
    getcatesAuthor
    Contributor II
    May 22, 2025

    Hey ​@whereisjad  and ​@mike digital101,

    Thanks for chiming in and helping. I recently set up my own VPS and when installing n8n, I didn’t update to the latest version so my input prompts were based on the v1 API which weren’t allowing me to enter the data properly. I just updated and the process is much more seamless.

    Thanks again!

    Problem Solver IV
    May 22, 2025

    You are always welcome

    +2348087340172 (Whatsapp number)
    Problem Solver III
    May 27, 2025

    I’m trying to send form data (email for now) to a Klaviyo list using HTTP Request in n8n.

    I’ve tried various strategies and none have been successful.

    Has anyone successfully setup HTTP Request with Klaviyo in n8n and willing to share their setup?

    Thank you in advance!

     

    Make sure you webhook setup is set to catch POST, it defaults to GET

    I sometimes know things...