The recommended / best steps to load API and auto insert it to database

I need advice on the steps how to:

  1. Load API data
  2. Auto insert the data into database
  3. Load the database

I don’t want to directly use the API data as output instead I want to use my database which gets some of its data from the API as output. I have no problem with 1) and 3) but I’m still wondering how I can achieve the step 2).

Any help is much appreciated.

A cron job could do this for you. If you’re looking for a Wappler solution, I have seen people talk about the scheduler function, but I have not had the chance to utilize it as of yet.

I was not able to find a Wappler Documentation on the Scheduler, but I did find the DMX Zone one and the principle should be similar. https://www.dmxzone.com/go/32892/app-connect-action-scheduler/

Hi thanks again for your suggestion @scott. I think the better way to do it without scheduler is by auto load the API datasource, then on success Insert the database, then on success, load the database. But I’m stuck figuring out how can I insert data from API into database without form fields, directly from the API. Perhaps I can utilise get variable but it seems a long way to go in order to pass the data from API into particular insert action.

@transcoderm for the step 2, you can use a repeat step, which repeats the API data, then inside the repeat step use the database insert to insert the data you need.

2 Likes

Thank you @Teodor I believe this step will work as intended. Cheers.