Search code examples
google-app-maker

Google app maker - update itself from google sheet data


I have a very simple app to learn on, just displaying parts of an imported spreadsheet, but I'm not sure how to make it update automatically and repull the data. I'm not adding any additional information inside appmaker, so clearing and repulling is fine. I just want it to update the sheet either every day or when the app is opened, either would be fine.

I was able to get the sheets data into my model in the first place with https://developers.google.com/appmaker/models/import-export but i'm not sure how to write a script so that it auto updates.


Solution

  • I think, if I'm not mistaken, that you want to run a process every certain time to import data into Google App Maker from a Google Spreadsheet. If that is the case, you can use a time trigger. An example on how to manage time triggers is available here.

    The trigger must invoke a function that reads data from the spreadsheet using the SpreadsheetApp service and then save all the records in bulk. Here is an example of how you can update several records in bulk.