Solved

Zapier not providing email consent

  • 2 March 2023
  • 3 replies
  • 223 views

Badge +2

Hi, I’m using Zapier with the Python script as detailed in this Klaviyo support article, How to send consent to Klaviyo via Zapier

I am successfully getting SMS consent, but no email consent. 

Here are some screenshots to help: 

Data directly from my website shows email consent coming through correctly: 

Then it comes into Zapier like this

 

But the Profile in klaviyo does not get email consent, only SMS.

 

Here is a screenshot of the Python script in Zapier

 

icon

Best answer by addison 2 March 2023, 20:35

View original

3 replies

Badge +2

After doing more research, I learned that the email consent is actually working, there is just no green checkmark. I tested this by setting up a new list, and sending a campaign to the list, which was successful. 

I figured this out from @alex.hong ‘s comment on this thread 

 

 

Klaviyo Needs to fix this so the green check mark shows up when consent is given via API.

Hope this helps someone else. 

Badge +2

Update- The green check mark can be added back by adjusting the Zapier Python script so it writes all data to 1 profile, instead of 2. (I didn’t realize it was writing to a separate profile because the profile wasn’t displayed in Klaviyo website anywhere I could find).

 

Original Payload from Klaviyo’s support article:

payload = {"profiles": [
  {"email": input_data["email"]},
  {
    "phone_number": input_data["phone_number"],
    "sms_consent": sms_consent
  }
]}

 

Updated Payload to fix:

payload = {"profiles": [

 {"email": input_data["email"],

 "$consent":["email"],

 "phone_number": input_data["phone_number"],

 "sms_consent": sms_consent

}

]}

 

This fixed the issue for me! Thank you to Mokhsira from Klaviyo support for the help! 

Userlevel 5
Badge +29

Hi @addison, thank you for sharing your solution with the community!

~Chloe

Reply