Forum Discussion

DrewSmith's avatar
DrewSmith
Icon for Helper III rankHelper III
2 years ago
Solved

Paginating API calls to Hubspot

I'm looking to paginate my calls from Hubspot deals. 

 

I can connect to the api and change the limit etc. to get 100 rows instead of 10. 

 

I've done pagination before where the number of pages was known via list.generate but this appears different. How can I call all the records for deals, and a few other pages? 

4 Replies

  • Hi DrewSmith As a workaround, maybe you can use a 3rd party connector, which pulls data directly from the Hubspot API, it can save you a lot of time compared to other options. I've tried windsor.ai, supermetrics and funnel.io. I stayed with windsor because it is much cheaper so just to let you know other options. In case you wonder, to make the connection first search for the Hubspot connector in the data sources list:

     

     

    After that, just grant access to your Hubspot account using your credentials, then on preview and destination page you will see a preview of your Hubspot fields:

     

     

    There just select the fields you need. Finally, just select PBI as your data destination and finally just copy and paste the url on PBI --> Get Data --> Web --> Paste the url. 

     

  • Aryna's avatar
    Aryna
    Icon for Post Partisan rankPost Partisan

    HubSpot's cursor-based pagination is a bit different from offset-based — it can get messy fast, especially once you're pulling deals, contacts, and associations together.

    We went down that road and ended up switching to a dedicated connector instead: https://vidi-corp.com/power-bi-hubspot-connector/

    No pagination logic to write, the table relationships are already sorted, and it refreshes every 6 hours automatically so you're not maintaining anything. Also skips the need for an on-premises gateway which was a bonus for us. They also offer a free trial if you want to test it against your data first.