Skip to main content
Solved

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

  • July 24, 2022
  • 1 reply
  • 61 views

Forum|alt.badge.img+2

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 To

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

View original
Did this topic or the replies in the thread help you find an answer to your question?

1 reply

David To
Klaviyo Employee
Forum|alt.badge.img+60
  • Klaviyo Employee
  • 2456 replies
  • Answer
  • July 25, 2022

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