Skip to main content

I am trying to define dynamic fields of an action with an API call. The output of the code has been defined with the following shcema: https://zapier.github.io/zapier-platform-schema/build/schema.html#fieldschema

For Example:
    {
      "label": "Middle Name",
      "key": "MiddleName",
      "required": false,
      "type": "STRING"
    }]

I am referencing the input fields like below: 

body: {"records": ...bundle.inputData}

While trying to test the API call using UI or ZAP, I am getting an error: Unable to get a value when looking for "key". Is it empty or missing?

Am I missing some configuration? Is there any other way I can debug this error?

Hey @Pragati Garg - Did you ever figure this out? If not, let me know and I’ll ask our team to review your question for further assistance. Thanks!


Hey, @steph.n I figured it out. It was a small mistake. Thank you for replying :grinning:


Hey, @steph.n I figured it out. It was a small mistake. Thank you for replying :grinning:

 

Would you mind sharing the answer? It would really help others who are probably encountering the same issue. Thank you very much in advance!


Sure. 

While pushing the dynamic fields into the array, I mapped the wrong values to the key parameter. So essentially the array that was being created was something like below

p
    {
      "label": "Middle Name",
      "key": undefined,
      "required": false,
      "type": "STRING"
    }]

 

Hence, I was getting the error Unable to get a value when looking for "key". Is it empty or missing?

 

Hope this helps!


Awesome! I have marked yours as the best answer @Pragati Garg - Thank you again!


Reply