Skip to main content

When I create a Search Action or a Polling Trigger using my API endpoint to GET an object, Zapier is smart enough to only return one record when you test it in the Zap. Yay!

But when I create a REST Hook Trigger and in the Perform List I put the exact same setup for the same API endpoint, Zapier returns the entire table when I test it in the Zap. I realize Perform List request must return an array. But returning an array with 100s of records causes every other step to fail testing because I’m mapping fields with 100’s of values to fields that expect 1 value.

Is there any way to set up the Perform List so that it returns sample data that can be mapped in subsequent steps?

Hi @jeffernst 

You can use a Loop by Zapier action to iterate through all the array items one at a time. It will, however, treat every action separately, so 100 array items is 100 tasks. Your webhook should only be sending the exact item where the changes/updates happened to not all the items.


@robschmidt Thank you for the reply. I want this zap to run for one record, as it is triggered by a webhook that fires when a single record is updated by a user. The webhook is working fine, the problem is the API call in the Perform List returns 100s of records. The same API call made from a Polling Trigger or a Search Action only returns the first record. I want the Perform List to also only return the first record.


Hi @jeffernst 

What is the API endpoint documentation you are referencing?

Does the API endpoint have a parameter to specify the number of records to returned (e.g. 1)?

 


Here is how I solved this issue. I had to code dedicated endpoints for each object in my app that has a webhook, create a Trigger for each object, and use the new endpoints in the Perform Lists. These endpoints return a sample record in the exact field/value format as the webhook itself so that the live zap will work.


Thanks so much for looping back around to update us how you resolved this, @jeffernst! 🎉