Skip to main content

I have a set of email ids mapped to certain states but unfortunately any state I key in, it automatically goes to else condition. I have it compiled in python compiler but for some reason doesn’t work that way in Zapier.
Anybody has any idea where I am going wrong?


if input_data in i"Assam","Manipur","Meghalaya","Sikkim","West Bengal","Bihar","Chattishgarh","Jharkhand","Orissa","Telangana","Madhya Pradesh","Andhra Pradesh"]:
        return {"email" : xxxxxxx@xxxxx.com}
elif input_data in a"Delhi","Haryana","Himachal Pradesh","Jammu & Kashmir","Punjab","Rajasthan","Uttar Pradesh","Uttarakhand"]:
        return {"email":"xxx.xx@xxxxx.com"}
elif input_data in u"Maharashtra","Gujarat","Goa","Daman & Diu","Dadra & Nagar Haveli"]:
        return {"email":"xxxxxxx@xxxxx.com"}
elif input_data in "Karnataka","Tamil Nadu"]:
        return {"email":"xxxxxxxx@xxxxx.com"}
elif input_data == "Kerala":
        return {"email":"xxxxxxxx@xxxxx.com"}
else:
        return{"email":"xxxxx@xxxx.ai"}
    
output = print({"email":getState(input_data)})

 

 

This post has been edited by a moderator to remove sensitive information. Please remember to obfuscate any personally identifiable information prior to posting as this is a public forum. 

Hey @Harini95 , What is the state name in the input value?


@jayeshkumarbhatia I used Assam as input. But any of the inputs among the states defined I give, it returns the same email ID.


Can you show me the screenshot of your code by zapier step? I want to see how did you setup input data.