Join the Webstudio community

Updated 2 months ago

Airtable API limitations!

At a glance
Hey guys,
i've read multiple times in here about the Airtable API restriction with 1.000 calls per Month. (New Update on 2nd Dec.)
I found a cool workaround for using Webstudio in combination with Airtable and Cloudflare Caching API with Make.com.
I would like to make a quick overview how to do it for everyone using Airtable and wanting to reduce the API calls dramatically.
Where is the best place to post this? 🙂

Maybe we could set up a channel for Userguides ? 🙂
M
p
4 comments
(I heard about that, I'm on Baserow now / Airtable alternative)
Guide to Reducing Airtable API Calls

Objective

This guide explains how to reduce Airtable API usage through efficient caching strategies. By implementing Cloudflare caching and Make.com automation, the API load is minimized during page visits.

Tools Used

• Webstudio: To integrate Airtable data via API.
• Airtable: For data storage and management.
• Cloudflare: For content caching.
• Make.com: To automate API requests and manage the cache.

Problem

In Webstudio, data is pulled from Airtable using the API. Each page load results in an API call to Airtable, leading to high API usage if the site receives frequent traffic. Setting up a caching solution can help reduce this load.

Solution Steps

  1. Enable Cloudflare Caching
In Cloudflare, configure the “Cache everything” rule. This rule caches all page content, so it doesn’t need to be fetched from Airtable on each visit. Cloudflare offers a template for this caching rule, making setup easier.

  1. Prepare Airtable
Add a LastEdited column in the Airtable bases you’re using. This column logs the last edit date and time, serving as an indicator for data changes.

  1. Automation with Make.com
    • Airtable Watch: Set up a trigger in Make.com that monitors Airtable for any changes. When a record is edited, the Airtable Watch module detects it.
    • Update Cloudflare Cache: Use the HTTP Make a request module to interact with the Cloudflare API. This module clears the Cloudflare cache so that a fresh cache is generated automatically upon data changes.
With this setup, any data changes in Airtable trigger a cache update in Cloudflare. If no changes occur, the website continues to load from the Cloudflare cache without burdening the Airtable API.
Additional Information:

How to configure the HTTP Make a request in Make.com
  1. Enter your Clouflare API URL
  2. Method: POST
  3. Header:
Name: Authorization
Value: Bearer <API KEY>
  1. Body Type: Raw
  2. Content Type: JSON
  3. Request Content:
{
"files": [
"https://url.de/specificurl",
"https://url.de/specific2"
]
}

This is purging only specifiy urls.
or us the below one for purge everything.

{
"purge_everything": true
}
Add a reply
Sign up and join the conversation on Discord