How to cache Airtable data in TinyDB and refresh only once every 24 hours?

Hello Kodular Community :waving_hand:
I am developing an app using Kodular + Airtable.
Currently, my app loads data from Airtable every time the app opens, which is slow and also consumes unnecessary API calls.
What I want to achieve
I want to implement a 24-hour cache system using TinyDB, such that:
When the user opens the app for the first time in a day,
β†’ Data should be fetched from Airtable and stored in TinyDB.
For the next 24 hours,
β†’ The app should NOT call Airtable,
β†’ It should load data only from TinyDB.
After 24 hours are completed,
β†’ Airtable should be called again,
β†’ Data should be refreshed and stored back into TinyDB.
App should also work offline using TinyDB data.
My current idea (logic)
Store Airtable response in TinyDB (for example: tag = APP_DATA)
Store last fetch time using Clock.Now (tag = LAST_FETCH_TIME)
On Screen.Initialize:
Check if LAST_FETCH_TIME exists
Compare current time with last fetch time
If time difference > 24 hours β†’ call Airtable
Else β†’ load data from TinyDB
My Questions
Is this the correct and recommended approach?
What is the best way to calculate 24 hours using Clock blocks?
Are there any common mistakes to avoid while doing this?
If possible, can someone share block examples or screenshots?
Any help would be highly appreciated :folded_hands:
Thank you!

ofline_air.aia (87.8 KB)

1.in screen ini , get the stored time.
If this time is 0 then call the data else if the stored time and the current time different is less than 24hrs then do not call the data
else call the data

1 Like

Where is the data stored in tiny db?


Then here

add this block
blocks(41)

Then you can proceed creating your function from there

Also your using outdated extension, download the latest version from Git

1 Like

Data must be stored in when spreadsheet got column. And it should be called in screen init where you see the alert please wait for 24hr.

The data is loading properly from the airtabale, but when I click to move the data to another screen, it is showing an error.


Processing: Screenshot_2026-01-04-20-28-45-54_680d03679600f7af0b4c700c6b270fe7.jpg…

You’re clicking without setting Unique ID


On click, the component ID must match your component Tag

1 Like

In this, offline data loading is happening, but once in 24 hours the logic of the api call is not working, the app is crashing, I apologize but, I think the logic of the clock is necessary to solve the problem of repeated api calls.
ofline_air_1.aia (89.8 KB)

1 Like

I just modified Still-learning method little,

Also on when Got Column

Try it this way and give feedback

1 Like

Thanks​:heart_eyes::heart_eyes::heart::heart::heart: