Skip to main content
Problem Solver I
March 2, 2023
Solved

Zapier not providing email consent

  • March 2, 2023
  • 3 replies
  • 469 views

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

 

    This topic has been closed for replies.
    Best answer by addison

    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! 

    3 replies

    addisonAuthor
    Problem Solver I
    March 2, 2023

    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. 

    addisonAuthorAnswer
    Problem Solver I
    March 2, 2023

    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! 

    chloe.strange
    Community Manager
    Community Manager
    March 3, 2023

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

    ~Chloe