cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
snamuth
Level: Powered On

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
Community Support Team
Community Support Team

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.
snamuth
Level: Powered On

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. 

snamuth
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,627)