cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Paginating through HubSpot Contacts

So I've got a flow built to get contacts from a list in HubSpot CRM using their APIs and the HTTP action. However, I am struggling with being able to paginate through the contacts to return all contacts. Currently HubSpot only allows a max of 100 contacts per call. You can use the "has-more" value and the "vid-offset" value to paginate through the list of contacts to get more than 100 but I am having trouble doing this in my flow. I have been able to successfully do it in PowerBI using the advanced editor, just no luck in Flow. Any help would be greatly appreciated. Attached is a screenshot of my current flow. MyFlow.PNG

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Paginating through HubSpot Contacts

Hi @snamuth,

 

It seems that you are trying to enable Pagination for the HTTP action. Pagination enables you to handle more records than are returned in a single call from a service. For example, some services only return back 50 items at a time. However, in the flow, you may want to get all of the items in the list. By turning on pagination, the flow engine will continue to call the service until it has all of the items - or - hits the limit that you explicitly define in the flow.

Please click the Settings, then turn on the Pagination. You could also give a limit on max number of items to retrieve.

Please check the doc for more details:

https://flow.microsoft.com/en-us/blog/four-connector-action-settings/

  

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Paginating through HubSpot Contacts

Thanks Mabel. I am trying to enable Pagination, but the way HubSpot works is that it gives you a values in the reponse to determine if you need to paginate and get more contacts. The only way to paginate is to take the vidOffset value that it returns each time and pass it back to the API to get the next n number of records. Just enabling pagination in settings isn't letting me pass the vidOffset value back to the API. This is the part I am struggling with. 

Highlighted
Frequent Visitor

Re: Paginating through HubSpot Contacts

Ok, So I've figured out how to paginate through the HubSpot API using a variable that gets set with the first API response. However, now, the only way I can get it to combine all of the responses is by creating a csv table for each and combining them afterwards. Is there a way to combine all of the json responses from the API into one csv table? Attached is what my current flow looks like. I was able to paginate using a "Do until has-more is equal to false". Any help is definitely appreciated.

 

ThanksFlow1.pngflow2.pngflow3.png

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (7,088)