The sensors in my greenhouse are always connected to my wifi and take a reading every 15min. This is then posted to a php webpage and saved into a database.
My gps tracker is only connected to the wifi when I am home so it uploads a file via FTP.
https://www.mathworks.com/help/thingspeak/rest-api.html?s_tid=CRUX_lftnav
using node-red (or whatever you prefer)
you can easily replicate the functions you need
and build a gateway to store data into files or databases