Hey,
Yes, you can connect Klaviyo to n8n using an HTTP Request. Here's the setup:
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!
@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"
}
}
}
}
}
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.
Here’s a brief visual of my setup with headers currently omitted:
@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}}"
}
}
}
}
}
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
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!
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