I’ve followed the instructions on https://help.klaviyo.com/hc/en-us/articles/4407486310683-How-to-Send-Consent-to-Klaviyo-via-Zapier
Everything goes fine until testing the action, I get:
Failed to create a run python in Code by Zapier
Your code had an error! Traceback (most recent call last): File "<string>", line 22, in the_function KeyError: 'phone_number'
Best answer by David ToView original
Welcome to the Klaviyo Community!
I’m no developer, but that error seems to indicate that there’s an error in your code pertaining to line 22 in relation to the phone_number field you have.
Since Zapier isn’t an integration support by Klaviyo, it’s highly recommended that when looking to use Zapier that you are working alongside a developer(s) on your team who can support it. This is also mentioned at the top of the How to Send Consent to Klaviyo via Zapier Help Center article you referenced. If you need an introduction to a developer, you can reach out to any number of our wonderful Klaviyo Partners who offer development services from our Partner Directory.
I hope this helps!