API > import & update DB

I want to use this api : https://restcountries.eu
I don’t have problems to connect and display data on page. All ok with documentation and community. Works like a charm.
But i would like to connect to this api > import in a database and check / update on a regular basis. This means i would use the database to display the data on the page.
I found some topics here but not exactly the same case and can’t make it working.
Now i have this set up but i’m pretty i’m missing lot of steps to make this working.
Any idea?

That looks fine to me. What isn’t working? Can you give some more details? Can you show the Insert Options screen?

well, database is empty and I don’t know how to make the import and update on a regular basis.

Can you show the insert options?

I wanted to to a test with “name” only (= country name). Here all the screens.

That looks fine. The only thing I would try is removing ‘name’ from the Output Fields. I’ve done similar to this and leave that empty. You don’t need the Output checkbox to be checked either.

but how you make this “running”? = take the data from API > send to DB > update on regular basis?

What server model are you using? If it’s PHP or ASP then you set up a CRON on the server to run the script directly. NodeJS has a scheduling feature built in I believe (I’ve not made the jump to NodeJS… yet)

Hang on, I’ve just spotted you’re doing this in the Database Manager. You should create all this in the API section of Workflows.

nope, it’s in the API section. I use node.js.

If you are using nodejs then please check:

Thanks Tudor, I have a close look now.
Sorry for my questions ) I guess they are “silly” for most of you but when you start with Wappler it’s kind of “complicated” to deal with all concepts when you are not a dev. Thanks for your support and patience )

No problem. I thought the issue was it not inserting in the database so was focussed on that.

Well I will now when I will make this nodejs actions running.
For now as I don’t trigger action I don’t know if it works as expected )
Thanks for your support @sitestreet

1 Like