Clear Database and Refill from API, recuringly


I am trying to build an app that runs calculations based on a user’s live input.
I figured (I think), that the best (quickest/most efficient) way would be to update my Bubble database every X hours, instead of fetching api queries when a user inputs data (the service I’m relying on - its API - doesn’t provide the data in the structure that suits me.

How can I go about the following workflow:

Every X minutes, delete all records, and record entries (on already created ‘Thing’) into Database.
bear in mind that I have to clear my entire DB to update all the data in order to avoid duplication/old data.

If someone could point me in the right direction, or give me an insight, I would be infinitely grateful :slight_smile:

With love,

3 Years Bubble fan - <3

1 Like