-5

I am trying to do a oython code in zapier to verify if an input data is empty

if len(input_data['status']) == 0 :
    return {'status': 'Not Contacted'}

It doesn't work

DirtyBit
  • 16,613
  • 4
  • 34
  • 55

2 Answers2

0

The code itself should be fine, but it won't like it if the field has no value (and won't work as expected). It depends on your workflow but you might instead want to use a Zapier filter that only continues if a field "exists". That can detect blank fields: https://zapier.com/help/filter/

Linds
  • 1
0
x = input.get("x")
if x != None:
    y = "Input Exists"
else:
    y = "Input was blank"

Zapier blank values come through as None type. Do your check on that basis.

Henry
  • 36
  • 7