web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate handlin...
Power Automate
Answered

Power Automate handling Web APIs with pagination

(0) ShareShare
ReportReport
Posted on by 14

Hi all,
I'm using an API that returns data in JSON format. The data is returned 500 records at a time and has a skip function that allows you to return the next 500 results e.g. $skip 500. Note that if you say skip 5000 records and there was only 4900 the call will still function (won't error out), it just returns with minimal information (example below).
I am trying to set-up a loop that will stop running when the JSON data is missing the value field will be empty. It will also be missing the @OData.nextLink field. So far I have tried setting a condition that if

empty(body('Convert_HTTP_JSON_-_Get_Daily_Booking_Members_2')?['@odata.nextLink']) equals true will break the loop but this hasn't worked due to the empty check returning the opposite result then expected.

 

How can I create a loop that if value is empty it will break?

If it helps the last page always returns the following JSON:

 

{
    "@odata.context""https://samplewebsite.com",
    "value": []
}
 
 
Sorry if this is an easy one.
Categories:
I have the same question (0)
  • Verified answer
    lbendlin Profile Picture
    8,479 Super User 2025 Season 2 on at

    You're on the right track.  You have a seed, a page size, and an exit condition.  Keep working on the comparison logic.

     

    As you can imagine, it is close to impossible to assist with API questions unless you give access to that API (which you may not want to do)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard