Forum Discussion
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?
That link got me no further forward.
This is the solution to the problem. https://community.fabric.microsoft.com/t5/Power-Query/Hubspot-Private-Apps-Powerquery-pagination/m-p/3646698
4 Replies
- AnonymousNot applicable
Hi DrewSmith
You can change to M code to use api to call to Hubspot, and you can refer to the following link.
HubSpot Community - Pagination using Power BI - HubSpot Community
Power BI Pagination API HubSpot - Power Platform Community (microsoft.com)
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- DrewSmith
Helper III
That link got me no further forward.
This is the solution to the problem. https://community.fabric.microsoft.com/t5/Power-Query/Hubspot-Private-Apps-Powerquery-pagination/m-p/3646698
- ReportGuru
Post Patron
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
Post 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.