In this guide:
Okta Workflows guides
Okta Workflows guides offer questions and answers from the Okta Workflows community office hours. They also come from the #okta-workflows channel on the Mac Admins Slack and other places. Read all the other guides.
How do you paginate API results using the HTTP-Paginate card in the Okta Workflows Connector Builder?
This guide will teach you how to paginate API results using the HTTP-Paginate card in the Okta Workflows Connector Builder.
Paginate through API results
The HTTP-Paginate card works like a Do While loop — it repeatedly calls a helper flow, passing an object through each iteration until a stop condition is met. This example pages through the Random User API, accumulating results across multiple pages into a single list. The automation has 2 flows:
- Main: sets up the initial pagination state and starts the paginator.
- Helper: fetches each page, accumulates results, and determines whether to continue or stop.
The HTTP-Paginate card is only available in the Okta Workflows Connector Builder. It supports a maximum of 5,000 iterations.
Main flow
The Main flow sets up the initial pagination state and passes it to the HTTP-Paginate card.

How the flow works
- The Object-Construct card builds the initial pagination state object with:
- Starting page number
- max page limit
- break flag set to False
- API url
- Empty result list
- The HTTP-Paginate card takes the pagination object, repeatedly calls the Helper flow on each iteration, and returns the final accumulated result once pagination is complete.
Helper flow
The Helper flow is called by HTTP-Paginate on each iteration. It fetches one page of results, adds them to the running list, and signals whether to continue
or stop.

How the flow works
- The Helper Flow card receives the current pagination state as inputs:
- page number
- max page
- break flag
- url
- And the accumulated result list so far
- The Text-Compose card builds the URL for the current page by appending the page number as a query parameter.
- The HTTP-Raw Request card makes a GET request to the URL
- The Object-Get card extracts the results array from the response body.
- The List-Union (Combine Unique) card merges the new results with the accumulated result list from previous iterations.
- The Number-Add card increments the page counter by 1.
- The Object-Construct card builds the updated pagination state with the new page number and combined results.
- The Branching-If/Else card checks whether the next page is less than or equal to the max page.
- If yes, the Flow Control-Assign card passes the next pagination state back to
the HTTP-Paginate card, and the loop continues. - If not, the Object-Unset card removes the break field from the pagination object, signaling HTTP-Paginate to stop and return the final result.
- If yes, the Flow Control-Assign card passes the next pagination state back to
- The Flow Control-Return card returns the pagination object to the HTTP-Paginate card, which uses it to determine the next iteration.
Running the flow
The Random User API requested 5 pages of users (5 per page), for a final total of 25 records.

That’s the HTTP-Paginate card in action — a Do While loop that fetches, accumulates, and stops when it’s done.
Related Okta Workflows guides
- Okta Workflows Tutorial: Build a Connector for OpenWeather API.
- Okta Workflows Tutorial: Build a Connector for Spotify API (with OAuth 2.0).
- Build an API Connector with the Okta Workflows Connector Builder (video).
- Workflows Collection: Build Flows with Recursion.
Okta Workflows resources
- 🚀 New to Okta Workflows? The Getting Started with Okta Workflows page has all the resources to help you get started.
- 📺 Like learning from videos? Watch Okta Workflows videos.
- ❓Have a question? Ask during community office hours or post on the community forum.
- 💬 Want to learn from the community? Join the #okta-workflows channel on the Mac Admins Slack.
- 🎓 Want to learn more about identity automation? Take the Okta Workflows training on Okta Learning.
Leave a Reply