Best answer

Paging sample data for trigger hooks

  • 27 July 2021
  • 1 reply
  • 197 views

Userlevel 1

I have a trigger I am working on that is fired via a webhook. I am stuck on an issue with the trigger data that is retrieved via the perfromList call. In my code I am calling our APIs to retrieve 3 members which works fine on the initial call. The problem occurs when I want to load additional records. When working on this I assumed it would pass to me a incremented page value in the bundle.meta.page but no matter what it always returns 0. So it seems the page does not increment for the test trigger calls for hooks.

 

So essentially I am asking if there is a way to do this or am I going at this in the wrong way? The end goal is to provide users with current live data in these trigger tests so they can properly use setup their zaps.

 

Thank you for any help.

icon

Best answer by Zane 6 August 2021, 23:08

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.

1 reply

Userlevel 7
Badge +9

In a RestHook type trigger the performList is only called during Zap setup to retrieve objects representative of what the hook will be sending to the Zap once the Zap is configured and turned on, so that the user can have fields to map into steps of subsequent actions in their Zap.

My first inclination is just to return a bigger set of objects from the single request to performList - if there’s a reason why a user may need a bigger selection of options in object to use for mapping. 

You make a good point that we have a “load more samples” button that feels like something where pagination support could come into play. I’ll raise that with the editor team for future consideration. Today pagination is only relevant to triggers that power dynamic dropdowns, but it will also power a cool new offering Zapier is bringing out soon.