Skip to main content

I am building an integration in the developers ui. I have a trigger that is working well and is returning results as expected. The only issue that I am having is that the id property is within a nested object within my array so zapier is giving me the “result missing the ‘id’ property” error.

 

Does anyone have any advice on how to tell zapier to look within the nested object for the unique id?

 

Response Content:

{
"identifier": {
"id": 190328303
},
"lot": {
"lotSize1": 0.18
}
}

 

An approach along these lines will work.  First switch to “code mode” in the API config, if you haven’t already.  Then, create a top level id field with the value from the nested field and return it. 

 

results<"id"] = results.identifier.id
return results;

 

 


Thank you @Zane!

 

Unfortunately, when I ran a test I got this error:

Cannot read property 'id' of undefined What happened (You are seeing this because you are an admin): 

Any thoughts?


I’d do some z.console.log statements and make sure everything is named and structured as you are expecting.  You can see your logs either in the built-in test component, or if you’re testing with a real Zap, in the monitoring tab from the left-hand nav.  

If that doesn’t help you spot the problem, then post your code and your logs and I’ll bet someone here can offer a suggestion.