A Feed Me feed type that handles Airtable's 100-record API limit with automatic pagination.
While Feed Me has built-in pagination support, it doesn't work with Airtable's API. Here's why:
The Problem:
- Airtable's API returns a maximum of 100 records per request
- To get more records, you must use an
offsetparameter provided in the response - Feed Me's standard pagination expects numbered pages (page 1, 2, 3...) or standard limit/offset parameters
- Airtable uses a unique cursor-based pagination with opaque offset strings
- Result: Feed Me can only fetch the first 100 records from Airtable, ignoring the rest
The Solution: This plugin implements a custom Airtable data type for Feed Me that:
- Automatically detects when Airtable returns an
offsetparameter - Recursively fetches additional pages using Airtable's offset cursors
- Combines all pages into a single dataset for Feed Me to process
- Works transparently - just set it up like any other Feed Me feed
- Automatic Pagination - Transparently fetches all records beyond Airtable's 100-record API limit
- Easy Configuration - Set API key via environment variables for security
- Full Airtable API Support - Use views, filters, and sorting just like the native API
- Craft CMS 5 Compatible - Built for the latest version of Craft and Feed Me
- Craft CMS 5.0.0 or later
- Feed Me 6.0.0 or later
- PHP 8.0.2 or later
Since this plugin is not yet publicly released, add it as a local repository:
- Add to your project's
composer.json:
{
"repositories": [
{
"type": "path",
"url": "./plugins/airtable-feedme"
}
]
}- Install the plugin:
composer require juddlyon/airtable-feedme- In the Control Panel, go to Settings → Plugins and install the Airtable Feed Me plugin.
Set your Airtable API key via environment variable for security:
AIRTABLE_API_KEY="your_api_key_here"Add this to your .env file. The plugin enforces environment variable usage to prevent accidentally committing API keys.
- In Feed Me, create a new feed
- Select "Airtable" as the Feed Type
- Enter your Airtable API URL:
https://api.airtable.com/v0/{baseId}/{tableIdOrName}
You can add these optional parameters to your feed URL:
view- The name or ID of a view in the tablemaxRecords- Maximum total number of records to returnsort[0][field]- Field to sort bysort[0][direction]- Sort direction (asc/desc)filterByFormula- Airtable formula to filter records
Example:
https://api.airtable.com/v0/appXXXXXX/Videos?view=Published&maxRecords=500&sort[0][field]=Date&sort[0][direction]=desc
For developers interested in how this works:
- The plugin registers a new "Airtable" data type with Feed Me
- When Feed Me requests data, our data type:
- Makes the initial API request with authentication headers
- Checks if the response contains an
offsetparameter - If offset exists, makes additional requests until all records are fetched
- Merges all record arrays into a single response
- Feed Me processes the complete dataset as if it came from a single request
The key incompatibility was that Airtable uses cursor-based pagination with opaque strings (like itrXXXXXXXXXXXXX/recXXXXXXXXXXXXX) rather than numeric offsets, which Feed Me's pagination system couldn't handle.
This plugin is currently in private testing. For support, please contact:
- Email: jl@juddlyon.com
This plugin is licensed under the MIT License.