Solved

Adding SMS Consent with Zapier troubleshooting - Failed to create a run python in Code by Zapier Your code had an error

  • 24 July 2022
  • 1 reply
  • 50 views

Badge +1
  • Contributor I
  • 0 replies

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'

icon

Best answer by David To 25 July 2022, 17:53

View original

1 reply

Userlevel 7
Badge +60

Hello @bg90,

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!

David

Reply