Skip to main content

Hi there!

I’m currently setting up a Zap to pull lead data from SalesRabbit via a webhook into a Google Sheet using Zapier and have included some screenshots for reference. However, I’m running into an issue with looping. The data set from SalesRabbit is large enough to require pagination, but when I try to loop the Webhooks task, it only pulls in 2,000 rows, missing a significant portion of data.

Do you have any suggestions on how I can fix the Zap to handle pagination correctly and capture all rows? Thanks so much!

 

 

Hi @SharkDonuts,

 

Welcome to the Community.

 

We will move this thread to our Code & Webhooks section so our developers and Experts can point you in the right direction regarding the Code by Zapier action to handle pagination.
 


Hi @SharkDonuts 

What is the link to the SalesRabbit API endpoint documentation you used to configure the API request? (url)

 

NOTE: The Looping Zap app has a limit of 500 iterations.

So you’ll have to make sure the API request only returns 500 records.

 

Help link for how to create a looping Zap with multiple Zaps, webhooks and GSheets to give you some guidance.

 


Hi ​@Troy Tessalone I used the following link to configure the API request: https://developers.salesrabbit.com/docs/public-api/ZG9jOjE1NTkwMDU5-authentication

 

Also understood regarding the 500 records - my zap shouldn’t be greater than 500 records. 

 

Any idea why the pagination is not working?


@SharkDonuts 

From the screenshots the API request URL is hardcoded for page=1, so you would have to implement more logic to detect if there are more pages with results and iterate thru each page.

 


@Troy Tessalone appreciate your insight here! what further logic will need to be implemented to detect the further pages and iterate through them? Would a Paths by Zapier work?


@SharkDonuts 

Try these Zap steps:

  1. Trigger: Schedule - Daily
  2. Action: Looping - Create Loop from Numbers
    1. Set the end # to the number of pages you want to get based on the the perPage limit
    2. e.g. 3 would try to pull 3 pages of leads
  3. Action: Delay - After Queue
  4. Action: SalesRabbit API Request - Leads
    1. perPage default is 250 records
    2. map the Loop iteration # from the previous step to the value for the page=#
    3. NOTE: Unless you add other parameters to the API request as defined by the API endpoint documentation, then the same leads might be pulled each day
      1. https://developers.salesrabbit.com/docs/public-api/c3de951f7cd30-get-multiple-leads
  5. Action: Filter
    1. Check that there were results returned
  6. Action: GSheets - Create Row(s)

 


@Troy Tessalone Thank you for the detailed instructions! I’ve followed them carefully, but I’m still encountering an issue where only 2000 results are being pulled. I’ve attached screenshots of my configuration for reference. If you could provide any insights into why this might be happening, I’d greatly appreciate it. Thank you!

 


@SharkDonuts 

You may want to consider hiring help, check out the directory of Certified Zapier Experts: https://zapier.com/experts

 

For the Looping step the settings are wrong.

The MAX is 500.

Also, unless you have 500 pages of records you should set a much lower MAX #. (500 x 250 = 125,500)

Plus, with a Delay After Queue step with 1 minute, that will take over 8 hours to process 500 Loop Iterations.

 

The API step is still configured incorrectly.

It has a hardcoded parameter of page=1

That means it will only ever pull the first 250 records on page 1 from SalesRabbit.

The value 1 needs to be dynamic to be a variable that represents the Loop Iteration #, so it changes for each Loop Iteration. (e.g. first loop would be 1, second loop would be 2, and so on)

 


@Troy Tessalone 

Thanks for the suggestions! Unfortunately, I can’t afford to hire a Zapier expert at the moment, which is why I’m seeking help here in the community.

I do have 500 pages of data, so the max of 500 iterations is necessary for this process. I’ve just adjusted the Delay After Queue step to 0.1 seconds to speed things up, but I’m still struggling with setting the URL dynamically for the API step.

Whenever I try to input a variable to make the page parameter dynamic (to represent the Loop Iteration 😵, I get an error with a yellow circle and an exclamation mark.

What exactly should I input in the URL field for it to dynamically update with each Loop Iteration? Any specific format or examples would be greatly appreciated!

Thanks in advance for your help!

 

 


@SharkDonuts 

You need to click the h+] button in the field then select the variable from Zap step 2.


@SharkDonuts 

Another option to explore if available is to manually export data from SalesRabbit. e.g. CSV file


@Troy Tessalone Great thank you! I just added the variable! 

 

When I run the Zap I’m still only getting 2000 rows worth of data despite adding the variable. 

 

Why might this be the case?

 


@SharkDonuts 

From the Looping help link: https://help.zapier.com/hc/en-us/articles/8496106701453-Loop-your-Zap-actions

  • When you test this action, the Zap will only create the first loop. It will not create any other loops during the test.

If you are testing, it will only test the first loop iteration.

You would need to turn the Zap ON to test live for it to run 2+ loop iterations.

I recommend adjusting your Looping MAX # to be small so you can test. e.g. 3-5

e.g. 250 per page x 3 pages = 750 records

 

We would need more context about what you mean by only 2000. (screenshots)

 


Hi ​@Troy Tessalone appreciate the insights here! I just published the Zap and will update you once it runs!


Reply