Best answer

Webhook GET only returns the first record


Userlevel 1

Our CRM has a API which I have successfully used for many purposes with Zapier using webhooks. Up until now, all GETs and PUTs have involved one record at a time. The CRM now has a the ability to request results of their internal reporting / query system that will produce many records at a time.

If I i call this using Postman (the mac app for testing API calls) I get a properly formatted array for each record.

If I call this using a Zapier webhook GET, I only get the first record of the array.

Both Postman and Zapier are using the exact same URL, query strings, etc, so I know the CRM is outputting it correctly, it’s just that Zapier is ignoring everything past the first record.

Thanks.

icon

Best answer by ikbelkirasan 6 July 2020, 23:17

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Userlevel 7
Badge +11

@pshifrin - Zapier isn’t ignoring the other records but when you test the GET request, it shows you the first record as an example of how the output would look like. If you turn the zap on, the array records will trigger the subsequent zap steps multiple times, once per record.

If this is not the intended the behavior and you’d rather have access to all the array records in the subsequent zap steps, then you should reformat the output to return the array under a key (called records for example). You can do this in a Code step because as far as I know, the “Webhooks by Zapier” app can’t transform the response.

Userlevel 1

Thank you! I just expected to see it in “retest & review”. Did a simple test and it worked.

Userlevel 1

@ikbelkirasan - That really helped me too! Do you know if there is a limit on the number of records that will trigger the subsequent zap steps multiple times, once per record, for instance if there is a very large array with hundreds of records?

Userlevel 7
Badge +11

@jonah - I’m not sure if there’s a limit on that. Maybe @Danvers could help here? Thanks in advance!