COMMUNITY MEETUP – Thu, July 2 19.00 (CET) – Glide & APIs

@Vicio_Sciascia I have been thinking about whether it should be possible to avoid that the user needs to push a button to see the latest result from the API.

I have added some extra code to the script that I have used for the QR code scanner (see below) - which is the same script you are using (and based on @ThinhDinh script)

The idea is to copy the values from the row which are two rows above last row.

It would then be possible to show an inline list from the sheet which is populated with data from the API - and not a duplicate sheet.

As you can probably see you will need to fill in data for two rows before you run the fillFormula.

Hope it makes sense - otherwise let me know

function fillFormula() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheetByName('QR Scans');
  var lr = sheet.getLastRow();
  var fillDownRange = sheet.getRange(lr, 2, 1, 5);
  sheet.getRange(lr-1, 2, 1, 5).copyTo(fillDownRange);
  
  var listToCopy = sheet.getRange(lr-2,1,1,15);
  listToCopy.copyTo(sheet.getRange(lr-2 ,1), {contentsOnly:true});
}

Guys, the API data come from the Google sheet and the end points are called by a Google apps script?! Wtf?

I believed Glide would integrate external databases based on API end point, such as Adalo did. Without any button to force the data refresh.

My third app one year ago retrieve data from the Mailjet campaign API, for the campaign I sent from my glide app. I don’t say it’s not good, I just say it’s already there from the beginning. But the hell is this intermediate button or action to force an edit and the refresh of the data.

@Christophe_HK I don’t really understand what you are saying :slight_smile:

The idea is to store the result of the API call in the same sheet as the sheet which is used for displaying the result - and change previously obtained API calls to data and not formulas. This will thereby avoid massive extra API calls if the sheets decides to reload (which it sometimes does)

Makes sense?

3 Likes

Yes @Krivo, of course it makes sense. I just believed that Glide planned to integrate API endpoints as a component of Glide itself, such as an “external database” out of the gsheet. That would have avoided any link with the gsheet, and would have been a starting point to break the dependency with Google sheet.

But yes, what’s done here make sense yes. API usage is really useful and relevant for apps. It’s also a way to avoid, sometimes, spending money with zapier or any other automation tools.

2 Likes

please can the recorded video be posted

@Glider we don’t record these meeting as people should contribute without the need to consider that the session is recorded.

You can see the presentation in the thread and further discussions.

1 Like