Airtable Pagination

I’m new to Adalo and I have been playing with it for about two to three days now. My app idea relies on Airtable so I’ve been spending a good amount of time around this. The community here is very helpful but I didn’t find a solution to the specifc question of trying to do pagination for Airtable in Adalo. So when I found a way I thought I’ds share it so here it is. It relies so much on Partick Ford’s video (@pford) in terms of approach so make sure you watch.

As you know, Airtable API calls has a 100 rows limit and the API call includes an offset that is used for pagination, and instead of it being a page number it’s actually a record id of the last record in the list retrieved in the API response. So, in order to get the second patch of records (or the third, thr fourth… etc), you need to include that offset. How can we do that in Adalo?

  • First create a collection with one field (you can name it whatever you want.) Every record in this collection will include the offset (the record id for the 100th row.) I named it ‘lastrecord.’ You only need one field because it’s gonna act as a placeholder (a variable) a nothing more.

  • Now go to the button that will take you that list, and add an action that create a new record in our new collection with a blank name.

  • Now in the next page (the one where we have our list), add a button at the bottom that says ‘next’ or something. This will be the pagination button.

  • Click on the list component and add a filter named offset with the value being the name of current lastrecord.

  • The next button will have three actions:

    • A custom action that retrieve the offset:

      • The custom action dialog will pop up: you can name it whatever and type create.

  • second step …

    • here you basically needs to make an API call that retrieves the offset. so you add the base API in the first field, the Authorization in the header (just like how you would connect an Airtable external collection to your app)
    • You also add an input that has an example value (a record id of the offset.) I tested this call first on Postman and copied the offset value and pasted it here.
    • Then you add a query parameter that I named offset and for the value you add magic text that contains the offset value we created as input. This is basically it. Run the test and check if the output is retrieved successfully.

  • In the second action, you need to update the ‘current lastrecord’ with the offset we just retrieved.

  • The third action is of kind Link. We will link to a blank screen (with no animation so that it acts as a refresh button.) This is explained best in Patrick’s video.

  • Here is the link dialogue from the refresh screen.


That’s basically it!

I’m sure I could’ve done better in terms explaining this or probably made a video to show it. But I just thought I’d share the approach quickly even it’s not perfectly neat as I’m sure a lot of people use Airtable in there app.

All the good luck!

5 Likes

This is a wonderful writeup, thank you so much for making this! This is sure to be very helpful for a LOT of makers!

Thank you so much for breaking it down! This should become part of Adalo’s documentation somehow too

1 Like

Hi @Motlaq,

Thanks for this tutorial. It really worked well. I tried it with the pageSize parameter to limit the records returned to 10 (to create a paginated list), along with sort based on a numbered field in the airtable database and pageSize parameters (both in the list and the custom action query). But for some reason, it wouldn’t go beyond the second page. Any ideas why it would be so? This is how my configuration looks:

List Parameters

Custom Action

Next Button Actions


Refresh Page Action

Thanks a lot in advance for the help!