Get more than 100 items from Airtable

Pau Sanchez Updated by Pau Sanchez

Airtable API has a default limitation that offers a maximum of 100 items per request, to get more results you need to deal with pagination and offset. However, if what you want is to get all items from one field without such limitation, there is a workaround.

In this example we have a Table with the name of all the countries (more than a 100) and we want to display them in Landbot with Dynamic Data block

  1. First we start with the table called "countries" where in the field/column "country_name", we have the information we want to display in Landbot
  1. Create another Table called "countries_list", it will be empty at the moment. Here is where we are going to transfer all the data in a single row.
  2. Now, in this table, we will create a new field called "link_to_list" as a single line of text:

  1. We need to fill this field, with a string, like "ref", for all the records (countries) we want to list after:
  2. Select the "link_to_list" field, to change the field type, and select "Link to another record":

  1. Once is pressed you will see a list of tables, please select "countries_list":

  1. In the next screen accept "Allow Linking to multiple records", and press Save

  1. Do not select anything just press Skip:

  1. Now we will have 1 record in countries_list, linked to all the records in the table countries that have the "ref" value:

  1. Now you can delete the empty records and the default fields "Notes" and "Attachments":

So the table will look like this:

  1. Add a new field called "countries_array", field type Lookup:

  1. Then select from countries, "country_name", and press Save:
  2. Now you have in a single cell of a record all the countries in the field Country_name from the table "countries" (as long as they have the value "ref" in the "link_to_list" field:

  1. Now to get the record_id, select the record and press CTRL + click, and click "Copy record url":

  1. Paste the URL in your browser, press intro and copy the last part of the url:

  1. Now go back to Landbot to the Webhook where you are planning to pull all the data, and GET the data based on that Table (countries_list) and the record id you just copied. Below is the Airtable documentation to retrieve that just one record:

In case you need more information about different ways to retrieve records from Airtable, please check this

This article is based on this detailed great article in the Airtable Community

How did we do?

How to use Google Spreadsheet as a Content Management System for your bot

Contact