Question

How to implement pagination for triggers

  • 16 November 2022
  • 5 replies
  • 493 views

Badge

I followed the steps mentioned in the developer documentation. But I am not getting the second-page results.

I checked this trigger with a dropdown which is working as expected.

please help us with this and how can we achieve this.

 

Thanks in advance.


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

5 replies

Userlevel 7
Badge +12

Hi @Nagamanickam - Did you check the Support Paging checkbox?

 

 

Badge

Hi @ikbelkirasan Yes I did

Userlevel 2
Badge +1

Hey @Nagamanickam! 👋

Just to confirm, checking the “Support Paging” checkbox on the trigger means that bundle.meta.page will be incremented by 1 every time the “Load More” button is clicked in the Zap Editor on the dropdown field that uses that trigger, like the example from our help page below:

9a969f577adcb1d9e9c113531f8b99b0.png

Your screenshot shows that the value bundle.meta.page + 1 is being sent in each GET request via a page querystring parameter, so that looks good:

fe277aee2605b9e05b33cbdfcf4f61e2.png
As the first page of results is being successfully returned, is there any chance that there just isn’t a second page of results available in the app?

If there are definitely more results to be returned, please could you complete the following as next steps in troubleshooting:

Test via the Developer Platform

1. Check the documentation for the API you’re using to make sure that the pagination parameter and value are being sent exactly as the API needs.

2. Manually test the trigger via the “Test your API Request” section as per the example here: https://platform.zapier.com/docs/triggers#pagination. Click the “HTTP” tab and then check the details shown in the “Request Params” section. Confirm that the pagination parameter and value are being correctly sent:

a2369c9f4074dd10413ef7bc5ac64096.png

Test via the Zap Editor

Click the “Load More” button on that dropdown field in a Zap, then tracking down the associated GET request via the “Monitoring” section of your app. Check the request details to make sure that the pagination parameter and value are being sent exactly as you would expect.

I hope this helps! If not, please could you post the following:

  1. A link to the documentation page for the API you’re using that shows the details on how pagination works.
  2. Screenshots showing the details from the “Monitoring” page for a GET request sent after the “Load More” button was clicked in the Zap Editor.
Badge

Hi @iansco 

Can you please share some sample source code or resources for how polling works with pagination?

Thanks 

Nagamanickam

Userlevel 4
Badge +9

Hey @Nagamanickam 👋

The documentation for pagination is here: https://platform.zapier.com/docs/triggers#pagination - though I believe you’ve found this already from the screenshots of your code 👍

What you’ve implemented would be expected to return the second page of results, as long as there is a second page of results available, and the pagination parameter and value are being sent exactly as your API needs.

If you’re still having trouble after trying the next recommended steps in the previous reply, please post the requested API docs and screenshots.